return value in diaplan from external script
I'd like to get the value from a PHP or Perl function back to the dialplan. not sure how get the value. Thanks
You can't, or at least you can't directly. While you can call a php script, freeswitch will not wait for the output. Here's a few options: -use lua to do your processing. That can be run inline to set variables and the like. (Easiest if you can get your head around the lua) -if you just need a simple sql query, use somethibg like mod odbc query from the git contrib. -use xml curl so you can completely control the dialplan flow -or even more if lua isn't your thing you can create an esl php applicatio that can control the call in realtime, rather than just generating dialplan xml. -or an iffy idea -call the php script, have it save to sql or something, and have the xml dialplan sleep for a moment and then retrieve it. On Jan 10, 2011 4:08 AM, "Madovsky" <infos@madovsky.org> wrote:
I'd like to get the value from a PHP or Perl function back to the dialplan. not sure how get the value.
Thanks
ok thanks for your info, and Perl ? if Perl can manage session vars array, if I set a var in it on the fly and call it from dialplan just after ? I need only to get a little info from the DB. ----- Original Message ----- From: Avi Marcus To: FreeSWITCH Users Help Sent: Sunday, January 09, 2011 10:12 PM Subject: Re: [Freeswitch-users] return value in diaplan from external script You can't, or at least you can't directly. While you can call a php script, freeswitch will not wait for the output. Here's a few options: -use lua to do your processing. That can be run inline to set variables and the like. (Easiest if you can get your head around the lua) -if you just need a simple sql query, use somethibg like mod odbc query from the git contrib. -use xml curl so you can completely control the dialplan flow -or even more if lua isn't your thing you can create an esl php applicatio that can control the call in realtime, rather than just generating dialplan xml. -or an iffy idea -call the php script, have it save to sql or something, and have the xml dialplan sleep for a moment and then retrieve it. On Jan 10, 2011 4:08 AM, "Madovsky" <infos@madovsky.org> wrote:
I'd like to get the value from a PHP or Perl function back to the dialplan. not sure how get the value.
Thanks
------------------------------------------------------------------------------ _______________________________________________ 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
indeed Mod_db is perfect for that Thanks ----- Original Message ----- From: Avi Marcus To: FreeSWITCH Users Help Sent: Sunday, January 09, 2011 10:12 PM Subject: Re: [Freeswitch-users] return value in diaplan from external script You can't, or at least you can't directly. While you can call a php script, freeswitch will not wait for the output. Here's a few options: -use lua to do your processing. That can be run inline to set variables and the like. (Easiest if you can get your head around the lua) -if you just need a simple sql query, use somethibg like mod odbc query from the git contrib. -use xml curl so you can completely control the dialplan flow -or even more if lua isn't your thing you can create an esl php applicatio that can control the call in realtime, rather than just generating dialplan xml. -or an iffy idea -call the php script, have it save to sql or something, and have the xml dialplan sleep for a moment and then retrieve it. On Jan 10, 2011 4:08 AM, "Madovsky" <infos@madovsky.org> wrote:
I'd like to get the value from a PHP or Perl function back to the dialplan. not sure how get the value.
Thanks
------------------------------------------------------------------------------ _______________________________________________ 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
participants (2)
-
Avi Marcus
-
Madovsky