Asterisk PAMI Originate Outboud Call Issue (PHP)

369 Views Asked by At

I’m using PAMI to originate a call, it should make the call from local extension to customer number it works fine but the problem is that when an I execute the script a call make (from extension to the customer ) when the customer picks this call the problem is: the extension it rings (incoming call)

it should make automatically (when a customer pick the call the channel should make directly without ringing the extension)

this is my code

$originateMsg = new OriginateAction("DAHDI/g1/0603532326");
    $originateMsg->setContext("from-internal");
    $originateMsg->setExtension("4022");
    $originateMsg->setPriority(1);
    $originateMsg->setTimeout(0);
    $originateMsg->setAsync(false);
  var_dump($a->send($originateMsg));
1

There are 1 best solutions below

0
On BEST ANSWER

You have 3 options here

1) ring first to extension, not external number

2) send call to queue in which user already waiting for call(called to queue via QueueAgents)

3) ring first to conference. Create the second call to conference and to extension.

Third variant requires manage of events and complex dialplan. Seams like you have only options 1,2 at your experience level.