<div dir="ltr"><div><br></div><div>Hello,</div><div><br></div><div>I would like to invoke php script in the dial plan.</div><div>I defined the dialplan as follos:</div><div><br></div><div><br><include><br> <extension name="outbound-socket"><br> <condition field="${sip_to_user}" expression="(972550428)$"><br> <action application="set" data="ivr_path=/usr/local/freeswitch/scripts/ivrd-demo.php"/><br> <action application="socket" data="<a href="http://10.0.0.6:8021">10.0.0.6:8021</a> async full"/>--><br> </condition><br> </extension><br></include></div><div><br></div><div>And my php script is:</div><div><br></div><div><br></div><div><?php<br> // set a couple of things so we dont kill the system<br> ob_implicit_flush(true);<br> set_time_limit(30);</div><div> // Open stdin so we can read the data in<br> $in = fopen("php://stdin", "r");</div><div> // Connect<br> echo "connect\n\n";</div><div> // Answer<br> echo "sendmsg\n";<br> echo "call-command: execute\n";<br> echo "execute-app-name: answer\n\n";</div><div> // Play a prompt<br> echo "sendmsg\n";<br> echo "call-command: execute\n";<br> echo "execute-app-name: playback\n";<br> echo "execute-app-arg: \<br> /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n \<br> ";<br> // Wait<br> sleep(5);</div><div> // Hangup<br> echo "sendmsg\n";<br> echo "call-command: hangup\n\n";</div><div> fclose($in);</div><div> ?></div><div> <br></div><div>When i dial the DID number, the call state is "call setup" for a while, and after i'm asked to leave a message because the number is busy or unreachable.</div><div><br></div><div>I tried different sockets in the dialplan (5060, 5080, 8040) with no results</div><div><br></div><div>Any adeas of what is happening?</div><div><br></div><div>Thanks<br><br><br clear="all"></div><div><div class="gmail_signature"><div dir="ltr">NDUWAYEZU Joselyne<br></div></div></div>
</div>
<br>
Haute École de Bruxelles