[Freeswitch-users] INVITE routing problem

daemonserj TVC daemonserj at gmail.com
Fri Mar 22 11:45:21 MSK 2013


Hello!
I have experienced problem with routing incoming call from gateway to
specified user.
My configuration is one sofia endpoint with public context, one user, one
dialplan extension.
FS version is FreeSWITCH Version 1.2.7+git~20130307T181046Z~93e2a38efd (git
93e2a38 2013-03-07 18:10:46Z)

User dial string is
      <param name="dial-string" value="${sofia_contact(${dialed_user}@
${dialed_domain})}"/>
but FS route INVITE to user through gateway instead of registered user
network address.

My gateway is
    <gateway name="multifon.ru">
<param name="username" value="79231382196"/>
<param name="password" value="xxxxxxx"/>
<param name="realm" value="multifon.ru"/>
<param name="from-domain" value="multifon.ru"/>
<param name="proxy" value="sbc.megafon.ru"/>
<param name="register" value="true"/>
<!-- ... some minor params ... -->
    </gateway>

nslookup sbc.megafon.ru
Name:   sbc.megafon.ru
Address: *193.201.229.35*

sofia_contact shows
sofia_contact user/79231382196 at multifon.ru
*sofia/main_sip_profile/sip:79231382196 at 213.87.121.81:13820;ob*
that corresponding to dial-string

Here is INVITE to user while bridging:

send 1146 bytes to tcp/[*193.201.229.35*]:5060 at 07:59:21.699359:
   ------------------------------------------------------------------------
   INVITE sip:79231382196 at 213.87.121.81:13820;ob SIP/2.0
   Via: SIP/2.0/TCP 37.143.10.90:53774;branch=z9hG4bKrXprN61vgyS9K
   Route: <sip:79231382196@*193.201.229.35*
:5060;transport=tcp;lr>;tport=tcp;gw=multifon.ru
   Max-Forwards: 67
   From: "79137519015" <sip:79137519015 at 37.143.10.90>;tag=yUX4QvQKmBmHQ
   To: <sip:79231382196 at 213.87.121.81:13820;ob>

RequesURI and Route header shows destination is GW proxy.
Why is this happens?
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...

Dialplan is

<include>
  <context name="public">

    <extension name="from_multifon">
      <condition field="destination_number" expression="^79231382196$">
        <action application="set" data="ringback=${ru-ring}"/>
        <action application="set" data="transfer_ringback=$${hold_music}"/>
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="bridge" data="user/79231382196 at multifon.ru"/>
      </condition>
    </extension>

  </context>
</include>

User description is

  <domain name="multifon.ru">
    <params>
      <param name="dial-string" value="${sofia_contact(${dialed_user}@
${dialed_domain})}"/>
    </params>

    <variables>
<variable name="user_context" value="public"/>
    </variables>

    <groups>
      <group name="default">
<users>
    <user id="79231382196">
<params>
    <param name="password" value="xxxxxxxx"/>
</params>
<variables>
    <variable name="toll_allow" value="domestic,international,local"/>
    <variable name="accountcode" value="79231382196"/>
    <variable name="effective_caller_id_name" value="79231382196"/>
    <variable name="effective_caller_id_number" value="79231382196"/>
    <variable name="outbound_caller_id_name" value="79231382196"/>
    <variable name="outbound_caller_id_number" value="79231382196"/>
</variables>

</users>
      </group>
    </groups>
  </domain>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130322/c3a85e18/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list