getVariable with Pami
solehi opened this issue · comments
how can i getVariable from dialplan with PAMI?
$originateMsg = new OriginateAction('SIP/1001');
$originateMsg->setContext('queue');
$originateMsg->setPriority('1');
$originateMsg->setExtension(5555);
$originateMsg->setCallerId(5555);
$originateMsg->setAsync(true);
$originateMsg->setActionID(1);
$originateMsg->setVariable('id',987654321);
$orgresp = $client->send($originateMsg);
I can setVariable, but i need to getVariable. For example i want to get variable "a" or "b" from this dialplan
[my_context]
exten => _XXXX,1,NoOp(${id})
exten => _XXXX,n,Set(a=2)
exten => _XXXX,n,Playback(dollar)
exten => _XXXX,n,Read(b,1,,,10)
exten => _XXXX,n,AGI(queue.php,${id},${b})
exten => _XXXX,s,Hungup()