[asterisk-bugs] [JIRA] (ASTERISK-30401) PJSIP Realtime - If an endpoint/aor is created after PJSIP is loaded, device state for that endpoiont is locked to unavailable

Joshua C. Colp (JIRA) noreply at issues.asterisk.org
Fri Jan 20 12:30:03 CST 2023


    [ https://issues.asterisk.org/jira/browse/ASTERISK-30401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=261223#comment-261223 ] 

Joshua C. Colp commented on ASTERISK-30401:
-------------------------------------------

This is on purpose, and a trade-off in having things work in a performant fashion. It was previously attempted to do otherwise within the qualify implementation and it yielded extremely bad results. I ended up having to rewrite the implementation from scratch and landed on this. To allow it to work an AMI action and CLI command was added so that an external entity could inform Asterisk that the AOR has been created and that it needs to be aware of it.

There could be improvements done in the area potentially, but it's not a bug and any changes would need serious consideration and review or else we end up in a situation where non-realtime usage returns to performing 1000 times slower.

> PJSIP Realtime - If an endpoint/aor is created after PJSIP is loaded, device state for that endpoiont is locked to unavailable
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-30401
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30401
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip
>    Affects Versions: GIT, 18.9.0
>         Environment: Prod: RHEL 8 (some Kubernetes thing that I couldn't possibly describe)
> Test: Ubuntu 22.04 on Intel NUC Skull Canyon with 16GB of RAM and a simple SSD
>            Reporter: Jonathan Rose
>            Severity: Major
>         Attachments: extconfig.conf, mysql output.txt, pjsip.conf, res_odbc.conf, sorcery.conf
>
>
> Realtime PJSIP endpoints/aors have a bit of a crippling problem right now... if I have a pair of endpoint/aor present at the point when res_pjsip.so is loaded and register afterwards, registration works fine and device state is set to 'Not In Use' as you would expect it to.
> If, however, I add a new pair of endpoint/aor to the realtime backend and register *that* user, the registration will appear to work correctly from a SIP perspective, but within Asterisk the device state will be locked to unavailable. I can unregister and reregister any number of times at that point and the device state will remain unavailable.
> Issuing 'module reload res_sip.so' from the CLI will 'fix' the issue, but this is realtime... that's not really an acceptable workaround. I'd argue that it violates the whole concept of Realtime and I'm kinda shocked I couldn't find any reports of this happening already.
> I've confirmed that this problem seems to be backend agnostic, having used both odbc and curl as the realtime backends.
> I will provide minimalist configuration for reproducing the issue.
> Confirmed within 18.9.0-cert1 as well as the current (as of 1/20/2023) master branch of github.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list