Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
registrar adress based on via header?
Author Message
CastB
Brekeke Addict


Joined: 05 Feb 2011
Posts: 32
Location: the Netherlands

PostPosted: Tue May 01, 2012 5:02 am    Post subject: registrar adress based on via header? Reply with quote

1. Brekeke Product Name and version: BSS 2.4.7.3/286.1

2. Java version: 1.6.0_17

3. OS type and the version: 2.6.18-194.32.1.el5.centos.plus

4. UA (phone), gateway or other hardware/software involved: softphone

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html : server at the public, client on vpn

6. Your problem: wrong register address


We're trying to connect a call through a VPN. At the client i now have two ip adresses available:
- 172.28.28.67 (IP adress ethernet)
- 172.29.0.10 (Ip adress VPN)

SIP registering succeeds through the VPN, however during a call the a/v
packets are sent to the wrong IP by the sip server.

When I look at the registered clients at the sip server, the server thinks my
contact uri is sip:user@172.28.28.67:6022 (IP address ethernet). We
think it should be 172.29.0.10 (IP address VPN).

Below is SIP registration message from Wireshark generated by the client.
The Via header contains the 172.28 address, the Contact header contains the
172.29 address.

It seems the contact URI in the registrar database is based on the Via header not on the Contact header. Although the information in the Via header may be incorrect, which is a client thing, it suprises me that the Registrar database uses the Via header.

So my question: how does this work on BKK sip server? Is it correct that the via header is used as contact uri for the Registrar database?

Thanks


Via: SIP/2.0/UDP 172.28.28.76:6022;rport;branch=z9hG4bK89646238
From: <sip:user@mydomain>;tag=597456652
To: <sip:user@mydomain>
Call-ID: 1127362553
CSeq: 1 REGISTER
Contact: <sip:user@172.29.0.10:6022;line=037fcc4cf772075>
Max-Forwards: 70
User-Agent: softphone
Expires: 1800
Supported: 100rel
Content-Length: 0
Back to top
View user's profile
Harold
Brekeke Master Guru


Joined: 21 Sep 2008
Posts: 289
Location: Japan

PostPosted: Tue May 01, 2012 5:30 pm    Post subject: Reply with quote

Execute Wireshark on SIP Server's PC to capture REGISTER packets sent from UA. And check the remote IP address of UA.
I suppose it is 172.28 not 172.29.

It means the softphone didn't recognize its interface IP address.

Which softphone product are you using?
Try another one. It will be better.
Back to top
View user's profile
CastB
Brekeke Addict


Joined: 05 Feb 2011
Posts: 32
Location: the Netherlands

PostPosted: Thu May 03, 2012 8:17 am    Post subject: Reply with quote

Hi,

The remote IP address of UA is correct. It is the 172.29 address, see trace below and this detail in particular:

172.29.0.6.6022 > 172.29.0.1.5070: UDP, length 443

So, i still assume that BKK uses the VIA header for the contact URI at registration. Is that assumption correct?



Full server trace
------------------------
[root@cbcs04 ~]# tcpdump -nn -i tun0 -A -e -v udp port 5070 and net 172.29.0.0/24
tcpdump: WARNING: arptype 65534 not supported by libpcap - falling back to cooked socket
tcpdump: listening on tun0, link-type LINUX_SLL (Linux cooked), capture size 96 bytes
16:08:58.442082 In ethertype IPv4 (0x0800), length 487: (tos 0x0, ttl 128, id 1389, offset 0, flags [none], proto: UDP (17), length: 471) 172.29.0.6.6022 > 172.29.0.1.5070: UDP, length 443
E....m.....g................REGISTER sip:172.29.0.1:5070 SIP/2.0
Via: SIP/2.0/U
16:08:58.442576 Out ethertype IPv4 (0x0800), length 365: (tos 0x4, ttl 64, id 0, offset 0, flags [DF], proto: UDP (17), length: 349) 172.29.0.1.5070 > 172.29.0.6.6022: UDP, length 321
E..]..@.@..J.............I&wSIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.28.28.76:60
16:08:58.442670 Out ethertype IPv4 (0x0800), length 509: (tos 0x4, ttl 64, id 0, offset 0, flags [DF], proto: UDP (17), length: 493) 172.29.0.1.5070 > 172.29.0.6.6022: UDP, length 465
E.....@.@...................SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.28.28
16:08:58.734675 In ethertype IPv4 (0x0800), length 703: (tos 0x0, ttl 128, id 1391, offset 0, flags [none], proto: UDP (17), length: 687) 172.29.0.6.6022 > 172.29.0.1.5070: UDP, length 659
E....o....................NhREGISTER sip:172.29.0.1:5070 SIP/2.0
Via: SIP/2.0/U
16:08:58.734873 Out ethertype IPv4 (0x0800), length 365: (tos 0x4, ttl 64, id 0, offset 0, flags [DF], proto: UDP (17), length: 349) 172.29.0.1.5070 > 172.29.0.6.6022: UDP, length 321
E..]..@.@..J.............I(.SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.28.28.76:60
16:08:58.742414 Out ethertype IPv4 (0x0800), length 512: (tos 0x4, ttl 64, id 0, offset 0, flags [DF], proto: UDP (17), length: 496) 172.29.0.1.5070 > 172.29.0.6.6022: UDP, length 468
E.....@.@...................SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.28.28.76:6022;r
Back to top
View user's profile
Harold
Brekeke Master Guru


Joined: 21 Sep 2008
Posts: 289
Location: Japan

PostPosted: Thu May 03, 2012 6:46 pm    Post subject: Reply with quote

When you make a call to the softphone, does the SIP server forward the INVITE to 172.29.0.6?
If so, you don't have to care about registration.
I think your problem is in RTP packets which sent to wrong destination.


Which softphone product are you using?
If you try another one such as X-Lite, does the same problem happen?
Back to top
View user's profile
CastB
Brekeke Addict


Joined: 05 Feb 2011
Posts: 32
Location: the Netherlands

PostPosted: Tue May 08, 2012 4:26 am    Post subject: Reply with quote

Thanks for your anwser!

If i use another softphone the registration is correct. The ONLY difference i see is in the VIA header.

We are able to make it work on our softphone by rewriting the address in the VIA header.

However my question still is: Does BKK use the VIA header for the contact URI at registration?? (If that is true then the situation is solved, otherwise i have to dig deeper).

Can someone anwser that question?
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Wed May 09, 2012 10:34 am    Post subject: Reply with quote

For NAT traversal, Brekeke SIP Server tunes the REGISTER's Contact address automatically to reach the UA. It works with most of SIP UA products.

For your softphone, you may need to have the following variable in the [Configuration] > [Advanced] page.
-------------------
register.contact.remote=true
-------------------
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1