[asterisk-users] Asterisk Manager

Anthony Francis anthonyf at rockynet.com
Fri Jul 6 10:05:41 CDT 2007


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.



More information about the asterisk-users mailing list