Why are you exporting new=${res} here? All of these functions appear to operate on the current channel, so you should be able to simply do: <action application="curl" data="http://192.168.10.27/index.php post id=${res}" inline="true"/> Unless I'm missing something.... :-) -Yossi On 05/08/2013 03:36 AM, rajat wrote:
Hi
I am new to freeswitch and i am trying to integrate one php application with freeswitch. Purpose is freeswitch will send the user dialed (dtmf numbers) as input to this php application and in return it will send the response back.
Dialplan which I have written for this is
<extension name="inte"> <condition field="destination_number" expression="^9199$"> <action application="read" data="0 9 $${base_dir}/sounds/en/us/callie/conference/8000/input-string.wav res 60000 #"/> <action application="sleep" data="2000"/> <action application="export" data="new=${res}"/> <action application="sleep" data="2000"/> <action application="say" data="en name_spelled iterated ${new}"/> <action application="curl" data="http://192.168.10.27/index.php post id=${new}" inline="true"/> <action application="sleep" data="2000"/> <action application="speak" data="flite|slt|${curl_response_data}"/> <action application="info"/> <action application="speak" data="flite|slt|Thanks for your query"/> <action application="lua" data="helloworld.lua ${curl_response_data}"/> </condition> </extension>
Now http://192.168.10.27/index.php this is a url on which i am sending my requests. Problem here is curl is not taking variable in the post. If instead of ${new}, i put some random static value like 256, then it is working perfectly fine but I want my users to input the values. Kindly suugest some way via which I can post variables in curl url
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/how-Curl-post-dynamic-variable... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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