First of all, i’m totally newbie in Asterisk system and I apologize in advance for lack of knowledge on this subject.
I’m trying to develop a click to call feature through Asterisk using AMI interface.
I’m using this package : https://github.com/enniel/ami on a Laravel php application.
Here is an example of code :
$phone_extension = "3515" // My phone extension $number = 06xxxxxxxx; // The phone number I want to call Artisan::call('ami:action', [ 'action' => 'Originate', '--arguments' => [ 'events' => 'on', 'Channel' => "Local/" . $phone_extension . "@hud-caller-answer", 'context' => 'internal', 'Exten' => $number, 'Priority' => '1', "CallerID" => $phone_extension, 'Timeout' => '30000', 'Async' => true ]; ]);
It works in part as the phone is ringing and, after picking up, the call is emited toward the recipient
The problem is that the displayed number on the receiver phone is not the good one. The displayed number is the first of our internal numbers list. As if since the numer is not recognize, the first one is taked.
I hope I succeeded to explain my problem clearly enough
thank you in advance