marcelog / PAMI

PHP Asterisk Manager Interface ( AMI ) supports synchronous command ( action )/ responses and asynchronous events using the pattern observer-listener. Supports commands with responses with multiple events. Very suitable for development of operator consoles and / or asterisk / channels / peers monitoring through SOA, etc
http://marcelog.github.com/PAMI
Apache License 2.0
402 stars 281 forks source link

OriginateAction using setVariable method to set variable is not sending at all #211

Closed ravhirizaldi closed 2 years ago

ravhirizaldi commented 2 years ago

Hello,

I use to send variable when my application is originating call, but seems all the variable that I have been set is not sending at all, here is my example code to set variable :

//originate call
$originate = new OriginateAction("SIP/".$vars['extension']);

$originate->setContext('from-internal');
$originate->setExtension($this->asterisk_pin.$vars['phone']);
$originate->setVariable('CUSTOMERID', $vars['customer_id']);
$originate->setVariable('AGENT', $vars['agent_id']);
$originate->setVariable('CAMPAIGN', $vars['campaign_id']);
$originate->setVariable('UNIQUEIDCRM', $vars['unique_id']);
$originate->setTimeout(30000);
$originate->setPriority(1);
$originate->setAsync(true);

$result = $this->pamiClient->send($originate)->getMessage();

here is the result of verbose command :

image

as you can see there is no value for each available variable!

is this a bug or something that I need to send variable?