Why are you using the from field for authentication?On Wed, May 3, 2017 at 12:42 PM, Lyubo Popov <koki.roul@gmail.com> wrote:Hello everyone,I would like to express my thanks in advance to anyone who may be able to help me with some insides.I am using a routing software with SIP Redirect to send routes to FS with 300 Multiple Choices and mod_xml_radius to authenticate the SIP users. In the Sip redirect server I am manipulating as well the FROM number and sending back to FS, but FS will not respect this and continue using the SIP account that sent the call in the first place in the FROM field. Here are some SIP packets from both sides to clarify the whole process.1. Sending call to FS with Zoiper, destination 556230951662INVITE sip:556230951662@216.x.x.x:5080;transport=UDP SIP/2.0 Via: SIP/2.0/UDP 177.x.x.x:1048;branch=z9hG4bK-d8754z-038f1c7d251308c2-1---d8 754z-;rport Max-Forwards: 70Contact: <sip:551000@177.41.146.98:1048;transport=UDP> To: <sip:556230951662@216.x.x.x:5080;transport=UDP> From: "551000"<sip:551000@216.x.x.x:5080;transport=UDP>;tag=25599d 20 Call-ID: NmUzYTAwNmQ1NTZjMDM2ZjVhYTgzMDdiY2RiMmI0ZTc. CSeq: 1 INVITEAllow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBEContent-Type: application/sdpSupported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuriUser-Agent: Zoiper for Windows 2.43 r24984Allow-Events: presence, kpmlContent-Length: 232v=0o=Zoiper_user 0 0 IN IP4 177.x.x.xs=Zoiper_sessionc=IN IP4 177.x.x.xt=0 0m=audio 8000 RTP/AVP 8 0 101a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-15a=sendrecv2. FS sending INVITE to SIP Redirect serverINVITE sip:556230951662@69.x.x.x:5060 SIP/2.0Via: SIP/2.0/UDP 216.245.218.230;rport;branch=z9hG4bKateZg87rDBpZa Max-Forwards: 69From: "551000" <sip:551000@177.x.x.x>;tag=FeNXS71300N0c To: <sip:556230951662@69.x.x.x:5060> Call-ID: e70ee145-aac6-1235-79ba-002590a0ec9b CSeq: 106579790 INVITEContact: <sip:mod_sofia@216.x.x.x:5060>User-Agent: FreeSWITCHAllow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBESupported: timer, path, replacesAllow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, referContent-Type: application/sdpContent-Disposition: sessionContent-Length: 397X-FS-Support: update_display,send_infoRemote-Party-ID: "551000" <sip:551000@216.x.x.x>;party=calling;screen=yes;privacy=off v=0o=FreeSWITCH 1493809233 1493809234 IN IP4 216.x.x.x2017-05-03 12:15:09.816119 [ERR] mod_xml_radius.c:911 Didn't match: 69.x.x.x:5060 == ^69\.x\.x\.xs=FreeSWITCHc=IN IP4 216.x.x.xt=0 0m=audio 22476 RTP/AVP 8 0 18 101 13a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=rtpmap:18 G729/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=ptime:20m=audio 22476 RTP/AVP 4 101 13a=rtpmap:4 G723/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=ptime:303. SIP Redirect returns 300 Multiple choices with the termination IP in Contact and with FROM field as instructed ( update 551000 with 1140031556)SIP/2.0 300 Multiple ChoicesVia: SIP/2.0/UDP 216.x.x.x;rport;branch=z9hG4bKateZg87rDBpZa From: "1140031556" <sip:1140031556@177.x.x.x>;tag=FeNXS71300N0c To: <sip:556230951662@69.x.x.x:5060> Contact: <sip:556230951662@162.x.x.x:5060>;q=1.00 Call-ID: e70ee145-aac6-1235-79ba-002590a0ec9b CSeq: 106579790 INVITEMax-Forwards: 69Content-Length: 0Server: SIP Redirect Server4. FS will send the call to the Termination IP WITHOUT changing the FROM fieldINVITE sip:556230951662@162.x.x.x:5060 SIP/2.0 Via: SIP/2.0/UDP 216.x.x.x;rport;branch=z9hG4bKB37Qj3rvamcjp Max-Forwards: 68From: "551000" <sip:551000@216.x.x.x>;tag=gQepU2j7X9BKr To: <sip:556230951662@162.x.x.x:5060> Call-ID: e7159715-aac6-1235-79ba-002590a0ec9b CSeq: 106579790 INVITEContact: <sip:mod_sofia@216.x.x.x:5060>2017-05-03 12:15:09.856127 [ERR] mod_xml_radius.c:914 Result of true match: 162.x.x.x:5060 == ^69\.x\.x\.xUser-Agent: FreeSWITCHAllow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBESupported: timer, path, replacesAllow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, referContent-Type: application/sdpContent-Disposition: sessionContent-Length: 397X-FS-Support: update_display,send_infoRemote-Party-ID: "551000" <sip:551000@216.x.x.x>;party=calling;screen=yes;privacy=off v=0o=FreeSWITCH 1493811013 1493811014 IN IP4 216.x.x.xs=FreeSWITCHc=IN IP4 216.x.x.xt=0 0m=audio 20696 RTP/AVP 8 0 18 101 13a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=rtpmap:18 G729/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=ptime:20m=audio 20696 RTP/AVP 4 101 13a=rtpmap:4 G723/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=ptime:30This is the dialplan I use to send calls to SIP redirect server<include><extension name="rejections"><condition field="${radius_auth_result}" expression="2"><action application="hangup" data="CALL_REJECTED"/></condition></extension><extension name="timedouts"><condition field="${radius_auth_result}" expression="1"><action application="hangup" data="SWITCH_CONGESTION"/></condition></extension><extension name="SIP Redirect Server"><condition field="${radius_auth_result}" expression="0"/><condition field="destination_number" expression="^(.+)$"><!--<action application="info"/>--><action application="export" data="nolocal:h323-call-origin=originate"/> <action application="set" data="sip_h_X-accountcode=${accountcode}" /> <action application="set" data="call_direction=outbound" /><action application="set" data="hangup_after_bridge=true"/> <action application="set" data="continue_on_fail=true"/><action application="set" data="inherit_codec=true" /><action application="set" data="call_timeout=20"/><action application="set" data="fail_on_single_reject=USER_BUSY" /> <action application="set" data="origination_caller_id_name=${sip_req_user}"/> <action application="set" data="origination_caller_id_number=${sip_from_user}"/> <action application="set" data="execute_on_answer=sched_hangup +${h323-credit-time} alloted_timeout" /> <action application="bridge" data="{sip_invite_from_uri=sip:${sip_from_user}@${sip_networ k_ip}}sofia/internal/${destina tion_number}@69.x.x.x:5060" /> <action application="hangup" data="${bridge_hangup_cause}"/> </condition></extension></includeIs there any variable that will force FS to change the FROM field as returned by the SIP Redirect server and send it to the termination provider? Any help on this is really greatly appreciated!Best regards,L. Popov
____________________________________________________________ _____________
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-user s
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/ freeswitch-users
http://www.freeswitch.org--Brian West
brian@freeswitch.orgTwitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com Book a phone call (CST)
Allison prompts for FreeSWITCH:
Got Bugs? Report them here! | Reddit: /r/freeswitch
T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
Skype:briankwest
____________________________________________________________ _____________
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