0
votes

I'm using PAMI to originate call, it should make call to local extension (sip/7xx) and when it is picked on that extension it should make call to customer no (outbound call), but it doesn't and it randomly select local extension. When I change it to dadhi trunk (DADHI/trunk-name/08008085883) it works make call to customer when customer picks this call then it rings local extension I want reverse of this, first ring to local extension then to customer (outbound call)

$originateMsg = new OriginateAction("SIP/726");
$originateMsg->setContext('from-digital'); // Have tried these from-    sip-  external, from-internal, from-digital 
$originateMsg->setPriority('1');
$originateMsg->setExtension("08008085883");//customer no
$originateMsg->setCallerId("08008085883");
$originateMsg->setTimeout(20000);
$originateMsg->setAsync(true);
$originateMsg->setActionID($actionid);
$a->send($originateMsg);`
1

1 Answers

0
votes

Solution that worked for me:

$originateMsg = new OriginateAction('SIP/ExtensionNumberHere');
$originateMsg->setExtension("CustomerNumberHere");
$originateMsg->setCallerId("DAHDI/g0/CustomerNumberHere");