In first sorry for my poor english…
I want to make a “calling machine”, in PHP. Actually I log all the events via API Manager connection, so I know each SIP if it’s busy or not, I log also calling duration etc etc
What I want to do is the script iniate a call and when is ok transfer it to a free SIP.
I didn’t find any example, so what I can suppose is the call is do with something like Local/200, and if the events of the call is goo I have to transfer (via calling by an UniqueID ?) the call to the sip phone.
Someone could help me to understand the manipulation ? How to transfert the call ? how to insert the good parameters of the extension 200 ?
Thanx.
For the case of initiate a call you can use a configuration file that you put in /var/spool/asterisk/outgoing/ take a look at
voip-info.org/tiki-index.php … o-dial+out
One of the options is “Applicationâ€
I know how to initiate a call directly with the API Manager, between a SIP phone and a phone number, what I want now to do is to initiate a call without a SIP, it seems to be with a local context number. But I don’t know what to do, with a special local context or with park, and after how to transfer it to a sip phone
The channels is not matter, it can be SIP or any kind of channels that Asterisk handle (H323, IAX,…).
When you establish a call, you can execute an application even an AGI, that do the transfer, park, or whatever you want.
Other way is to initialize the call is from the CLI
console dial EXTEN@CONTEXT) and then transfer with command of the CLI too.
Good luck 
Ok, so I initiate a call from a local channel, and that local channel have to finishi with a Park command ?
Could you write an exemple of that in a extensions.conf ?
I work on my problem so at this time, I make a call and Park it automaticly. I didn’t found why when I make a call with SIP/900 originate channel it can’t find it and go on the ‘s’ context…
And now I try to redirect with API MANAGER the 701 parked call to the sip phone I want but Asterisk respond the channel doesn’t exist… I try with SIP/701, and 70 and else but nothing…
If you are using the outgoing files to initiate a call, the context on the context statement is not where the channel (SIP/900) is, but where the extension is it. Put the output of the debug to understand the problem better.
I think that can be problems with the context and extension that doesn’t exist in this context, the extension that want to take the parked from 701 must has access to the context “parkedcallsâ€