[asterisk-bugs] [JIRA] (ASTERISK-28718) chan_sip: Returns 403 if RTP ports are depleted, should return 503

Asterisk Team (JIRA) noreply at issues.asterisk.org
Tue Jan 28 04:07:25 CST 2020


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

Asterisk Team commented on ASTERISK-28718:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

> chan_sip: Returns 403 if RTP ports are depleted, should return 503
> ------------------------------------------------------------------
>
>                 Key: ASTERISK-28718
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28718
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Interoperability
>    Affects Versions: 13.29.1
>            Reporter: Walter Doekes
>
> If you're out of RTP ports, you get this:
> {noformat}
> [2014-08-12 09:14:06] ERROR[23808] res_rtp_asterisk.c:
>   Oh dear... we couldn't allocate a port for RTP instance '0x7f73e04d9098'
> [2014-08-12 09:14:06] NOTICE[23808] chan_sip.c:
>   Failed to authenticate device '<sip:XXX>;tag=XXX' (x.x.x.x:5060)
> {noformat}
> That in turn causes a 403 to be sent (because of the "AUTH_RTP_FAILED"), and the call will fail:
> {code}
>                if (res < 0) { /* Something failed in authentication */
>                        ast_log(LOG_NOTICE, "Failed to authenticate device %s\n", sip_get_header(req, "From"));
>                        transmit_response_reliable(p, "403 Forbidden", req);
> {code}
> What chan_sip _should_ do, is either be silent, or return a 5xx error, so the caller can choose a different machine to retry the call on.
> *And, pjsip, for completeness sake*
> I did take a quick peek at what pjsip does, and there, it seems a 488 is returned:
> {code}
> static int handle_incoming_sdp(struct ast_sip_session *session, const pjmedia_sdp_session *sdp)
> ...
>                         res = handler->negotiate_incoming_sdp_stream(session, session_media, sdp, i, stream);
>                         if (res < 0) {
>                                 /* Catastrophic failure. Abort! */
>                                 return -1;
> ...
>         if (!handled) {
>                 return -1;
>         }
> {code}
> {code}
>                 if (handle_incoming_sdp(invite->session, sdp_info->sdp)) {
>                         tdata = NULL;
>                         if (pjsip_inv_end_session(invite->session->inv_session, 488, NULL, &tdata) == PJ_SUCCESS
> {code}
> That does make sense in the (general) {{!handled}} case: a codec mismatch should indeed get a 488. But an out-of-memory/ports situation may benefit from a different status.



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



More information about the asterisk-bugs mailing list