Host becomes unspecified intermittently

Hi,

I upgrdaed my asterisk from 1.8 to 18.22 and have a few trunks registered in differnt locations for SIP calls. However, one of the trunks, after the upgrade, has become unstable. It becomes ‘unspecififed’ after every few minutes until a manual ‘sip reload’ is done. PFA screeshot of before and after reloading SIP:

sip.conf on TxSIP server (asterisk 18.22) end is:

[NewGET]
disallow=all
username=NewGET
secret=NewGET
host=dynamic
port=5060
directmedia=no
type=peer
trunk=yes
nat=force_rport,comedia
qualify=yes
allow=alaw
allow=ulaw
allow=g729
context=default
insecure=invite,port
sendrpid=pai
trustrpid=yes
rpid_update=yes
deny=0.0.0.0/0.0.0.0
permit=ip_addr/255.255.255.255

sip.conf on Rx SIP server (asterisk 1.8) end is:

[rxServer]
disallow=all
username=rxServer
secret=NewGET
host=dynamic
port=5060
canreinvite=no
type=peer
trunk=yes
nat=yes
qualify=yes
allow=alaw
allow=ulaw
context=default
insecure=invite,port
deny=0.0.0.0/0.0.0.0
permit=ip_addr/255.255.255.255

both are registered with each other.

Can someone guide me on why could this happen and how to fix it permanently?

thanks,
Hisham

This doesn’t make sense. In order to register with someone, you need to know their contact address. If you know their contact address, they don’t need to register with you!

This doesn’t make sense, when applied to both ends, as it means that the secret is never used, except possibly for registration, and, as already pointed out, that isn’t needed, if you know the contact address.

You are using all possible codecs on both ends. That can cause problems due to packet truncation.

There is no such option implemented in the source code.

Generally, I’d suggest starting over with chan_pjsip.

Yes, both of the servers know contact address (username, pass,IP) of each other, pfa below:

There is no such option implemented in the source code.

I’ll have to double-check this, as I was given the system with this option pre-enabled.

So you shouldn’t use host=dynamic, and shouldn’t register. Your problem is probably with re-registrations getting lost, but they weren’t needed in the first place.

Your INVITEs aren’t being authenticated, either.

so what I understand is you’re saying that I either register them in the sip.conf:

register=> NewGET:NewGET@sip.server

or I connect them as peer:

[rxServer]
disallow=all
username=rxServer
secret=NewGET
host=dynamic
port=5060
canreinvite=no
type=peer
trunk=yes
nat=yes
qualify=yes
allow=alaw
allow=ulaw
context=default
insecure=invite,port
deny=0.0.0.0/0.0.0.0
permit=ip_addr/255.255.255.255

Correct?

Change to the actual peer address.

Delete, or in the unlikely event that something is mangling the port numbers, change to just port.

Add disallow=all
and
allow for the codecs that can be used.

This becomes redundant, as only the host address will be accepted.

if I get rid of the

host=dynamic

and keep this:

deny=0.0.0.0/0.0.0.0
permit=ip_addr/255.255.255.255

will I get rid of the issue?

No. You won’t be able to make outgoing calls at all, and the configuration might fail completely. You need to have host=ip_addr in place of host=dynamic.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.