Run php script on execute_on_answer
Hello, I try to execute a php script after the call is answered but I can't figure how. I need something like this. <extension name="execOnAnswer"> <condition field="destination_number" expression="^07"> <action application="bridge" data="{execute_on_answer='run http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$1@2.2.2.2"/> </condition> </extension> So what I try to do is to pass the uuid and caller-destination-number to an external source after the call is answered. Is any other approach? Thank you
Try to use https://wiki.freeswitch.org/wiki/Mod_curl And execute it as api on answer. On Sat, Feb 6, 2016, 19:31 Adrian Andrei <koralu@gmail.com> wrote:
Hello,
I try to execute a php script after the call is answered but I can't figure how. I need something like this.
<extension name="execOnAnswer"> <condition field="destination_number" expression="^07"> <action application="bridge" data="{execute_on_answer='run http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$1@2.2.2.2 "/> </condition> </extension>
So what I try to do is to pass the uuid and caller-destination-number to an external source after the call is answered. Is any other approach?
Thank you _________________________________________________________________________ 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
-- Gregor Nanger *CTO* t./f.: 00386 (0) 7 6000 308/309 • m:. 00386 (0)41 756485 • Infomedia d.o.o. • Jerebova 3, Novo mesto, Slovenia • www.infomedia.si
You cant run an http location you need to call it with curl Sent from my iPhone
On Feb 6, 2016, at 12:29 PM, Adrian Andrei <koralu@gmail.com> wrote:
Hello,
I try to execute a php script after the call is answered but I can't figure how. I need something like this.
<extension name="execOnAnswer"> <condition field="destination_number" expression="^07"> <action application="bridge" data="{execute_on_answer='run http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$1@2.2.2.2"/> </condition> </extension>
So what I try to do is to pass the uuid and caller-destination-number to an external source after the call is answered. Is any other approach?
Thank you _________________________________________________________________________ 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
Ok. It works on a separate extension, but I can't figure out what is the syntax for inline approach <action data="{execute_on_answer='system curl http://localhost/answer.php?uuid=$uuid&bnr=$1 <http://localhost/answer.php?uuid=$uuid&bnr=$1%27%7Dsofia/external/$1@2.2.2.2> inline=true'}sofia/external/$1@2.2.2.2"/> This doesn't work. On Sat, Feb 6, 2016 at 8:55 PM, Ken Rice <krice@freeswitch.org> wrote:
You cant run an http location you need to call it with curl
Sent from my iPhone
On Feb 6, 2016, at 12:29 PM, Adrian Andrei <koralu@gmail.com> wrote:
Hello,
I try to execute a php script after the call is answered but I can't figure how. I need something like this.
<extension name="execOnAnswer"> <condition field="destination_number" expression="^07"> <action application="bridge" data="{execute_on_answer='run http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$1@2.2.2.2 "/> </condition> </extension>
So what I try to do is to pass the uuid and caller-destination-number to an external source after the call is answered. Is any other approach?
Thank you
_________________________________________________________________________ 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
_________________________________________________________________________ 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
You should load mod_curl and use syntax <action data="{execute_on_answer='curl http://localhost/answer.php?uuid=$uuid&bnr=$1 <http://localhost/answer.php?uuid=$uuid&bnr=$1%27%7Dsofia/external/$1@2.2.2.2>'}sofia/external/$1@2.2.2.2 <mailto:1@2.2.2.2>"/> On 02/06/2016 09:03 PM, Adrian Andrei wrote:
Ok. It works on a separate extension, but I can't figure out what is the syntax for inline approach
<action data="{execute_on_answer='system curl http://localhost/answer.php?uuid=$uuid&bnr=$1 <http://localhost/answer.php?uuid=$uuid&bnr=$1%27%7Dsofia/external/$1@2.2.2.2> inline=true'}sofia/external/$1@2.2.2.2 <mailto:1@2.2.2.2>"/>
This doesn't work.
On Sat, Feb 6, 2016 at 8:55 PM, Ken Rice <krice@freeswitch.org <mailto:krice@freeswitch.org>> wrote:
You cant run an http location you need to call it with curl
Sent from my iPhone
On Feb 6, 2016, at 12:29 PM, Adrian Andrei <koralu@gmail.com <mailto:koralu@gmail.com>> wrote:
Hello,
I try to execute a php script after the call is answered but I can't figure how. I need something like this.
<extension name="execOnAnswer"> <condition field="destination_number" expression="^07"> <action application="bridge" data="{execute_on_answer='run http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$1@2.2.2.2 <http://localhost/answer.php?uuid=$uuid&bnr=$1%27%7Dsofia/external/$1@2.2.2.2>"/> </condition> </extension>
So what I try to do is to pass the uuid and caller-destination-number to an external source after the call is answered. Is any other approach?
Thank you _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
_________________________________________________________________________ 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
Mod_curl is loaded and in separate extension it's working fine. The problem is with the following syntax: I need something like this: <action application="bridge" data="{execute_on_answer='curl myLink?uuid=$uuid&bnr=$1'}sofia/external/$1at2.2.2.2"/> On Sat, Feb 6, 2016 at 10:10 PM, Denis Papeš <denis.papes@zg.t-com.hr> wrote:
You should load mod_curl and use syntax
<action data="{execute_on_answer='curl <http://localhost/answer.php?uuid=$uuid&bnr=$1%27%7Dsofia/external/$1@2.2.2.2> http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$ <1@2.2.2.2>1@2.2.2.2"/>
On 02/06/2016 09:03 PM, Adrian Andrei wrote:
Ok. It works on a separate extension, but I can't figure out what is the syntax for inline approach
<action data="{execute_on_answer='system curl <http://localhost/answer.php?uuid=$uuid&bnr=$1%27%7Dsofia/external/$1@2.2.2.2> http://localhost/answer.php?uuid=$uuid&bnr=$1 inline=true'}sofia/external/$ <1@2.2.2.2>1@2.2.2.2"/>
This doesn't work.
On Sat, Feb 6, 2016 at 8:55 PM, Ken Rice <krice@freeswitch.org> wrote:
You cant run an http location you need to call it with curl
Sent from my iPhone
On Feb 6, 2016, at 12:29 PM, Adrian Andrei < <koralu@gmail.com> koralu@gmail.com> wrote:
Hello,
I try to execute a php script after the call is answered but I can't figure how. I need something like this.
<extension name="execOnAnswer"> <condition field="destination_number" expression="^07"> <action application="bridge" data="{execute_on_answer='run <http://localhost/answer.php?uuid=$uuid&bnr=$1%27%7Dsofia/external/$1@2.2.2.2> http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$1@2.2.2.2 "/> </condition> </extension>
So what I try to do is to pass the uuid and caller-destination-number to an external source after the call is answered. Is any other approach?
Thank you
_________________________________________________________________________ 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
_________________________________________________________________________ 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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon....
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ 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
Sorry, I just copy/pasted your previous line without looking. It should be <action application="bridge" data="{execute_on_answer=curl http://myLink?uuid=$uuid&bnr=$1}sofia/external/$1@2.2.2.2"/> On 02/06/2016 09:40 PM, Adrian Andrei wrote:
Mod_curl is loaded and in separate extension it's working fine. The problem is with the following syntax:
I need something like this:
<action application="bridge" data="{execute_on_answer='curl myLink?uuid=$uuid&bnr=$1'}sofia/external/$1at2.2.2.2"/>
On Sat, Feb 6, 2016 at 10:10 PM, Denis Papeš <denis.papes@zg.t-com.hr <mailto:denis.papes@zg.t-com.hr>> wrote:
You should load mod_curl and use syntax
<action data="{execute_on_answer='curl http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$1@2.2.2.2 <mailto:1@2.2.2.2>"/>
On 02/06/2016 09:03 PM, Adrian Andrei wrote:
Ok. It works on a separate extension, but I can't figure out what is the syntax for inline approach
<action data="{execute_on_answer='system curl http://localhost/answer.php?uuid=$uuid&bnr=$1 inline=true'}sofia/external/$1@2.2.2.2 <mailto:1@2.2.2.2>"/>
This doesn't work.
On Sat, Feb 6, 2016 at 8:55 PM, Ken Rice <krice@freeswitch.org <mailto:krice@freeswitch.org>> wrote:
You cant run an http location you need to call it with curl
Sent from my iPhone
On Feb 6, 2016, at 12:29 PM, Adrian Andrei <koralu@gmail.com <mailto:koralu@gmail.com>> wrote:
Hello,
I try to execute a php script after the call is answered but I can't figure how. I need something like this.
<extension name="execOnAnswer"> <condition field="destination_number" expression="^07"> <action application="bridge" data="{execute_on_answer='run http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$1@2.2.2.2 <mailto:1@2.2.2.2>"/> </condition> </extension>
So what I try to do is to pass the uuid and caller-destination-number to an external source after the call is answered. Is any other approach?
Thank you _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
_________________________________________________________________________ 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
Why call system there? See mod curl thats what its for Sent from my iPhone
On Feb 6, 2016, at 2:03 PM, Adrian Andrei <koralu@gmail.com> wrote:
Ok. It works on a separate extension, but I can't figure out what is the syntax for inline approach
<action data="{execute_on_answer='system curl http://localhost/answer.php?uuid=$uuid&bnr=$1 inline=true'}sofia/external/$1@2.2.2.2"/>
This doesn't work.
On Sat, Feb 6, 2016 at 8:55 PM, Ken Rice <krice@freeswitch.org> wrote: You cant run an http location you need to call it with curl
Sent from my iPhone
On Feb 6, 2016, at 12:29 PM, Adrian Andrei <koralu@gmail.com> wrote:
Hello,
I try to execute a php script after the call is answered but I can't figure how. I need something like this.
<extension name="execOnAnswer"> <condition field="destination_number" expression="^07"> <action application="bridge" data="{execute_on_answer='run http://localhost/answer.php?uuid=$uuid&bnr=$1'}sofia/external/$1@2.2.2.2"/> </condition> </extension>
So what I try to do is to pass the uuid and caller-destination-number to an external source after the call is answered. Is any other approach?
Thank you _________________________________________________________________________ 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
_________________________________________________________________________ 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
_________________________________________________________________________ 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
participants (4)
-
Adrian Andrei
-
Denis Papeš
-
Gregor Nanger
-
Ken Rice