<div dir="ltr">are you setting manual-redirect in your Sofia profile?<div><br></div><div><br></div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/Handling+SIP+Redirect">https://freeswitch.org/confluence/display/FREESWITCH/Handling+SIP+Redirect</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 4, 2017 at 10:20 AM, Lyubo Popov <span dir="ltr"><<a href="mailto:koki.roul@gmail.com" target="_blank">koki.roul@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr" style="font-size:12.8px">Hello Brian,<div><br></div><div>The authentication is DIGEST done via RADIUS. The Username is the same as the Caller ID...or maybe I understood your question wrong..? The number that shows in the from field is actually the SIP username created in the system ( for routing, billing, radius AAA, etc. ) and it is as well the callers number ( Caller ID). I use Raduis AAA to authenticate and account the calls and the user you see 551000 is actually a username of voip account created in the billing. That is why you see the incoming call from that username (551000). This is what FS is using in the FROM field. Since many of the accounts are created in format different from E164, often it is necessary to rewrite the account number ( the caller number ) to E164 or the termination will not accept the call. This is what I am trying to do now, set a rewrite rule in the billing system to convert 551000 to 1140031556 and this is what it is returned to FS as you can see in the packets the billing sends back..</div><div><br></div><div>Cheers,</div><div>L.Popov</div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 3, 2017 at 7:20 PM, Brian West <span dir="ltr"><<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Why are you using the from field for authentication?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 3, 2017 at 12:42 PM, Lyubo Popov <span dir="ltr"><<a href="mailto:koki.roul@gmail.com" target="_blank">koki.roul@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everyone,<div><br></div><div>I would like to express my thanks in advance to anyone who may be able to help me with some insides.</div><div><br></div><div>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.</div><div><br></div><div>1. Sending call to FS with Zoiper, destination 556230951662<br></div><div><div><br></div><div><div>INVITE sip:556230951662@216.x.x.x:508<wbr>0;transport=UDP SIP/2.0</div><div> Via: SIP/2.0/UDP 177.x.x.x:1048;branch=z9hG4bK-<wbr>d8754z-038f1c7d251308c2-1---d8<wbr>754z-;rport</div><div> Max-Forwards: 70</div><div> Contact: <<a href="http://sip:551000@177.41.146.98:1048" target="_blank">sip:551000@177.41.146.98:1048</a><wbr>;transport=UDP></div><div> To: <sip:556230951662@216.x.x.x:50<wbr>80;transport=UDP></div><div> From: "551000"<sip:551000@216.x.x.x:<wbr>5080;transport=UDP>;tag=25599d<wbr>20</div><div> Call-ID: NmUzYTAwNmQ1NTZjMDM2ZjVhYTgzMD<wbr>diY2RiMmI0ZTc.</div><div> CSeq: 1 INVITE</div><div> Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE</div><div> Content-Type: application/sdp</div><div> Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri</div><div> User-Agent: Zoiper for Windows 2.43 r24984</div><div> Allow-Events: presence, kpml</div><div> Content-Length: 232</div><div><br></div><div> v=0</div><div> o=Zoiper_user 0 0 IN IP4 177.x.x.x</div><div> s=Zoiper_session</div><div> c=IN IP4 177.x.x.x</div><div> t=0 0</div><div> m=audio 8000 RTP/AVP 8 0 101</div><div> a=rtpmap:8 PCMA/8000</div><div> a=rtpmap:0 PCMU/8000</div><div> a=rtpmap:101 telephone-event/8000</div><div> a=fmtp:101 0-15</div><div> a=sendrecv</div></div></div><div><br></div><div><br></div><div>2. FS sending INVITE to SIP Redirect server</div><div><br></div><div><div>INVITE sip:556230951662@69.x.x.x:5060 SIP/2.0</div><div> Via: SIP/2.0/UDP 216.245.218.230;rport;branch=z<wbr>9hG4bKateZg87rDBpZa</div><div> Max-Forwards: 69</div><div> From: "551000" <sip:551000@177.x.x.x>;tag=FeN<wbr>XS71300N0c</div><div> To: <sip:556230951662@69.x.x.x:506<wbr>0></div><div> Call-ID: e70ee145-aac6-1235-79ba-002590<wbr>a0ec9b</div><div> CSeq: 106579790 INVITE</div><div> Contact: <sip:mod_sofia@216.x.x.x:5060></div><div> User-Agent: FreeSWITCH</div><div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div> Supported: timer, path, replaces</div><div> Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div> Content-Type: application/sdp</div><div> Content-Disposition: session</div><div> Content-Length: 397</div><div> X-FS-Support: update_display,send_info</div><div> Remote-Party-ID: "551000" <sip:551000@216.x.x.x>;party=c<wbr>alling;screen=yes;privacy=off</div><div><br></div><div> v=0</div><div> o=FreeSWITCH 1493809233 1493809234 IN IP4 216.x.x.x</div><div>2017-05-03 12:15:09.816119 [ERR] mod_xml_radius.c:911 Didn't match: 69.x.x.x:5060 == ^69\.x\.x\.x</div><div> s=FreeSWITCH</div><div> c=IN IP4 216.x.x.x</div><div> t=0 0</div><div> m=audio 22476 RTP/AVP 8 0 18 101 13</div><div> a=rtpmap:8 PCMA/8000</div><div> a=rtpmap:0 PCMU/8000</div><div> a=rtpmap:18 G729/8000</div><div> a=rtpmap:101 telephone-event/8000</div><div> a=fmtp:101 0-16</div><div> a=ptime:20</div><div> m=audio 22476 RTP/AVP 4 101 13</div><div> a=rtpmap:4 G723/8000</div><div> a=rtpmap:101 telephone-event/8000</div><div> a=fmtp:101 0-16</div><div> a=ptime:30</div></div><div><br></div><div><br></div><div>3. SIP Redirect returns 300 Multiple choices with the termination IP in Contact and with FROM field as instructed ( update 551000 with 1140031556)</div><div><br></div><div><div>SIP/2.0 300 Multiple Choices</div><div> Via: SIP/2.0/UDP 216.x.x.x;rport;branch=z9hG4bK<wbr>ateZg87rDBpZa</div><div> From: "1140031556" <sip:1140031556@177.x.x.x>;tag<wbr>=FeNXS71300N0c</div><div> To: <sip:556230951662@69.x.x.x:506<wbr>0></div><div> Contact: <sip:556230951662@162.x.x.x:50<wbr>60>;q=1.00</div><div> Call-ID: e70ee145-aac6-1235-79ba-002590<wbr>a0ec9b</div><div> CSeq: 106579790 INVITE</div><div> Max-Forwards: 69</div><div> Content-Length: 0</div><div> Server: SIP Redirect Server</div></div><div><br></div><div><div><br></div></div><div>4. FS will send the call to the Termination IP WITHOUT changing the FROM field</div><div><br></div><div><div>INVITE sip:556230951662@162.x.x.x:506<wbr>0 SIP/2.0</div><div> Via: SIP/2.0/UDP 216.x.x.x;rport;branch=z9hG4bK<wbr>B37Qj3rvamcjp</div><div> Max-Forwards: 68</div><div> From: "551000" <sip:551000@216.x.x.x>;tag=gQe<wbr>pU2j7X9BKr</div><div> To: <sip:556230951662@162.x.x.x:50<wbr>60></div><div> Call-ID: e7159715-aac6-1235-79ba-002590<wbr>a0ec9b</div><div> CSeq: 106579790 INVITE</div><div> Contact: <sip:mod_sofia@216.x.x.x:5060></div><div>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\.x</div><div> User-Agent: FreeSWITCH</div><div> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div> Supported: timer, path, replaces</div><div> Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div> Content-Type: application/sdp</div><div> Content-Disposition: session</div><div> Content-Length: 397</div><div> X-FS-Support: update_display,send_info</div><div> Remote-Party-ID: "551000" <sip:551000@216.x.x.x>;party=c<wbr>alling;screen=yes;privacy=off</div><div><br></div><div> v=0</div><div> o=FreeSWITCH 1493811013 1493811014 IN IP4 216.x.x.x</div><div> s=FreeSWITCH</div><div> c=IN IP4 216.x.x.x</div><div> t=0 0</div><div> m=audio 20696 RTP/AVP 8 0 18 101 13</div><div> a=rtpmap:8 PCMA/8000</div><div> a=rtpmap:0 PCMU/8000</div><div> a=rtpmap:18 G729/8000</div><div> a=rtpmap:101 telephone-event/8000</div><div> a=fmtp:101 0-16</div><div> a=ptime:20</div><div> m=audio 20696 RTP/AVP 4 101 13</div><div> a=rtpmap:4 G723/8000</div><div> a=rtpmap:101 telephone-event/8000</div><div> a=fmtp:101 0-16</div><div> a=ptime:30</div></div><div><br></div><div>This is the dialplan I use to send calls to SIP redirect server</div><div><br></div><div><br></div><div><div><include></div><div><br></div><div><div><extension name="rejections"></div><div> <condition field="${radius_auth_result}" expression="2"></div><div> <action application="hangup" data="CALL_REJECTED"/></div><div> </condition></div><div> </extension></div><div><br></div><div> <extension name="timedouts"></div><div> <condition field="${radius_auth_result}" expression="1"></div><div> <action application="hangup" data="SWITCH_CONGESTION"/></div><div> </condition></div><div> </extension></div></div><div><br></div><div> <extension name="SIP Redirect Server"></div><div> <condition field="${radius_auth_result}" expression="0"/></div><div><br></div><div> </div><div> <condition field="destination_number" expression="^(.+)$"></div><div> <!--<action application="info"/>--></div><div> <action application="export" data="nolocal:h323-call-origin<wbr>=originate"/></div><div> <action application="set" data="sip_h_X-accountcode=${ac<wbr>countcode}" /></div><div> <action application="set" data="call_direction=outbound" /></div><div> <action application="set" data="hangup_after_bridge=true<wbr>"/></div><div> <action application="set" data="continue_on_fail=true"/></div><div> <action application="set" data="inherit_codec=true" /></div><div> <action application="set" data="call_timeout=20"/></div><div> <action application="set" data="fail_on_single_reject=US<wbr>ER_BUSY" /></div><div> <action application="set" data="origination_caller_id_na<wbr>me=${sip_req_user}"/></div><div> <action application="set" data="origination_caller_id_nu<wbr>mber=${sip_from_user}"/></div><div> <action application="set" data="execute_on_answer=sched_<wbr>hangup +${h323-credit-time} alloted_timeout" /></div><div> <action application="bridge" data="{sip_invite_from_uri=sip<wbr>:${sip_from_user}@${sip_networ<wbr>k_ip}}sofia/internal/${destina<wbr>tion_number}@69.x.x.x:5060" /></div><div> <action application="hangup" data="${bridge_hangup_cause}"/<wbr>></div><div> </condition></div><div> </extension></div><div></include</div></div><div><br></div><div>Is 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!</div><div><br></div><div><br></div><div>Best regards,</div><div><br></div><div>L. Popov</div><div><br></div><div><br></div></div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_3697358901272348976m_-5857665462692780359gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">
<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></span></font></p><p><b style="font-family:monospace,monospace;font-size:small"><i>Twitter: @FreeSWITCH , @briankwest</i></b></p><p><font size="2" face="monospace, monospace"><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a> <br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.<wbr>com</a></font></p><p><font size="2" face="monospace, monospace"><a href="https://freeswitch.com/appointment" target="_blank">Book a phone call (CST)</a><br><br>Allison prompts for FreeSWITCH:</font></p><table cellspacing="0" cellpadding="0" style="font-size:12.8px"><tbody><tr><td valign="baseline"><p><span><a href="https://www.gofundme.com/allison-prompts-for-freeswitch" target="_blank"><b>https://www.gofundme.com/allis<wbr>on-prompts-for-freeswitch</b></a></span></p></td></tr></tbody></table><p><span style="font-family:monospace,monospace;font-size:12.8px">Got Bugs? Report them </span><a href="https://freeswitch.org/jira" style="font-family:monospace,monospace;font-size:12.8px" target="_blank">here</a><span style="font-family:monospace,monospace;font-size:12.8px">! | Reddit: </span><a href="https://www.reddit.com/r/freeswitch" style="font-family:monospace,monospace;font-size:12.8px" target="_blank">/r/freeswitch</a><br></p>
<p><font size="2" face="monospace, monospace"><b>T:</b><a href="tel:(918)%20420-9001" value="+19184209001" target="_blank">+19184209001</a> | <b>F:</b><a href="tel:(918)%20420-9002" value="+19184209002" target="_blank">+19184209002</a> | <b>M:</b>+1918424WEST (9378)<br><b>Skype:</b>briankwest<br></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/<wbr>freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">
<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></span></font></p><p><b style="font-family:monospace,monospace;font-size:small"><i>Twitter: @FreeSWITCH , @briankwest</i></b></p><p><font size="2" face="monospace, monospace"><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a> <br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a></font></p><p><font size="2" face="monospace, monospace"><a href="https://freeswitch.com/appointment" target="_blank">Book a phone call (CST)</a><br><br>Allison prompts for FreeSWITCH:</font></p><table cellspacing="0" cellpadding="0" style="font-size:12.8px"><tbody><tr><td valign="baseline"><p><span><a href="https://www.gofundme.com/allison-prompts-for-freeswitch" target="_blank"><b>https://www.gofundme.com/allison-prompts-for-freeswitch</b></a></span></p></td></tr></tbody></table><p><span style="font-family:monospace,monospace;font-size:12.8px">Got Bugs? Report them </span><a href="https://freeswitch.org/jira" style="font-family:monospace,monospace;font-size:12.8px" target="_blank">here</a><span style="font-family:monospace,monospace;font-size:12.8px">! | Reddit: </span><a href="https://www.reddit.com/r/freeswitch" style="font-family:monospace,monospace;font-size:12.8px" target="_blank">/r/freeswitch</a><br></p>
<p><font size="2" face="monospace, monospace"><b>T:</b>+19184209001 | <b>F:</b>+19184209002 | <b>M:</b>+1918424WEST (9378)<br><b>Skype:</b>briankwest<br></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>