PJSIP drop all registrations and became unreachable

This has been happening for a few weeks now, the systems is working perfectly, then suddenly PJSIP drop all extension registrations, it is unable to register an extension until Asterisk is restarted.
After Asterisk restart all works fine again for a while just until it happens again.

There is no error message on the full log before the event or any estrange activity, just a set of messages like the following for each previously registered extension


[2019-03-27 11:40:47] VERBOSE[6453] res_pjsip/pjsip_configuration.c: Endpoint xxxx is now Unreachable
[2019-03-27 11:40:47] VERBOSE[6453] res_pjsip/pjsip_options.c: Contact xxxx/sip:[email protected]:53597 is now Unreachable. RTT: 0.000 msec
[2019-03-27 11:49:39] VERBOSE[14928] res_pjsip/pjsip_options.c: Contact xxxx/sip:[email protected]:53597 has been deleted

Have no idea where to start troubleshooting.

Asterisk 16.2.1, FreePBX 14.0.5.25

I had this issue when upgraded from Asterisk 15.5 to 15.7.2
Everything looks good until a certain amount of calls are placed
Then registration are lost and only thing that works is a reboot

Only thing that worked for me was to role back to Asterisk 15.5

I’m using Asterisk 16.2.1

They made pretty much the same updates from 15.7.1 to 15.7.2 that they made from 16.2.0 to 16.2.1

Worth a try anyway…

Did they? Did they really? I mean when 15.1 and 15.2.1 where release 16.x wasn’t even produced yet. When 16.0 came out in OCT 2018 vs OCT 2017 (v15), 15 was already stopped. So that means all the updates that 15 had when 16 was released were already there.

So please where did you come up with this logic?

Hi,

I had this exact same problem with PJSIP and it is related to this Asterisk bug: https://issues.asterisk.org/jira/browse/ASTERISK-27821

Changing all PJSIP extension’s MWI Subscription Type from Auto to Solicited solves the problem.

Fraser.

1 Like

By reading the release notes and bug fixes…
The bug fixes added in 15.7.2 are exactly the same as in 16.2.1 and were released pretty much at the same time

And yes they are still doing maintenance updates on Asterisk 15
I may have gotten the version numbers wrong in my original answers… That’s now fixed…

http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-15-current

http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-16-current

Take a look at the last 2 update notes…

It happens again today.
I’m trying Fraser’s solution.

Will reports if it happens again

Fraser, do you or anyone else experience one call come in as 3 calls before this happens though? I am hoping the MWI type helps. I dont know how to put this log in format so you can easily read it, but here is one call coming in as 3 calls, with some Xs added to censor the persons name and number:

[2019-04-03 08:57:13] VERBOSE[11265][C-00000029] pbx.c: Executing [s@macro-dial:6] AGI("PJSIP/FreePBXtoMetaswitch-LD-0000007f", "dialparties.agi") in new stack
[2019-04-03 08:57:13] VERBOSE[11267][C-0000002a] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
[2019-04-03 08:57:13] VERBOSE[11270][C-0000002c] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
[2019-04-03 08:57:13] VERBOSE[11265][C-00000029] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
[2019-04-03 08:57:14] VERBOSE[10952][C-00000026] res_agi.c: <PJSIP/521-0000007c>AGI Script attendedtransfer-rec-restart.php completed, returning 0
[2019-04-03 08:57:14] VERBOSE[11270][C-0000002c] res_agi.c: dialparties.agi: Starting New Dialparties.agi
[2019-04-03 08:57:14] VERBOSE[11267][C-0000002a] res_agi.c: dialparties.agi: Starting New Dialparties.agi
[2019-04-03 08:57:14] VERBOSE[11265][C-00000029] res_agi.c: dialparties.agi: Starting New Dialparties.agi
[2019-04-03 08:57:14] VERBOSE[11265][C-00000029] res_agi.c: dialparties.agi: Caller ID name is 'MICHAEL XXX' number is 'xxxxxxx5962'
[2019-04-03 08:57:14] VERBOSE[11265][C-00000029] res_agi.c: dialparties.agi: CW Ignore is: 
[2019-04-03 08:57:14] VERBOSE[11265][C-00000029] res_agi.c: dialparties.agi: CF Ignore is: 
[2019-04-03 08:57:14] VERBOSE[11265][C-00000029] res_agi.c: dialparties.agi: CW IN_USE/BUSY is: 1
[2019-04-03 08:57:14] VERBOSE[11267][C-0000002a] res_agi.c: dialparties.agi: Caller ID name is 'MICHAELXXX' number is 'xxxxxxx5962'
[2019-04-03 08:57:14] VERBOSE[11267][C-0000002a] res_agi.c: dialparties.agi: CW Ignore is: 
[2019-04-03 08:57:14] VERBOSE[11267][C-0000002a] res_agi.c: dialparties.agi: CF Ignore is: 
[2019-04-03 08:57:14] VERBOSE[11267][C-0000002a] res_agi.c: dialparties.agi: CW IN_USE/BUSY is: 1
[2019-04-03 08:57:14] VERBOSE[11269][C-0000002b] res_agi.c: dialparties.agi: Starting New Dialparties.agi
[2019-04-03 08:57:14] VERBOSE[11269][C-0000002b] res_agi.c: dialparties.agi: Caller ID name is 'MICHAEL XXX' number is 'xxxxxxx5962'
[2019-04-03 08:57:14] VERBOSE[11269][C-0000002b] res_agi.c: dialparties.agi: CW Ignore is: 
[2019-04-03 08:57:14] VERBOSE[11269][C-0000002b] res_agi.c: dialparties.agi: CF Ignore is: 
[2019-04-03 08:57:14] VERBOSE[11269][C-0000002b] res_agi.c: dialparties.agi: CW IN_USE/BUSY is: 1
[2019-04-03 08:57:14] VERBOSE[11270][C-0000002c] res_agi.c: dialparties.agi: Caller ID name is 'MICHAEL XXX' number is 'xxxxxxx5962'
[2019-04-03 08:57:14] VERBOSE[11265][C-00000029] res_agi.c: dialparties.agi: Methodology of ring is  'ringall'
[2019-04-03 08:57:14] VERBOSE[11270][C-0000002c] res_agi.c: dialparties.agi: CW Ignore is: 
[2019-04-03 08:57:14] VERBOSE[11270][C-0000002c] res_agi.c: dialparties.agi: CF Ignore is: 
[2019-04-03 08:57:14] VERBOSE[11270][C-0000002c] res_agi.c: dialparties.agi: CW IN_USE/BUSY is: 1

Nobody could answer any of the 3 calls this turned into, and then I had to do a reload of asterisk to bring us back into operation.

If I’m reading abridged log file correctly, it looks like Asterisk hangs at dialparties.agi. There are other thread(s) discussing that here and the fix is to change to Asterisk 14 or 16:
https://wiki.freepbx.org/display/PPS/Changing+Major+Asterisk+Versions+on+the+Fly

I have 3 deployments running Asterisk 13.22.0 in FreePBX 14.0.5.25 on the Sangoma OS as a VM. I only have issues with one of the 3 servers. Never has happened on the other 2.

If i were to try change-asterisk-version and go to 16, would this have a chance of breaking anything?

I’m presenting the issue running Asterisk 16. The issue first present running on Asterisk 13 and we upgraded to 16 looking to fix it.

We are trying Fraser suggestion. I’ll update if is stops or not.

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