With older versions of Asterisk (chan_sip) if I would subscribe an extension that is not registered, my phone would show it as unavailable. Quite similar as if he would have a call.
With my Asterisk 18.15.1 (pjsip) it doesn’t, while notifys when the subscribed extension is busy or getting a call work as expected.
I tried to find out the difference and while I am not sure if I am looking at the right thing, I noticed that a notify for an unregistered extension in older Asterisk versions with chan_sip looks like this (extension 13 is not registered):
It looks like this notify makes my phone (tested with different phones and softphones) think the extension is availabe, while with old chan_sip it turns red on the phone.
Is there something I can do to get the old behaviour?
I watched this issue a bit more and indeed the problem for me seems to be that older Asterisk with chan_sip would send periodically Notfiys with state “confirmed” (as in example above) for subscribed extensions that are not registered / unavailable.
While I am not sure if “confirmed” is the right thing to send here, it produced the desired behaviour - showing the subscribed extension unavailabe (red button for example) on phones and softphones.
With my Asterisk 18.15 and pjsip, it just sends “terminated”, which means extension is free and has no calls. This makes the phone show the subscribed extension available - which is not the case.
Example of Asterisk 18.15 with pjsip, extension 35 is subscribing extension 18 (which is not registered and not there at all)
Both chan_sip and chan_pjsip use the same general logic[1] to determine what to place in the NOTIFY for that value, and both use “terminated” if the extension is unavailable.
I would suggest providing the hint configuration as well as the output of “core show hints” for both.
Thank you. Your pointer to the code showed me what’s the thing.
I must say that I didn’t notice the difference for really really long time (many years). Because usually my phones are all online Maybe this was changed already long time ago.
So my only possibility now to check old behaviour is an old VM I had on archive with Asterisk 1.2.40. Sorry for that. But at least I could see the difference here:
So while in the code of actual version (your link) I can see
Thank you. Yeah, time flies…
I will think about it and maybe change it in source code and recompile by myself. Because with “terminated” I will never see on other devices if a phone is just simply plugged out.