[asterisk-bugs] [JIRA] (ASTERISK-29842) Do not change 180 Ringing to 183 Progress even if early_media already enabled
Vit Bohacek (JIRA)
noreply at issues.asterisk.org
Wed Nov 30 08:25:51 CST 2022
[ https://issues.asterisk.org/jira/browse/ASTERISK-29842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=260751#comment-260751 ]
Vit Bohacek edited comment on ASTERISK-29842 at 11/30/22 8:25 AM:
------------------------------------------------------------------
Hello,
this patch doesn't solve the case when Ringing comes with SDP in it's body.
I use asterisk 18.14.0
it is necessary to add ast_sip_get_allow_sending_180_after_183() condition into chan_pjsip_incoming_response - chan_pjsip.c
example:
static void chan_pjsip_incoming_response(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
{
struct pjsip_status_line status = rdata->msg_info.msg->line.status;
SCOPE_ENTER(3, "%s: Status: %d\n", ast_sip_session_get_name(session), status.code);
if (!session->channel) {
SCOPE_EXIT_RTN("%s: No channel\n", ast_sip_session_get_name(session));
}
ast_log(LOG_WARNING,"chan_pjsip_incoming_response %i\n",status.code);
switch (status.code) {
case 180: {
pjsip_rdata_sdp_info *sdp = pjsip_rdata_get_sdp_info(rdata);
if (sdp && sdp->body.ptr) {
+ if(ast_sip_get_allow_sending_180_after_183()) {
+ ast_trace(-1, "%s: Queueing RINGING\n", ast_sip_session_get_name(session));
+ ast_queue_control(session->channel, AST_CONTROL_RINGING);
+ } else {
+ ast_trace(-1, "%s: Queueing PROGRESS\n", ast_sip_session_get_name(session));
+ ast_queue_control(session->channel, AST_CONTROL_PROGRESS);
+ }
− ast_trace(-1, "%s: Queueing PROGRESS\n", ast_sip_session_get_name(session));
− ast_queue_control(session->channel, AST_CONTROL_PROGRESS);
} else {
ast_trace(-1, "%s: Queueing RINGING\n", ast_sip_session_get_name(session));
ast_queue_control(session->channel, AST_CONTROL_RINGING);
}
was (Author: cofein):
Hello,
this patch doesn't solve the case when Ringing comes with SDP in it's body.
I use asterisk 18.14.0
it is necessary to add ast_sip_get_allow_sending_180_after_183() condition into chan_pjsip_incoming_response - chan_pjsip.c
example:
static void chan_pjsip_incoming_response(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
{
struct pjsip_status_line status = rdata->msg_info.msg->line.status;
SCOPE_ENTER(3, "%s: Status: %d\n", ast_sip_session_get_name(session), status.code);
if (!session->channel) {
SCOPE_EXIT_RTN("%s: No channel\n", ast_sip_session_get_name(session));
}
ast_log(LOG_WARNING,"chan_pjsip_incoming_response %i\n",status.code);
switch (status.code) {
case 180: {
pjsip_rdata_sdp_info *sdp = pjsip_rdata_get_sdp_info(rdata);
if (sdp && sdp->body.ptr) {
+ if(ast_sip_get_allow_sending_180_after_183()) {
+ ast_trace(-1, "%s: Queueing RINGING\n", ast_sip_session_get_name(session));
+ ast_queue_control(session->channel, AST_CONTROL_RINGING);
+ } else {
+ ast_trace(-1, "%s: Queueing PROGRESS\n", ast_sip_session_get_name(session));
+ ast_queue_control(session->channel, AST_CONTROL_PROGRESS);
+ }
- ast_trace(-1, "%s: Queueing PROGRESS\n", ast_sip_session_get_name(session));
- ast_queue_control(session->channel, AST_CONTROL_PROGRESS);
} else {
ast_trace(-1, "%s: Queueing RINGING\n", ast_sip_session_get_name(session));
ast_queue_control(session->channel, AST_CONTROL_RINGING);
}
> Do not change 180 Ringing to 183 Progress even if early_media already enabled
> -----------------------------------------------------------------------------
>
> Key: ASTERISK-29842
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29842
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_pjsip
> Affects Versions: 16.23.0, 18.9.0, 19.1.0
> Reporter: Mark Petersen
> Assignee: Mark Petersen
> Target Release: 16.26.0, 18.12.0, 19.4.0, 20.0.0
>
>
> Currently if we receive a 180 Ringing and we previously have received a 183 Progress with SDP, asterisk is send as 183 Progress with SDP
> but it should be send as 180 Ringing with SDP
> RFC-3960 3.2. Ringing Tone Generation
> SIP User Agent (UA) could implement the following
> local policy:
> 1. Unless a 180 (Ringing) response is received, never generate
> local ringing.
> 2. If a 180 (Ringing) has been received but there are no incoming
> media packets, generate local ringing.
> 3. If a 180 (Ringing) has been received and there are incoming
> media packets, play them and do not generate local ringing.
> Note that a 180 (Ringing) response means that the callee is
> being alerted, and a UAS should send such a response if the
> callee is being alerted, regardless of the status of the early
> media session.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list