<div>Hello!</div><div>I have experienced problem with routing incoming call from gateway to specified user.</div><div>My configuration is one sofia endpoint with public context, one user, one dialplan extension.</div><div>
FS version is FreeSWITCH Version 1.2.7+git~20130307T181046Z~93e2a38efd (git 93e2a38 2013-03-07 18:10:46Z)</div><div><br></div><div>User dial string is</div><div> <font face="courier new, monospace"><param name="dial-string" value="${sofia_contact(${dialed_user}@${dialed_domain})}"/></font></div>
<div>but FS route INVITE to user through gateway instead of registered user network address.</div><div><br></div><div>My gateway is</div><div><font face="courier new, monospace"> <gateway name="<a href="http://multifon.ru">multifon.ru</a>"></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span><param name="username" value="79231382196"/></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span><param name="password" value="xxxxxxx"/></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span><param name="realm" value="<a href="http://multifon.ru">multifon.ru</a>"/></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span><param name="from-domain" value="<a href="http://multifon.ru">multifon.ru</a>"/></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span><param name="proxy" value="<a href="http://sbc.megafon.ru">sbc.megafon.ru</a>"/></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span><param name="register" value="true"/></font></div><div><font face="courier new, monospace"><!--<span class="Apple-tab-span" style="white-space:pre">        </span>... some minor params ... --></font></div>
<div><font face="courier new, monospace"> </gateway></font></div><div><br></div><div>nslookup <a href="http://sbc.megafon.ru">sbc.megafon.ru</a></div><div>Name: <a href="http://sbc.megafon.ru">sbc.megafon.ru</a></div>
<div>Address: <b><font color="#ff0000">193.201.229.35</font></b></div><div><br></div><div>sofia_contact shows </div><div>sofia_contact user/<a href="mailto:79231382196@multifon.ru">79231382196@multifon.ru</a></div><div><font color="#006600"><b>sofia/main_sip_profile/sip:79231382196@213.87.121.81:13820;ob</b></font></div>
<div>that corresponding to dial-string</div><div><br></div><div>Here is INVITE to user while bridging:</div><div><br></div><div><font face="courier new, monospace">send 1146 bytes to tcp/[<b><font color="#ff0000">193.201.229.35</font></b>]:5060 at 07:59:21.699359:</font></div>
<div><font face="courier new, monospace"> ------------------------------------------------------------------------</font></div><div><font face="courier new, monospace"> INVITE sip:79231382196@213.87.121.81:13820;ob SIP/2.0</font></div>
<div><font face="courier new, monospace"> Via: SIP/2.0/TCP 37.143.10.90:53774;branch=z9hG4bKrXprN61vgyS9K</font></div><div><font face="courier new, monospace"> Route: <sip:79231382196@<b><font color="#ff0000">193.201.229.35</font></b>:5060;transport=tcp;lr>;tport=tcp;gw=<a href="http://multifon.ru">multifon.ru</a></font></div>
<div><font face="courier new, monospace"> Max-Forwards: 67</font></div><div><font face="courier new, monospace"> From: "79137519015" <<a href="mailto:sip%3A79137519015@37.143.10.90">sip:79137519015@37.143.10.90</a>>;tag=yUX4QvQKmBmHQ</font></div>
<div><font face="courier new, monospace"> To: <sip:79231382196@<font color="#009900">213.87.121.81</font>:13820;ob></font></div><div><br></div><div>RequesURI and Route header shows destination is GW proxy.</div><div>
Why is this happens?</div><div>I think it is able to play with sip_invite_req_uri and/or sip_invite_route_uri variables and so on but i think it is a wrong way...</div><div><br></div><div>Dialplan is</div><div><br></div><div>
<font face="courier new, monospace"><include></font></div><div><font face="courier new, monospace"> <context name="public"></font></div><div><font face="courier new, monospace"><br></font></div><div>
<font face="courier new, monospace"> <extension name="from_multifon"></font></div><div><font face="courier new, monospace"> <condition field="destination_number" expression="^79231382196$"></font></div>
<div><font face="courier new, monospace"> <action application="set" data="ringback=${ru-ring}"/></font></div><div><font face="courier new, monospace"> <action application="set" data="transfer_ringback=$${hold_music}"/></font></div>
<div><font face="courier new, monospace"> <action application="set" data="hangup_after_bridge=true"/></font></div><div><font face="courier new, monospace"> <action application="bridge" data="user/<a href="mailto:79231382196@multifon.ru">79231382196@multifon.ru</a>"/></font></div>
<div><font face="courier new, monospace"> </condition></font></div><div><font face="courier new, monospace"> </extension></font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> </context></font></div>
<div><font face="courier new, monospace"></include></font></div><div><br></div><div>User description is</div><div><br></div><div><font face="courier new, monospace"> <domain name="<a href="http://multifon.ru">multifon.ru</a>"></font></div>
<div><font face="courier new, monospace"> <params></font></div><div><font face="courier new, monospace"> <param name="dial-string" value="${sofia_contact(${dialed_user}@${dialed_domain})}"/></font></div>
<div><font face="courier new, monospace"> </params></font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> <variables></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span><variable name="user_context" value="public"/></font></div>
<div><font face="courier new, monospace"> </variables></font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> <groups></font></div><div><font face="courier new, monospace"> <group name="default"></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span><users></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span> <user id="79231382196"></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span><params></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span> <param name="password" value="xxxxxxxx"/></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span></params></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span><variables></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span> <variable name="toll_allow" value="domestic,international,local"/></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span> <variable name="accountcode" value="79231382196"/></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span> <variable name="effective_caller_id_name" value="79231382196"/></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span> <variable name="effective_caller_id_number" value="79231382196"/></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span> <variable name="outbound_caller_id_name" value="79231382196"/></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span> <variable name="outbound_caller_id_number" value="79231382196"/></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">                </span></variables></font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span></users></font></div>
<div><font face="courier new, monospace"> </group></font></div><div><font face="courier new, monospace"> </groups></font></div><div><font face="courier new, monospace"> </domain></font></div><div>
<br></div>