[asterisk-bugs] [JIRA] (ASTERISK-30401) res_pjsip: Addition of endpoint/AOR requires notification for qualify/contact status

Jonathan Rose (JIRA) noreply at issues.asterisk.org
Fri Jan 20 12:34:03 CST 2023


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

Jonathan Rose commented on ASTERISK-30401:
------------------------------------------

Reproduction method

* Start Asterisk with the provided configuration (if odbc isn't configured that will need to be done and you all have better advice on that particular nuisance than I do)

* Add a new endpoint and matching aor to the mysql database. Example:

mysql> use asterisk;
mysql> insert into ps_endpoints (id, transport, aors, context, disallow, allow, direct_media) values ("testuser5", 'transport-udp', "testuser5", 'default', 'all', 'ulaw', 'no');
mysql> insert into ps_aors (id, max_contacts) values ("testuser5", 1);

* Have any SIP device register that endpoint/aor

* Use 'pjsip show endpoints CLI' command to see that the device state remains 'Unavailable'.

* at this point, if you use 'module reload res_pjsip.so', the device will switch state to 'Not In Use'. Any new endpoints/aors added at this point will of course experience the same issue.

And it works the exact same way in curl. I can provide an example extconfig that uses CURL as well, but I'm not sure how helpful that is without the accompanying spring application that I wrote to mock out the CURL backend we use in prod.

> res_pjsip: Addition of endpoint/AOR requires notification for qualify/contact status
> ------------------------------------------------------------------------------------
>
>                 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