Configuring request parameters with mod_xml_curl
Hi, I'm using mod_xml_curl with FS 1.4.15 -1 and I was wondering if there is a way to configure the request parameters in FS to only send a subset of all available request parameters. My use case is that my web service responding to FS only uses two out of the many possible parameters that FS sends. Over time this is filling up the debug logs with lots of noise, so I was hoping to trim this down. Does anybody know of a way to do this? Thanks, Ben
I don't think you can control what FS sends as request params. Figure out how to trim your logs better. On Mon, Jan 26, 2015 at 9:01 AM, Ben Hood <0x6e6562@gmail.com> wrote:
Hi,
I'm using mod_xml_curl with FS 1.4.15 -1 and I was wondering if there is a way to configure the request parameters in FS to only send a subset of all available request parameters.
My use case is that my web service responding to FS only uses two out of the many possible parameters that FS sends.
Over time this is filling up the debug logs with lots of noise, so I was hoping to trim this down.
Does anybody know of a way to do this?
Thanks,
Ben
_________________________________________________________________________ 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
Try enable-post-var in xml_curl, it will send only the variable you define there one per line. — Thanks, Muhammad Naseer Bhatti From: Ben Hood <0x6e6562@gmail.com> Reply: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>> Date: January 26, 2015 at 8:10:24 PM To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>> Subject: Re: [Freeswitch-users] Configuring request parameters with mod_xml_curl Thanks for the heads up. On Mon, Jan 26, 2015 at 3:31 PM, Vik Killa <vipkilla@gmail.com> wrote:
I don't think you can control what FS sends as request params. Figure out how to trim your logs better.
_________________________________________________________________________ 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
Aha - does enable-post-var also work when you're using the GET method, or do you also have to use POST to enable this? On Mon, Jan 26, 2015 at 6:49 PM, Muhammad Naseer Bhatti <nbhatti@gmail.com> wrote:
Try enable-post-var in xml_curl, it will send only the variable you define there one per line.
On Mon, Jan 26, 2015 at 8:00 PM, Ben Hood <0x6e6562@gmail.com> wrote:
Aha - does enable-post-var also work when you're using the GET method, or do you also have to use POST to enable this?
I found out by trial and error that by specifying a request parameter per enable-post-var entry, I could effectively cherry pick the request even using the GET method. For example, adding these two lines: <param name="enable-post-var" value="variable_sip_to_user"/> <param name="enable-post-var" value="variable_sip_from_user_stripped"/> Results in the following request: data: [hostname=x§ion=dialplan&tag_name=&key_name=&key_value=&variable_sip_from_user_stripped=1234567890&variable_sip_to_user=0987654321] So thank you very much for the tip off. Do you happen to know how I could even get rid of the empty tag_name, key_name and key_value request parameters?
No I don't think you can do that. Sent from my iPhone
On Jan 27, 2015, at 00:51, Ben Hood <0x6e6562@gmail.com> wrote:
On Mon, Jan 26, 2015 at 8:00 PM, Ben Hood <0x6e6562@gmail.com> wrote: Aha - does enable-post-var also work when you're using the GET method, or do you also have to use POST to enable this?
I found out by trial and error that by specifying a request parameter per enable-post-var entry, I could effectively cherry pick the request even using the GET method. For example, adding these two lines:
<param name="enable-post-var" value="variable_sip_to_user"/> <param name="enable-post-var" value="variable_sip_from_user_stripped"/>
Results in the following request:
data: [hostname=x§ion=dialplan&tag_name=&key_name=&key_value=&variable_sip_from_user_stripped=1234567890&variable_sip_to_user=0987654321]
So thank you very much for the tip off.
Do you happen to know how I could even get rid of the empty tag_name, key_name and key_value request parameters?
On Tue, Jan 27, 2015 at 8:55 AM, Muhammad Naseer Bhatti <nbhatti@gmail.com> wrote:
No I don't think you can do that.
OK, thanks for letting me know. At some stage I could look at the source to see how/whether this is controlled, but for now, your tip about enable-post-var has improved things significantly.
participants (3)
-
Ben Hood
-
Muhammad Naseer Bhatti
-
Vik Killa