[asterisk-users] Asterisk Manager

Mojo with Horan & Company, LLC mojo at horanappraisals.com
Fri Jul 6 11:25:38 CDT 2007


(Using things like fgets and strcmp and substr and sprintf and such.) 
I've found that reading everything asterisk's got for me in one go and 
then using explode function with '\r\n' delimiter seemed to work well 
for me.

Anthony Francis wrote:
> Arun Kumar wrote:
>> Hi
>>
>> this is my code for * manager:
>>
>>                                 $oSocket = fsockopen($strHost, 5038, 
>> $errnum, $errdesc) or die("Connection to host failed");
>>                                 fputs($oSocket, "Action: login\r\n");
>>                                 fputs($oSocket, "Username: $strUser\r\n");
>>                                 fputs($oSocket, "Secret: 
>> $strSecret\r\n\r\n");
>>                                 fputs($oSocket, "Action: Originate\r\n");
>>                                 fputs($oSocket, "Channel: 
>> $strChannel\r\n");
>>                                 fputs($oSocket, "WaitTime: 
>> $strWaitTime\r\n");
>>                                 fputs($oSocket, "CallerId: 
>> $strCallerId\r\n");
>>                                 fputs($oSocket, "Context: 
>> $strContext\r\n");
>>                                 fputs($oSocket, "Exten: $strExten\r\n");
>>                                 fputs($oSocket, "Priority: 
>> $strPriority\r\n\r\n");
>>                                 fputs($oSocket, "Action: Logoff\r\n\r\n");
>>
>> when call gets answered it goes to my specified exten can I also 
>> handle if my call is not got answered b'coz of some reason.
>>
>> that is when get ans goto exten= 101 if call is not got and goto exten=102
>>
>> please help.
>>
>> thanks
>>
>> arun
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
> Hi,
> 
>     What language is this? At any rate to determine if the call is not 
> got answered you need to watch the events using the calls uniqueid so 
> you can determine what happens with it.
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list