I have an asterisk 15.5 with PJSIP configured with two endpoints: 1 sip trunk and 1 sip extension. When placing a call from extension through that trunk, and destination number is not in service, from the trunk I receive a 404 but PJSIP reply to my extension with a 503, that is not precise as much as I need.
00017 1544111045 * <== #.#.5.12:5060 SIP/2.0 404 Not Found
00018 1544111045 * ==> #.#.5.12:5060 ACK sip:092532145@#.#.5.12:5060 SIP/2.0
00019 1544111045 * ==> 192.168.1.243:65104 SIP/2.0 503 Service Unavailable
Is there any documented/undocumented settings I can configure to refer to the extension the exact failure code?
There is no configuration, but the Hangup application accepts a cause code[1] and there are methods to query the cause codes of the outgoing side. As for why it didn’t forward the 404, it’s because to the calling party the extension was found in Asterisk.
Behind that extension there is a webrtc client that needs to know the 404 failure code. How can I get that? You talked about methods to query cause codes? How?