Hi everybody
I need develop a dialer that make a call and put it in a specific queue using Asterisk Manager Interface, someone know how to do this? What action I need use … and what events will receive from asterisk…
Originate.
Run the action and see what events you get.
Here an example with php and socket
[code] $timeout = 10;
$asterisk_ip = “yourIP”;
$socket = fsockopen($asterisk_ip, “5038”, $errno, $errstr, $timeout);
fputs($socket, “Action: Login\r\n”);
fputs($socket, “UserName: yourmanagerUser\r\n”);
fputs($socket, “Secret: youmanagerPass\r\n\r\n”);
$wrets = fgets($socket,128);
fputs($socket, "Action: Originate\r\n" );
fputs($socket, "Channel: Local/yourphoneNum@interal\r\n" );
fputs($socket, "Exten: 1000\r\n" ); HERE YOUR QUEUE NUMBER
fputs($socket, "Context: internal\r\n" ); YOUR CONTEXT
fputs($socket, "Priority: 1\r\n" );
fputs($socket, "Async: yes\r\n\r\n" );
$wrets = fgets($socket,128);
[/code]
I hope you help!!
Felix Vidal
from Chile
Thank you friends, I will make some tests and then post the results here
sorry for delay (very busy)… this worked fine, thank you friends