Incoming Calls Fail - SIP Registry State "Auth. Sent&qu

After a certain period of time, roughly a week, all of my incoming calls will fail. Outgoing calls work fine. I’m using TrixBox 2.6.1 with Asterisk 1.4.20-1.

The only clue I have is the SIP Registry Status. When incoming calls work the SIP Registry State is ‘Registered’. When they fail, the SIP Registry State is ‘Auth. Sent’. Here is a screenshot:

On my firewall, I allow all traffic from the Teliax server (den.teliax.net) in on ports 5060 and 10,000-20,000 (TCP and UDP). I was told by them this is correct.

I realize a simple solution would be to write a script so Asterisk resets itself every morning at 3am or something. I assume this is very easy to do but my Linux knowledge is lacking.

Hopefully there is a better solution. Any help would be appreciated, I haven’t gotten anywhere contacting Teliax or TrixBox.

Might want to paste your sip.conf for the part that is having an issue. (X out the Secret= part :smile:

Please answer the following:

  1. Are you using DynDNS or a static IP?
  2. Are you using a router/switch/firewall?
  3. Do you have your “qualify” set to “yes” in your sip.conf?

Might be a “stun” issue, if your IP changes or something it can break connection and things won’t know where to go!

The following is my sip_additional.conf, I think that’s what you’re looking for.

[101]
type=friend
secret=xxx
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5061
pickupgroup=
nat=yes
mailbox=101@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/101
context=from-internal
canreinvite=no
callgroup=
callerid=device <101>
accountcode=
call-limit=50

[102]
type=friend
secret=xxx
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5062
pickupgroup=
nat=yes
mailbox=102@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/102
context=from-internal
canreinvite=no
callgroup=
callerid=device <102>
accountcode=
call-limit=50

[103]
type=friend
secret=xxx
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5063
pickupgroup=
nat=yes
mailbox=103@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/103
context=from-internal
canreinvite=no
callgroup=
callerid=device <103>
accountcode=
call-limit=50

[104]
type=friend
secret=xxx
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5064
pickupgroup=
nat=yes
mailbox=104@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/104
context=from-internal
canreinvite=no
callgroup=
callerid=device <104>
accountcode=
call-limit=50

[teliax]
context=from-pstn
fromdomain=teliax.net
host=den.teliax.net
insecure=port,invite
secret=xxxxxxxxxxx
type=peer
username=mddubs
  1. I’m using DynDNS but my IP hasn’t changed in the almost 2 years I’ve lived here.

  2. I’m using a pfSense firewall and some simple switches.

  3. It looks like I do have qualify set to yes in the settings above.

Thanks for the quick reply.

Could you paste a “sip show peers”? please and thank you.

Sure thing.

Name/username              Host            Dyn Nat ACL Port     Status               
teliax/mddubs              63.211.239.14               5060     Unmonitored           
104/104                    192.168.1.105    D   N      5064     OK (20 ms)           
103/103                    192.168.1.105    D   N      5063     OK (19 ms)           
102/102                    192.168.1.105    D   N      5062     OK (20 ms)           
101/101                    192.168.1.105    D   N      5061     OK (20 ms)           
5 sip peers [Monitored: 4 online, 0 offline Unmonitored: 1 online, 0 offline]

in your sip.conf add lines to your [teliax] context that read:

qualify=yes nat=yes

after that do a “SIP reload” and then, when you do “SIP show peers” you should see that it reads:

And you should have all the Statuses(stati?) be “OK (xx ms)”. The lack or active monitoring may very well be the issue because…

I think what you are running into here is a “STUN” issue. So, your Network will allow you to fire out calls because it establishes the link with your gateway and then fires the call though. But this is something of a one way door.

So possibly, the reason it’s not working the other way is that your Network gets sent this call from the Teliax server and it has no idea where to send it because the door is closed if you haven’t got STUN keeping a constant connection with the server! But, that’s just a crazy guess. Good luck!

Updated!

Name/username              Host            Dyn Nat ACL Port     Status               
teliax/mddubs              63.211.239.14        N      5060     OK (47 ms)           
104/104                    192.168.1.105    D   N      5064     OK (40 ms)           
103/103                    192.168.1.105    D   N      5063     OK (16 ms)           
102/102                    192.168.1.105    D   N      5062     OK (15 ms)           
101/101                    192.168.1.105    D   N      5061     OK (15 ms)           
5 sip peers [Monitored: 5 online, 0 offline Unmonitored: 0 online, 0 offline]

That ‘unmonitored’ status has always bothered me! I’ve reset asterisk and I’ll check it daily … if it fails, I’ll know after how long. I’ll update this thread with the results.

Thanks very much for your help Mr. Mark Logan!

It’s been quite some time now and I haven’t had my incoming calls fail once. Thanks again for the help!

Glad to be of some assistance. :smile: