Author Topic: Yate SIP server with OBI100: cannot REGISTER from WAN  (Read 3818 times)

lakrimas

  • Newbie
  • *
  • Posts: 2
    • View Profile
Yate SIP server with OBI100: cannot REGISTER from WAN
« on: July 18, 2013, 09:58:40 AM »
I am trying to setup a Yate SIP server on my OpenWrt router to serve a few OBIHAI obi100 ATA devices. With apologies for my noobishness in the telephony field, I am afraid I need some help setting this up. I understand that Yate is not quite a SIP proxy, but I was hoping I can use still use it as SIP registrar server and somehow simulate a proxy in the sense of taking care of NAT traversal etc. between these ATA devices. Well so far I cannot even get a remote obi100 (one which is outside my LAN) to SIP REGISTER with Yate over internet - I keep getting "SIP/2.0 401 Unauthorized" responses, and the ATA device never gets to send the "Authorization" info.
Please note the same ATA device registers OK, sending the Authorization data properly, if I put it inside my LAN and I set its SIP Proxy address to be the LAN IP of the Yate server (though I suspect I'll have some problems down the road as I can see only LAN IPs everywhere in the SIP identities and Via headers and Yate doesn't seem to detect NAT at all in this configuration; but let's focus on why the remote ATA device cannot register with Yate when it's outside my LAN).
Obviously I have the necessary ports open in my firewall to accept connections on 5060 etc. Below please find the message exchange from Yate's log when the remote device tries to register (let's say the dynamic dns name for my router is "my.dyndns.org", which I set up in the remote ATA as the SIP Proxy server name, and the username for the SIP account is "300" as set up in accfile.conf; the remote ATA is also inside a LAN and its public IP is 69.20.121.31 (not the real IP, just an example)):


------
<sip:INFO> 'udp:0.0.0.0:5060' received 542 bytes SIP message from 69.20.121.31:5060 [0xaec940]
------
REGISTER sip:my.dyndns.org:5060 SIP/2.0
Call-ID: 4be077c1@192.168.55.140
Content-Length: 0
CSeq: 47653 REGISTER
From: "yateGeo3" <sip:300@my.dyndns.org>;tag=SP1442837331b00ade4
Max-Forwards: 70
To: "yateGeo3" <sip:300@my.dyndns.org>
Via: SIP/2.0/UDP 192.168.55.140:5060;branch=z9hG4bK-4d677360;rport
User-Agent: OBIHAI/OBi100-1.3.0.2776
Contact: "yateGeo3" <sip:300@192.168.55.140:5060>;expires=60;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1165f4>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

------
<sip:INFO> 'udp:0.0.0.0:5060' sending code 401 0xaf9730 to 69.20.121.31:5060 [0xaec940]
------
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.55.140:5060;branch=z9hG4bK-4d677360;rport=5060;received=69.20.121.31
From: "yateGeo3" <sip:300@my.dyndns.org>;tag=SP1442837331b00ade4
To: "yateGeo3" <sip:300@my.dyndns.org>
Call-ID: 4be077c1@192.168.55.140
CSeq: 47653 REGISTER
WWW-Authenticate: Digest realm="Yate", nonce="8811b75e6220c3e0e0529b6cff5a57c9.1374124694", stale=FALSE, algorithm=MD5
Server: YATE/4.3.0
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Length: 0

------
<sip:INFO> 'udp:0.0.0.0:5060' received 542 bytes SIP message from 69.20.121.31:5060 [0xaec940]
------
REGISTER sip:my.dyndns.org:5060 SIP/2.0
Call-ID: 4be077c1@192.168.55.140
Content-Length: 0
CSeq: 47653 REGISTER
From: "yateGeo3" <sip:300@my.dyndns.org>;tag=SP1442837331b00ade4
Max-Forwards: 70
To: "yateGeo3" <sip:300@my.dyndns.org>
Via: SIP/2.0/UDP 192.168.55.140:5060;branch=z9hG4bK-4d677360;rport
User-Agent: OBIHAI/OBi100-1.3.0.2776
Contact: "yateGeo3" <sip:300@192.168.55.140:5060>;expires=60;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1165f4>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

------
<sip:INFO> 'udp:0.0.0.0:5060' sending code 401 0xaf9730 to 69.20.121.31:5060 [0xaec940]
------
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.55.140:5060;branch=z9hG4bK-4d677360;rport=5060;received=69.20.121.31
From: "yateGeo3" <sip:300@my.dyndns.org>;tag=SP1442837331b00ade4
To: "yateGeo3" <sip:300@my.dyndns.org>
Call-ID: 4be077c1@192.168.55.140
CSeq: 47653 REGISTER
WWW-Authenticate: Digest realm="Yate", nonce="8811b75e6220c3e0e0529b6cff5a57c9.1374124694", stale=FALSE, algorithm=MD5
Server: YATE/4.3.0
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Length: 0





« Last Edit: July 18, 2013, 10:08:27 AM by lakrimas »

lakrimas

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Yate SIP server with OBI100: cannot REGISTER from WAN
« Reply #1 on: July 19, 2013, 08:48:27 AM »
Just a correction for the above and a minor update - obviously the SIP registration accounts I created are in regfile.conf, not accfile.conf as I erroneously mentioned in the message above.
However, reading around the forum it looks like the problem might be related to the way the IPs are written in the SIP messages/headers by the remote SIP client (the OBI100 ATA device). Since Yate cannot act like a SIP proxy it cannot rewrite these IPs, so I suppose they are expected to come prepared correctly by the ATA device, or perhaps by a SIP proxy? Also, I know I have the option to configure the use of a STUN server in these ATA devices - but I tried that and it didn't seem to help..
Interestingly enough, a Yate client as a remote SIP client seems to allow SIP registration to my Yate SIP server, so it's clearly something weird in the SIP messages coming from these obi100 devices when they are outside the LAN.

So my next question would be: is there any way to force Yate to modify/correct these SIP headers (perhaps in the response?) and somehow be able to continue the registration process for the remote device? The frustrating part is that it seems to me that all the needed info (local IP, public IP) is there in those headers when the request comes from the SIP device..

If Yate cannot do that, perhaps I should install a minimal SIP proxy (something like siproxd) to try to get around this problem? Any advice would be greatly appreciated..