Register => 2345:password@sip_proxy doesn't care about po

Hi,

to register my Asterisk with a SIP provider I use the following syntax, as shown in the default sip.conf:

register => 2345:password@sip_proxy

where

[sip_proxy]
type=peer
context=from-messagenet
host=sip.messagenet.it
port=5061 <------------- please note this one!!!

Well, “sip show registry” shows:
Host Username Refresh State
sip_proxy:5060 ******* 105 Registered
------------^^^^

As you can see, Asterisk didn’t care about port value 5061.

However, “sip show peer sip_proxy” shows:
ToHost : sip.messagenet.it
Addr->IP : 212.97.59.76 Port 5061
-------------------------------------^^^^

What is wrong, please?
Should I report this behaviour as a bug?

Cheers,
Alex

I believe that there is two different sip ports in question:

A. the udp port for your incomming sip server connection.

B. the udp port for your outgoing client connection.

I believe that it is possible to specify your own incomming port as 5061 while your provider use 5060 and vise versa, so there will be two different ports.

Please correct me anybody if I should be wrong (still trying to learn :smile: )

But, on the other side … if my comment eventually should be right, there should also be a “user” derfinition to take care of the connection the other way (not only the “pair” definition). Is there also such a user definition, somewhere ?

Hmm … yes I think there is …

Wonder if this will not set up the port 5060 connection:

register => 2345:password@sip_proxy

Hi,

Thanks for your comments.

Well, I need to register to provider’s port 5061.
This also would work for me:

register => 2345:password@sip.messagenet.it:5061

but I need the other syntax 'cause I have to specify a different context for incoming calls rather than the default one in sip.conf.

Thanks,
Alex

[quote=“arne22”]I believe that there is two different sip ports in question:

A. the udp port for your incomming sip server connection.

B. the udp port for your outgoing client connection.

I believe that it is possible to specify your own incomming port as 5061 while your provider use 5060 and vise versa, so there will be two different ports.

Please correct me anybody if I should be wrong (still trying to learn :smile: )[/quote]

BTW, I think that the UDP port for incoming connections should be global and specified under the general section of sip.conf:

bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)

Any ideas, please?