xml_curl: initiator type
Hi all, How to indentify call initiator type (gateway or locally registered user) then freeswitch sends xml_curl dialplan request ? As i see all post variables almost same for both types.
Converting the values from mod_xml_curl into application logic is not straight forward, sometimes you have to compare multiple values in the request to determine what is happening. For example, the mod_xml_curl request for a registered gateway will be very different from that of an unregistered gateway. Same goes for registered/unregistered users. And it gets even more complicated when you throw multi tenant into the picture, as well as blind and attended transfers. At the moment there is no external library that performs this logic conversion for you - although I am working on one for Python as we speak. The best advice I can give is to keep trying, but don't expect this to be a one day job (at least, not if you do it properly). Cal On Mon, Nov 18, 2013 at 9:53 PM, vad fabi <vaad.fabi@gmail.com> wrote:
Hi all,
How to indentify call initiator type (gateway or locally registered user) then freeswitch sends xml_curl dialplan request ? As i see all post variables almost same for both types.
_________________________________________________________________________ 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
Performed some tests for registered\unregistered user and gateway, and in all cases dialplan request was almost same :( I found that for registered user POST varibale FreeSWITCH-IPv4=variable_sip_from_host always and for gateways variable_sip_from_host = "IP of gateway". I don't know is it enough for strong identifying such request belongs registered user, but it only one mark. Also i don't know how to identify dialplan request of registered and unregistered users, it still big mystery for me ... On Tue, Nov 19, 2013 at 1:14 AM, Cal Leeming [Simplicity Media Ltd] < cal.leeming@simplicitymedialtd.co.uk> wrote:
Converting the values from mod_xml_curl into application logic is not straight forward, sometimes you have to compare multiple values in the request to determine what is happening. For example, the mod_xml_curl request for a registered gateway will be very different from that of an unregistered gateway. Same goes for registered/unregistered users. And it gets even more complicated when you throw multi tenant into the picture, as well as blind and attended transfers.
At the moment there is no external library that performs this logic conversion for you - although I am working on one for Python as we speak.
The best advice I can give is to keep trying, but don't expect this to be a one day job (at least, not if you do it properly).
Cal
On Mon, Nov 18, 2013 at 9:53 PM, vad fabi <vaad.fabi@gmail.com> wrote:
Hi all,
How to indentify call initiator type (gateway or locally registered user) then freeswitch sends xml_curl dialplan request ? As i see all post variables almost same for both types.
_________________________________________________________________________ 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
_________________________________________________________________________ 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
Throw the raw XML from multiple requests into your favorite diff software (if you're using windows, then check out Beyond Compare), that will allow you to see which fields are different between requests. As mentioned before, this is not a quick/simple thing to undertake. If you do this properly you'll need to analyse multiple use cases to determine if your approach is correct. Ask yourself what it is you are trying to achieve, and determine if mod_xml_curl is the best way to do that. As much as I love mod_xml_curl, sometimes it's not the right tool for the job depending on what you are trying to do (sometimes there are easier ways). Cal On Tue, Nov 19, 2013 at 9:55 AM, vad fabi <vaad.fabi@gmail.com> wrote:
Performed some tests for registered\unregistered user and gateway, and in all cases dialplan request was almost same :( I found that for registered user POST varibale FreeSWITCH-IPv4=variable_sip_from_host always and for gateways variable_sip_from_host = "IP of gateway". I don't know is it enough for strong identifying such request belongs registered user, but it only one mark. Also i don't know how to identify dialplan request of registered and unregistered users, it still big mystery for me ...
On Tue, Nov 19, 2013 at 1:14 AM, Cal Leeming [Simplicity Media Ltd] <cal.leeming@simplicitymedialtd.co.uk> wrote:
Converting the values from mod_xml_curl into application logic is not straight forward, sometimes you have to compare multiple values in the request to determine what is happening. For example, the mod_xml_curl request for a registered gateway will be very different from that of an unregistered gateway. Same goes for registered/unregistered users. And it gets even more complicated when you throw multi tenant into the picture, as well as blind and attended transfers.
At the moment there is no external library that performs this logic conversion for you - although I am working on one for Python as we speak.
The best advice I can give is to keep trying, but don't expect this to be a one day job (at least, not if you do it properly).
Cal
On Mon, Nov 18, 2013 at 9:53 PM, vad fabi <vaad.fabi@gmail.com> wrote:
Hi all,
How to indentify call initiator type (gateway or locally registered user) then freeswitch sends xml_curl dialplan request ? As i see all post variables almost same for both types.
_________________________________________________________________________ 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
_________________________________________________________________________ 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
I just try to realize user\gateway dialplan generation based on database data fetching via xml_curl. At database there are 3 types of subscribers: 1. basic user registering at FS using login\passwd 2. gateway authenticated by ip address 3. gateway authenticated by ip address and ani So, i made some comparisons before on different user types POST requests, most of POST fields are same for all kind of endpoints user or gateway. Is it other solutions or workarounds to realize it? On Tue, Nov 19, 2013 at 1:57 PM, Cal Leeming [Simplicity Media Ltd] < cal.leeming@simplicitymedialtd.co.uk> wrote:
Throw the raw XML from multiple requests into your favorite diff software (if you're using windows, then check out Beyond Compare), that will allow you to see which fields are different between requests.
As mentioned before, this is not a quick/simple thing to undertake. If you do this properly you'll need to analyse multiple use cases to determine if your approach is correct.
Ask yourself what it is you are trying to achieve, and determine if mod_xml_curl is the best way to do that. As much as I love mod_xml_curl, sometimes it's not the right tool for the job depending on what you are trying to do (sometimes there are easier ways).
Cal
On Tue, Nov 19, 2013 at 9:55 AM, vad fabi <vaad.fabi@gmail.com> wrote:
Performed some tests for registered\unregistered user and gateway, and in all cases dialplan request was almost same :( I found that for registered user POST varibale FreeSWITCH-IPv4=variable_sip_from_host always and for gateways variable_sip_from_host = "IP of gateway". I don't know is it enough for strong identifying such request belongs registered user, but it only one mark. Also i don't know how to identify dialplan request of registered and unregistered users, it still big mystery for me ...
On Tue, Nov 19, 2013 at 1:14 AM, Cal Leeming [Simplicity Media Ltd] <cal.leeming@simplicitymedialtd.co.uk> wrote:
Converting the values from mod_xml_curl into application logic is not straight forward, sometimes you have to compare multiple values in the request to determine what is happening. For example, the mod_xml_curl request for a registered gateway will be very different from that of an unregistered gateway. Same goes for registered/unregistered users. And it gets even more complicated when you throw multi tenant into the picture, as well as blind and attended transfers.
At the moment there is no external library that performs this logic conversion for you - although I am working on one for Python as we speak.
The best advice I can give is to keep trying, but don't expect this to be a one day job (at least, not if you do it properly).
Cal
On Mon, Nov 18, 2013 at 9:53 PM, vad fabi <vaad.fabi@gmail.com> wrote:
Hi all,
How to indentify call initiator type (gateway or locally registered user) then freeswitch sends xml_curl dialplan request ? As i see all post variables almost same for both types.
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
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
participants (2)
-
Cal Leeming [Simplicity Media Ltd]
-
vad fabi