[asterisk-users] Call Files, Variable passing

Dan Dan dani.mani.99 at gmail.com
Sat Feb 12 23:59:16 CST 2011


Hi,

I am having trouble passing variables via the call files, here is my call
file via the php:

    fputs($oSocket, "Action: login\r\n");
    fputs($oSocket, "Events: off\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, "Exten: 3001\r\n");
    fputs($oSocket, "Context: $strContext\r\n");
    fputs($oSocket, "Priority: $strPriority\r\n");
    fputs($oSocket, "MaxRetries: $strMaxReTry\r\n");
    fputs($oSocket, "RetryTime: $strRetryTime\r\n");
    fputs($oSocket, "SetVar: DIAL1=$number1\r\n");
    fputs($oSocket, "SetVar: DIAL2=$number2\r\n");
    fputs($oSocket, "SetVar: AcceptParallel=$ap\r\n\r\n");
    fputs($oSocket, "Action: Logoff\r\n\r\n");

Here I am trying to set three variables but they do not seem to be passed on
to the extensions for dialing .... Am I following the right syntax ?

Thanks
-dani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110212/96d2f12b/attachment.htm>


More information about the asterisk-users mailing list