[Freeswitch-users] 答复: Issue with changing phone SIP port

何小春Spring spring.he at polylink.net
Tue Jun 4 05:11:09 MSD 2013


Hi,
Try add ‘sip-force-contact’ to your user
<variable name="sip-force-contact" value="NDLB-connectile-dysfunction"/>


Spring He

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Polylink Holdings, Inc.
391 Guiping Road, STE701, Tower B
New Cao He Jing Int'I Business Center
Shanghai, 200233
China

Main    +86.21.5465.6777 ext. 654
Fax     +86.21.5465.4222
Email   spring.he at polylink.net<mailto:robert at polylink.net>

发件人: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] 代表 Oleg Stolyar
发送时间: 2013年6月4日 4:32
收件人: FreeSWITCH Users Help
主题: [Freeswitch-users] Issue with changing phone SIP port

Hi guys,

I ran into the following problem recently:

Using a softphone from a computer behind a NAT I register it with FreeSWITCH.
It registers with a certain port in the Contact header.  FreeSWITCH stores this port in the user's registration info and uses it from then on to send messages to the phone.

However, for some reason FreeSWITCH initially sends back an "Unauthorized" response.  After that some phones seem to send REGISTER again but with a different port.
This only happen if the phone is behind a NAT.  If FreeSWITCH is on the same network as the phone, the phone keeps the same port.

FreeSWITCH ignores that and keeps trying to contact the phone on the old port and of course fails.

Only some phones seem to change their port after registration.  They include 3CXPhone, X-Lite.
Phones that don't do this are MicroSIP and Mizu.

I have a wireshark capture file of the session from the softphone machine if anyone would like, I'll be happy to email it or publish it.

So, I have three questions:
1. Why does FreeSWITCH initially send "Unauthorized" reply?
2. Does anyone know why some phones change their port during registration from behind a NAT?
3. Should I file a Jira ticket to have FreeSWITCH change UA's registered contact info when the UA sends a message with a different Contact header?


Thank you
Oleg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130604/52653701/attachment.html 


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