Hi<br><br><br>using php script and Asterisk manager I'm dialing numbers and once gets connected send to an exten in my dial plan that plays an automated message but some time without answering even it goes to my exten. How can I handle early media in Asterisk that is I want only when user answer the call it should goto my specified extension.
<br><br>my php script:<br> $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed");<br> fputs($oSocket, "Action: login\r\n");
<br> fputs($oSocket, "Username: $strUser\r\n");<br> fputs($oSocket, "Secret: $strSecret\r\n\r\n");<br> fputs($oSocket, "Action: Originate\r\n");
<br> fputs($oSocket, "Channel: $strChannel\r\n");<br> fputs($oSocket, "WaitTime: $strWaitTime\r\n");<br> fputs($oSocket, "CallerId: $strCallerId\r\n");
<br> fputs($oSocket, "Context: $strContext\r\n");<br> fputs($oSocket, "Exten: $strExten\r\n");<br> fputs($oSocket, "Priority: $strPriority\r\n\r\n");
<br><br>Please help <br><br><br>thanks<br><br>arun<br><br><br>