PJSIP BLF freeze after reload

I have recently found that BLF is not working on my system when using PJSIP.
It works only until a reload (apply config) is performed and then the BLF light on the phone freezes. You can still press the button, but the light stays at whatever it was at before the reload.
I am running Asterisk 13.23.1, FreePBX HA and Yealink phones.

I initially thought that it might be the issue where new Yealink V84 firmware is enforcing a RFC standard that Asterisk doesn’t support but this is a different problem as it’s also happening on old (V81) firmware and only on PJSIP, chansip is fine.

The difference I see is that after the Asterisk reload the phone is no longer responding to the Notify from Asterisk to update the BLF key with a 200 OK.

When I reboot the phone the BLF keys work again, but only until the next Asterisk reload.

This is the Notify BEFORE the reload, which correctly updates the BLF key:

<--- Transmitting SIP request (832 bytes) to UDP:10.124.193.90:5060 --->
NOTIFY sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.1.182:5160;rport;branch=z9hG4bKPja6aff501-becd-4e66-a189-f7e0ccaf404e
From: <sip:*458710*[email protected]>;tag=e3a99d4c-483b-42ca-917e-f9769fda57d3
To: "8710" <sip:[email protected]>;tag=322392347
Contact: <sip:10.1.1.182:5160>
Call-ID: [email protected]
CSeq: 2224 NOTIFY
Event: dialog
Subscription-State: active;expires=1744
Allow-Events: message-summary, presence, dialog, refer
Max-Forwards: 70
User-Agent: FPBX-13.0.197.15(13.23.1)
Content-Type: application/dialog-info+xml
Content-Length:   245

<?xml version="1.0" encoding="UTF-8"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="4" state="full" entity="sip:*458710*[email protected]:5160">
 <dialog id="*458710*8720">
  <state>terminated</state>
 </dialog>
</dialog-info>

<--- Received SIP response (397 bytes) from UDP:10.124.193.90:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.1.1.182:5160;rport=5160;branch=z9hG4bKPja6aff501-becd-4e66-a189-f7e0ccaf404e
From: <sip:*458710*[email protected]>;tag=e3a99d4c-483b-42ca-917e-f9769fda57d3
To: "8710" <sip:[email protected]>;tag=322392347
Call-ID: [email protected]
CSeq: 2224 NOTIFY
Contact: <sip:[email protected]:5060>
User-Agent: Yealink SIP-T23G 44.81.0.70
Content-Length: 0


<--- Transmitting SIP request (416 bytes) to UDP:10.124.193.90:5060 --->
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.1.182:5160;rport;branch=z9hG4bKPjaa62654a-13e5-4bf2-bc08-e5d5868bbc54
From: <sip:*458710*[email protected]>;tag=e09f76f3-5522-4313-8836-e1813c3f7ad2
To: "8710" <sip:[email protected]>;tag=1644165840
Call-ID: [email protected]
CSeq: 4941 BYE
Reason: Q.850;cause=16
Max-Forwards: 70
User-Agent: FPBX-13.0.197.15(13.23.1)
Content-Length:  0


<--- Received SIP response (355 bytes) from UDP:10.124.193.90:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.1.1.182:5160;rport=5160;branch=z9hG4bKPjaa62654a-13e5-4bf2-bc08-e5d5868bbc54
From: <sip:*458710*[email protected]>;tag=e09f76f3-5522-4313-8836-e1813c3f7ad2
To: "8710" <sip:[email protected]>;tag=1644165840
Call-ID: [email protected]
CSeq: 4941 BYE
User-Agent: Yealink SIP-T23G 44.81.0.70
Content-Length: 0

This is the one that doesn’t correctly update the BLF key and which lacks a 200 OK response from the phone:

<--- Transmitting SIP request (832 bytes) to UDP:10.124.193.90:5060 --->
NOTIFY sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.1.182:5160;rport;branch=z9hG4bKPj432de06b-637a-4ca5-b402-525688295155
From: <sip:*458710*[email protected]>;tag=e3a99d4c-483b-42ca-917e-f9769fda57d3
To: "8710" <sip:[email protected]>;tag=322392347
Contact: <sip:10.1.1.182:5160>
Call-ID: [email protected]
CSeq: 2226 NOTIFY
Event: dialog
Subscription-State: active;expires=1679
Allow-Events: message-summary, presence, dialog, refer
Max-Forwards: 70
User-Agent: FPBX-13.0.197.15(13.23.1)
Content-Type: application/dialog-info+xml
Content-Length:   245

<?xml version="1.0" encoding="UTF-8"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="6" state="full" entity="sip:*458710*[email protected]:5160">
 <dialog id="*458710*8720">
  <state>terminated</state>
 </dialog>
</dialog-info>

<--- Transmitting SIP request (416 bytes) to UDP:10.124.193.90:5060 --->
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.1.182:5160;rport;branch=z9hG4bKPjfd8ad138-7dc1-42b4-9a93-66103391077d
From: <sip:*458710*[email protected]>;tag=d6b4af33-6da9-4a75-a917-e19444b50fae
To: "8710" <sip:[email protected]>;tag=921478954
Call-ID: [email protected]
CSeq: 16347 BYE
Reason: Q.850;cause=16
Max-Forwards: 70
User-Agent: FPBX-13.0.197.15(13.23.1)
Content-Length:  0


<--- Received SIP response (355 bytes) from UDP:10.124.193.90:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.1.1.182:5160;rport=5160;branch=z9hG4bKPjfd8ad138-7dc1-42b4-9a93-66103391077d
From: <sip:*458710*[email protected]>;tag=d6b4af33-6da9-4a75-a917-e19444b50fae
To: "8710" <sip:[email protected]>;tag=921478954
Call-ID: [email protected]
CSeq: 16347 BYE
User-Agent: Yealink SIP-T23G 44.81.0.70
Content-Length: 0
1 Like

Was the “Allow transport reload” GUI option added in FPBX 14?
I don’t have it on my 13 installs.
Do you happen to know what the equivalent entry would be for that if I wanted to add it manually to a config file?

allow_reload=no in pjsip.transports_custom_post.conf did it.

Great, thanks for the tip!

1 Like

This setting is already “no” by default. So I’d be a bit concerned that it required you to disable it.

No, not on my FreePBX 13 installs.
There is no GUI option for that in Asterisk SIP settings and the default in all transports was allow_reload=yes, which I had to override in transports_custom_post.conf.

That’s my point. In Asterisk many settings have a default value even it if is empty. If they are not set in the config, they still have a default value. In the case of allow_reload it is no. Which means the only way it can be set to “yes” is if it was done by someone. So the fact that this is defaulted to yes in 13 and even the Asterisk docs say that while it will allow the transports to be reloaded it can cause issues with calls and other dialogs and is not really recommended the fact it is the default means someone just wasn’t thinking or tested this fully.

Wasn’t the default “yes” at some point?
My guess is that my FPBX 13 system is from the time where this was still the case.

Again, that is my point. It was default to yes in 13 and that was the wrong move to do because now while we can go in and just disable it in 14 or 15, you can’t. You have to go in and do custom configs to turn off a setting that shouldn’t be defaulted to yes in the first place and clearly is the cause of issues with PJSIP in FreePBX as those who turn it off see the problems go away. So again, it was either not thought through and/or not really thoroughly tested.

I started messing with PJSIP in FreePBX v13 and ended up having to do everything in custom configs and no use anything that was FreePBX generated in order to have PJSIP function as expected per the Asterisk config samples.

Speaking of this that was still the case, is this still the case with HA? Specially the part about PJSIP?

It’s recommended (but not required) that you install the Asterisk 11 distribution when running FreePBX High Availability. At this time PJSIP is not supported with HA and you will need to use chan_sip

That’s no longer the case, they just forgot to update the wiki.
Asterisk 13 and pjsip work fine with HA.
Rob Thomas confirmed that to me in this thread: What would you like to see added in FreePBX 15?, and I have also been running it for one and a half years.

As a result of the conversation in this thread, I opened a ticket to revisit the allow_reload setting for FreePBX generated transports. Core module ver. 13.0.131.9 (which is in edge now) now generates transports with it disabled by default:

lgaetzdev2*CLI> pjsip show transport 0.0.0.0-udp

Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress....................>
==========================================================================================

Transport:  0.0.0.0-udp               udp      0      0  0.0.0.0:5160

 ParameterName              : ParameterValue
 =======================================================
 allow_reload               : false

* snip *
2 Likes

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