Make a call and put in queue with AMI

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Make a call and put in queue with AMI

Postby boot g » Thu Mar 08, 2012 1:53 pm

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...
boot g
Newsterisk
 
Posts: 14
Joined: Thu Mar 08, 2012 1:47 pm

Re: Make a call and put in queue with AMI

Postby david55 » Thu Mar 08, 2012 4:20 pm

Originate.

Run the action and see what events you get.
david55
Moves Like Spencer
 
Posts: 7740
Joined: Fri Sep 26, 2008 5:03 am

Re: Make a call and put in queue with AMI

Postby biguitarman » Fri Mar 09, 2012 12:11 pm

Here an example with php and socket

Code: Select all
            $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);


I hope you help!!

Felix Vidal
from Chile
biguitarman
Newsterisk
 
Posts: 14
Joined: Mon Mar 05, 2012 2:18 pm

Re: Make a call and put in queue with AMI

Postby boot g » Fri Mar 09, 2012 7:19 pm

Thank you friends, I will make some tests and then post the results here :)
boot g
Newsterisk
 
Posts: 14
Joined: Thu Mar 08, 2012 1:47 pm

Re: Make a call and put in queue with AMI

Postby boot g » Fri Apr 27, 2012 7:27 pm

sorry for delay (very busy).. this worked fine, thank you friends :o
boot g
Newsterisk
 
Posts: 14
Joined: Thu Mar 08, 2012 1:47 pm


Return to Asterisk Support

Who is online

Users browsing this forum: Alexa [Bot] and 18 guests