<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>&lt;include&gt;<br> &lt;extension name=&quot;outbound-socket&quot;&gt;<br>  &lt;condition field=&quot;${sip_to_user}&quot; expression=&quot;(972550428)$&quot;&gt;<br>   &lt;action application=&quot;set&quot; data=&quot;ivr_path=/usr/local/freeswitch/scripts/ivrd-demo.php&quot;/&gt;<br>   &lt;action application=&quot;socket&quot; data=&quot;<a href="http://10.0.0.6:8021">10.0.0.6:8021</a> async full&quot;/&gt;--&gt;<br>  &lt;/condition&gt;<br> &lt;/extension&gt;<br>&lt;/include&gt;</div><div><br></div><div>And my php script is:</div><div><br></div><div><br></div><div>&lt;?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(&quot;php://stdin&quot;, &quot;r&quot;);</div><div> // Connect<br> echo &quot;connect\n\n&quot;;</div><div> // Answer<br> echo &quot;sendmsg\n&quot;;<br> echo &quot;call-command: execute\n&quot;;<br> echo &quot;execute-app-name: answer\n\n&quot;;</div><div> // Play a prompt<br> echo &quot;sendmsg\n&quot;;<br> echo &quot;call-command: execute\n&quot;;<br> echo &quot;execute-app-name: playback\n&quot;;<br> echo &quot;execute-app-arg: \<br> /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n \<br> &quot;;<br> // Wait<br> sleep(5);</div><div> // Hangup<br> echo &quot;sendmsg\n&quot;;<br> echo &quot;call-command: hangup\n\n&quot;;</div><div> fclose($in);</div><div> ?&gt;</div><div>                                       <br></div><div>When i dial the DID number, the call state is &quot;call setup&quot; for a while, and after i&#39;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