Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic "Contact" value (Read 6361 times)
Foner88
YaBB Newbies
*
Offline


Phoner is great!

Posts: 41
Joined: 19. Jul 2011
"Contact" value
26. Jul 2011 at 23:38
Print Post  
PhonerLite sends requests to SIP server with incorrect data in "Contact:" field. It contains local IP (within LAN) and not the IP, that should be used to contact to it from outside the LAN.

Example:
Wrong way - "Contact: <sip:504@192.168.1.200:5060>" 
Right way - "Contact: <sip:504@XXX.XXX.X.XXX:5060>"
Where "XXX.XXX.X.XXX" is an external IP (WAN address of the NAT router).

As a result, it didn't receive replies, sent back by server, using that local IP.

When it doesn't work?
SIP server is within LAN, let say 192.168.1.0/24, WAN IP: AA.AA.AA.AA
SIP client is within LAN, the same 192.168.1.0/24, WAN IP: BB.BB.BB.BB
In this case, e.g., SIP server will try to send replies to wrong computer within its own LAN...
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11417
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: "Contact" value
Reply #1 - 27. Jul 2011 at 07:39
Print Post  
That is not correct. Replies MUST be sent to the address within the Via header. Because the Via header generated by PhonerLite contains the "rport" parameter, the server MUST use the address the request came from. So reply message should always reach PhonerLite!

But back to the address within the Contact header. If your PC running PhonerLite is behind a router, the PC itself has no public IP address (because of NAT). So PhonerLite needs a way to retrieve that public IP address and the mapped port. There are two ways to get these information: STUN and UPnP. So please configure a STUN server, e.g. "stun.ekiga.net" or any other of the thousand available STUN servers.
  
Back to top
WWW  
IP Logged
 
Foner88
YaBB Newbies
*
Offline


Phoner is great!

Posts: 41
Joined: 19. Jul 2011
Re: "Contact" value
Reply #2 - 27. Jul 2011 at 16:00
Print Post  
Yes, indeed. Via header generated by PhonerLite contains the "rport" parameter. But it's always empty. Here is typical Via string:
Code
Select All
Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK005fb612c1b6e011b13ce1dd6943abfb;rport 


Please note that this is the whole sting, where it ends exactly with word "rport". There is no port value and there is no "received" parameter, which could contain WAN IP. PhonerLite sends all requests (REGISTER, SUBSCRIBE and INVITE) that way (with "rport" empty).

I'll try UPnP or STUN later and report back.
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11417
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: "Contact" value
Reply #3 - 27. Jul 2011 at 16:22
Print Post  
Please take a look at RFC 3581. This rport parameter has no value within request messages. The responder has to put the port value there.
  
Back to top
WWW  
IP Logged
 
Foner88
YaBB Newbies
*
Offline


Phoner is great!

Posts: 41
Joined: 19. Jul 2011
Re: "Contact" value
Reply #4 - 27. Jul 2011 at 22:08
Print Post  
Setting in configuration "UPnP NAT" changed a lot of things. As a result, in the REGISTER request local IP was replaced with WAN IP (X.X.X.X) in different places:
Code
Select All
Via: SIP/2.0/UDP X.X.X.X:5135;branch=z9hG4bK005867f4eeb6e0118006002185e6cfdf;rport
Call-ID: 007C6432-EFB6-E011-A227-002185E6CFDF@X.X.X.X
Contact: 6FD91>" 


And now SIP server can send INVITE request, using proper IP (provided WAN address).

Thanks a lot! Smiley

While it's not closely related to the topic, and because I don't want to open a new thread just to make these unimportant points, let me ask you to make some very small improvements in GUI:
  • In "Debug" window, there is context menu, that offers "Delete" (or "Cut") menu item(s), which are (at least it seems to me) always grayed. Could you please make "Delete" work. It's be helpful to watch just the recent events, related to the test, without going through sometimes a very long log (in small window) and/or restarting the PhonerLite (just to clear the log). It'd be nice to make it: 1."Delete"; 2.Test; 3.Check debug; 4. Go to p.1 again... 
  • Debug tab disappeared, when I uncheck "Options | Debug" menu item. But when I check it again, there is no "Debug" tab... I spend a lot of my time, until I discover that, when I put check at that menu item, I have to go additionally to "Help" menu and click on "Debug" there too. It's not intuitive at all...
  • "Logbook" tab keeps resetting width of its columns. For example, the "Date" column is almost x2 times wider then I need.]

I hope to see these improvements here someday Wink
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11417
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: "Contact" value
Reply #5 - 28. Jul 2011 at 13:54
Print Post  
You can delete the whole contact in the debug window by pressing the DEL key.
There are two options for debug. In options/debug you can control, if debug informations should be generated or not. In help/debug you can show the debug output or hide it. I hope you understand the difference.
Column widths are not saved until now. Sorry.
  
Back to top
WWW  
IP Logged
 
Foner88
YaBB Newbies
*
Offline


Phoner is great!

Posts: 41
Joined: 19. Jul 2011
Re: "Contact" value
Reply #6 - 28. Jul 2011 at 20:40
Print Post  
Thanks for the nice tip with DEL key. I promise, I'll use it quite often since now Smiley

I may see the difference, but I don't see the point of generating debug information and not showing that Wink If I want to debug, I usually want to see that debug information too Smiley
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11417
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: "Contact" value
Reply #7 - 29. Jul 2011 at 13:16
Print Post  
Foner88 wrote on 28. Jul 2011 at 20:40:
I may see the difference, but I don't see the point of generating debug information and not showing that Zwinkernd If I want to debug, I usually want to see that debug information too Smiley

That is your interpretation. Normally a user don't want so see that debug stuff. But after any failure he can set the debug tab visible to send me any information. All that traces are done in background. That is normal behavior of other applications too. For some special cases (like high traffic tests) you can disable debug completely.
  
Back to top
WWW  
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11417
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: "Contact" value
Reply #8 - 30. Jul 2011 at 09:11
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint