Issues with Out of Dialog OPTIONS and NOTIFY when extension name includes domain

Hello all,

Im experiencing a strange issue with PJSIP OPTIONS (Qualify) and NOTIFY. It seems that whenever I have an endpoint which includes a username and a domain, “gordon@arkafort.com” for example, SIP OPTIONS and SIP NOTIFY fail as per below;

Endpoint: gordon@arkafort.com Not in use 0 of inf

[2021-05-28 15:35:50] ERROR[26173]: res_pjsip.c:4396 create_out_of_dialog_request: Unable to create outbound OPTIONS request to endpoint gordon@arkafort.com
[2021-05-28 15:35:50] ERROR[26173]: res_pjsip/pjsip_options.c:877 sip_options_qualify_contact: Unable to create request to qualify contact sip:gordon@XXX.XXX.XXX.XXX:42083;transport=TLS;x-ast-orig-host=192.168.0.6:42083 on AOR gordon@arkafort.com

rtc1CLI> pjsip send notify snom-check-cfg endpoint gordon@arkafort.com
Sending NOTIFY of type ‘snom-check-cfg’ to ‘gordon@arkafort.com’
[2021-05-28 15:36:00] ERROR[26174]: res_pjsip.c:4396 create_out_of_dialog_request: Unable to create outbound OPTIONS request to endpoint gordon@arkafort.com
[2021-05-28 15:36:00] ERROR[26173]: res_pjsip.c:4396 create_out_of_dialog_request: Unable to create outbound NOTIFY request to endpoint gordon@arkafort.com
[2021-05-28 15:36:00] WARNING[26173]: res_pjsip_notify.c:653 notify_contact: SIP NOTIFY - Unable to create request for contact sip:gordon@XXX.XXX.XXX.XXX:42083;transport=TLS;x-ast-orig-host=192.168.0.6:42083

If I change the endpoint name to the username, “gordon”, SIP Options and SIP Notify messages go through. (Only the endpoint name is changed, same Auth, same AOR and same transport).

Endpoint: gordon Not in use 0 of inf

rtc1*CLI> pjsip send notify snom-check-cfg endpoint gordon
Sending NOTIFY of type ‘snom-check-cfg’ to ‘gordon’
(Phone receives NOTIFY)

Any help would be immensely appreciated!

PS: Some time ago I had already created another topic on the same issue, however this was before I tested extensively to pinpoint the issue. Unfortunately I was unable to work on the issue before and the thread got closed, but I am including it as a reference.

There was an issue for this [ASTERISK-28393] Multidomain support issue - Digium/Asterisk JIRA which had a fix merged 2 days ago. It is not yet in a release.

Thank you very much!

Have a great day and a nice weekend.