It sounds like the dialplan never makes it to your extension. Get a debug log of the call and put it on pastebin.freeswitch.org. We can probably help you figure it out from there.

-MSC

On Thu, Apr 28, 2016 at 12:40 AM, Nduwayezu, Joselyne <35633@heb.be> wrote:

Hello,

I would like to invoke php script in the dial plan.
I defined the dialplan as follos:


<include>
 <extension name="outbound-socket">
  <condition field="${sip_to_user}" expression="(972550428)$">
   <action application="set" data="ivr_path=/usr/local/freeswitch/scripts/ivrd-demo.php"/>
   <action application="socket" data="10.0.0.6:8021 async full"/>-->
  </condition>
 </extension>
</include>

And my php script is:


<?php
  // set a couple of things so we dont kill the system
 ob_implicit_flush(true);
 set_time_limit(30);
 // Open stdin so we can read the data in
 $in = fopen("php://stdin", "r");
 // Connect
 echo "connect\n\n";
 // Answer
 echo "sendmsg\n";
 echo "call-command: execute\n";
 echo "execute-app-name: answer\n\n";
 // Play a prompt
 echo "sendmsg\n";
 echo "call-command: execute\n";
 echo "execute-app-name: playback\n";
 echo "execute-app-arg: \
 /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n \
 ";
 // Wait
 sleep(5);
 // Hangup
 echo "sendmsg\n";
 echo "call-command: hangup\n\n";
 fclose($in);
 ?>
                                       
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.

I tried different sockets in the dialplan (5060, 5080, 8040) with no results

Any adeas of what is happening?

Thanks


NDUWAYEZU Joselyne

Haute École de Bruxelles
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org