[asterisk-users] Not registering Port with VSP
Davy Chan
chandave at cse.ust.hk
Thu Mar 1 02:17:36 MST 2007
**>All,
**>
**>I'm guessing no one knows the answer as to why when I register with a
**>VSP I am not sending a Port number with the registration but only my IP
**>address. If anyone has any answers it would be greatly appreciated.
**>
**>From: asterisk-users-bounces at lists.digium.com
**>[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
**>Klaverstyn, David C
**>Sent: Wednesday, 28 February 2007 11:08 AM
**>To: Asterisk Users Mailing List - Non-Commercial Discussion
**>Subject: [asterisk-users] Not registering Port with VSP
**>
**>Hello All,
**>
**>For some reason my asterisk server is not registering a port number with
**>my VSPs. This is causing problems where people are not able to dial in
**>from any of my SIP or IAX VSPs.
**>
**>I do have one VSP that has hard coded my IP and port so I can get
**>incoming calls but this still leaves a problem with my other VSPs.
**>
**>Hose can I get asterisk to register my IP and port? I have been told
**>that my asterisk server is registering my IP with the VSP but the port
**>is empty.
Asterisk uses IPv4 addresses when constructing the SIP "Contact:"
header. As a result, it can omit the port declaration if Asterisk
is using UDP port 5060. It can do this since an IPv4 address
will never resolve to DNS SRV query (thereby bypassing a sticky
situation illustrated in RFC 3261 Section 19.1.4 paragraph 9).
Your VSP's software should assume UDP port 5060 for your port
if you don't explicitly declare it.
If your VSP really has such a restrictive SIP Registrar, then you
have 2 choices to force a port declaration by Asterisk:
1) Edit channels/chan_sip.c:build_contact() and remove the check
to see if the port used by Asterisk is 5060.
2) Change the port Asterisk uses for SIP. This is accomplished by
adding a "bindport=####" where "####" is the decimal number
of another port besides 5060. Since the new port is not
5060, Asterisk will explicitly declare the new port in
the "Contact:" header.
If you choose to use option 2) then you will need to inform the VSP that
has your IP/Port hardcoded to update their contact info. Additionally,
if you had any Port Forwarding setup on your Router/NAT device, you
will need to update that information as well.
See ya...
d.c.
More information about the asterisk-users
mailing list