hello, i have a sip provider with multiple DID´s and they send me all calls with the same invite, only the To field in the SIP header is different. how can i read the To field in the SIP header to be able to make a call routing based on the To field? i tried the following rule but it doesnt work: --------------------- <include> <extension name="public_test1"> <condition regex="all"> <regex field="destination_number" expression="^provider1$"/> <regex field="${sip_h_To}" expression="43717072377"/> <action application="set" data="effective_caller_id_number=7021"/> <action application="set" data="effective_caller_id_name=thomas"/> <action application="answer"/> <action application="transfer" data="6011 XML inbound1 "/> </condition> </extension> ---------------- the To field in the SIP header looks like this: To: <sip:43717072377@193.43.148.37> thanks a lot for help! best regards, thomas
The standards are quite clear that To is a cosmetic header and is not to be used for any routing. Only the Request URI provides "DNIS". If your SIP provider isn't differentiating it based on the number dialed, ask them to enable that. -- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ Sent from my BlackBerry. Original Message From: thomas peterseil Sent: Friday, April 29, 2016 08:48 To: FreeSWITCH Users Help Reply To: FreeSWITCH Users Help Subject: [Freeswitch-users] "To field" in sip header hello, i have a sip provider with multiple DID´s and they send me all calls with the same invite, only the To field in the SIP header is different. how can i read the To field in the SIP header to be able to make a call routing based on the To field? i tried the following rule but it doesnt work: --------------------- <include> <extension name="public_test1"> <condition regex="all"> <regex field="destination_number" expression="^provider1$"/> <regex field="${sip_h_To}" expression="43717072377"/> <action application="set" data="effective_caller_id_number=7021"/> <action application="set" data="effective_caller_id_name=thomas"/> <action application="answer"/> <action application="transfer" data="6011 XML inbound1 "/> </condition> </extension> ---------------- the To field in the SIP header looks like this: To: <sip:43717072377@193.43.148.37> thanks a lot for help! best regards, thomas
Tell us your provider, so we can avoid it :) Le 29 avr. 2016 9:04 AM, "Alex Balashov" <abalashov@evaristesys.com> a écrit :
The standards are quite clear that To is a cosmetic header and is not to be used for any routing.
Only the Request URI provides "DNIS". If your SIP provider isn't differentiating it based on the number dialed, ask them to enable that. -- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry. Original Message From: thomas peterseil Sent: Friday, April 29, 2016 08:48 To: FreeSWITCH Users Help Reply To: FreeSWITCH Users Help Subject: [Freeswitch-users] "To field" in sip header
hello, i have a sip provider with multiple DID´s and they send me all calls with the same invite, only the To field in the SIP header is different. how can i read the To field in the SIP header to be able to make a call routing based on the To field? i tried the following rule but it doesnt work:
---------------------
<include> <extension name="public_test1"> <condition regex="all"> <regex field="destination_number" expression="^provider1$"/> <regex field="${sip_h_To}" expression="43717072377"/>
<action application="set" data="effective_caller_id_number=7021"/> <action application="set" data="effective_caller_id_name=thomas"/> <action application="answer"/> <action application="transfer" data="6011 XML inbound1 "/>
</condition> </extension>
----------------
the To field in the SIP header looks like this:
To: <sip:43717072377@193.43.148.37>
thanks a lot for help!
best regards, thomas
_________________________________________________________________________ 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
:-) If the FS instance is registering with the provider, their registrar may be doing the very RFC-compliant thing of sending the original AOR contact binding in the RURI, e.g. something like sip:line1@my.ip. However, any origination ITSP should be able to override this and put the dialed number in the RURI instead. -- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ Sent from my BlackBerry. Original Message From: Luis Daniel Lucio Quiroz Sent: Friday, April 29, 2016 09:14 To: FreeSWITCH Users Help Reply To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] "To field" in sip header
Hello I think you may add this line in your gateway configuration. <param name="extension" value="auto_to_user"/> Then you will be able to use a standard dialplan with destination_number On 29/04/2016 14:47, thomas peterseil wrote:
hello, i have a sip provider with multiple DID´s and they send me all calls with the same invite, only the To field in the SIP header is different. how can i read the To field in the SIP header to be able to make a call routing based on the To field? i tried the following rule but it doesnt work:
---------------------
<include> <extension name="public_test1"> <condition regex="all"> <regex field="destination_number" expression="^provider1$"/> <regex field="${sip_h_To}" expression="43717072377"/>
<action application="set" data="effective_caller_id_number=7021"/> <action application="set" data="effective_caller_id_name=thomas"/> <action application="answer"/> <action application="transfer" data="6011 XML inbound1 "/> </condition> </extension>
----------------
the To field in the SIP header looks like this:
To: <sip:43717072377@193.43.148.37 <mailto:sip%3A43717072377@193.43.148.37>>
thanks a lot for help!
best regards, thomas
_________________________________________________________________________ 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
hi, thanks a lot, that solved my problem! but i am still wondering if it´s possible to read and modify sip header fields with FS at inbound calls. best, thomas Am 29.04.2016 8:54 nachm. schrieb "Tanguy" <phenix@vfemail.net>:
Hello
I think you may add this line in your gateway configuration.
<param name="extension" value="auto_to_user"/>
Then you will be able to use a standard dialplan with destination_number
On 29/04/2016 14:47, thomas peterseil wrote:
hello, i have a sip provider with multiple DID´s and they send me all calls with the same invite, only the To field in the SIP header is different. how can i read the To field in the SIP header to be able to make a call routing based on the To field? i tried the following rule but it doesnt work:
---------------------
<include>
<extension name="public_test1">
<condition regex="all">
<regex field="destination_number" expression="^provider1$"/> <regex field="${sip_h_To}" expression="43717072377"/>
<action application="set" data="effective_caller_id_number=7021"/> <action application="set" data="effective_caller_id_name=thomas"/> <action application="answer"/>
<action application="transfer" data="6011 XML inbound1 "/>
</condition>
</extension>
----------------
the To field in the SIP header looks like this:
To: <sip:43717072377@193.43.148.37>
thanks a lot for help!
best regards, thomas
_________________________________________________________________________ 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
participants (4)
-
Alex Balashov
-
Luis Daniel Lucio Quiroz
-
Tanguy
-
thomas peterseil