[Freeswitch-users] when using xml_curl, the sofia cannot find user spesific gateway

Donny Hardyanto hardyanto.donny at gmail.com
Sat Oct 19 12:47:17 MSD 2013


Hi,

FIrst I want to thank you to all member of freeswitch developer team.
Freeswitch Rocks!
You all have done terrific job! :)

I have buy and read all the 3 Freeswitch books.
Hopefully there will be another Freeswitch book that can uncover all the
hidden  features. The current books still only scratch the surface.



I am now currently using freeswitch to do a surrogate client registration.
The operator softswitch that I am connecting the freeswitch into require
that all my freeswitch clients registered with them, otherwise it cannot
receive the call from the softswitch. The problem is the client is dynamic
and required that when client is not registered with the freeswitch, they
must not registered with the operator softswitch. So only when the client
is registered with the freeswitch, they must also registered with the
softswitch, and when they are not, they also must not registered with the
softswitch.

For that problem I cannot use SIP trunking to the operator softswitch. I
turn to xml_curl module and also read that the user can have own gateway on
directory (from freeswitch web documentation). So I think i can use this as
surrogate client registration.

So I create this xml to be returned when xml_curl request the user data for
registration:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
 <section name="directory">
  <domain name="xxxx.net">
   <groups>
    <group name="default">
     <users>
      <user id="1682112207445">
        <gateways>
       <gateway name="gw_1682112207445">
        <param name="username" value="1682112207445"/>
         <param name="realm" value="yyyyy.net" />
        <param name="password" value="1234"/>
        <param name="caller-id-in-from" value="false"/>
        <param name="extension" value="1682112207445"/>
        <param name="proxy" value="aaa.bbb.ccc.ddd" />
        <param name="register-proxy" value="aaa.bbb.ccc.ddd" />
          <param name="expire-seconds" value="30"/>
         <param name="register" value="true"/>
          <param name="retry-seconds" value="30"/>
           <param name="register-transport" value="udp"/>
          </gateway>
        </gateways>
       <params>
        <param name="password" value="vn2013"/>
        <param name="dial-string" value="{presence_id=${dialed_user}@
${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
       </params>
       <variables>
        <variable name="user_context" value="default"/>
        <variable name="register-gateway" value="gw_1682112207445"/>
       </variables>
      </user>
     </users>
    </group>
   </groups>
  </domain>
 </section>
</document>

The user register with freeswitch, and then freeswitch tried to register
the gw_1682112207445, and complain it cannot find the gw_1682112207445.

nta.c:2791 agent_recv_request() nta: received REGISTER sip:xxxx.net SIP/2.0
(CSeq 260)
nta.c:3078 agent_check_request_via() nta: Via check: received=182.4.88.15
nta.c:2990 agent_recv_request() nta: REGISTER (260) going to a default leg
2013-10-19 15:42:22.468092 [CONSOLE] mod_xml_curl.c:318 XML response is in
/tmp/5f331fdc-389a-11e3-8e18-618d0dd75901.tmp.xml
*2013-10-19 15:42:22.468092 [WARNING] sofia_reg.c:2851 Gateway
'gw_1682112207445' not found.*

Is the user gateway is not supported on xml_curl or I am missing something?

Regards,

Donny Hardyanto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131019/d380d1b6/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list