Skip to content
Snippets Groups Projects
Commit d1a2ff0a authored by lvl's avatar lvl
Browse files

res_pjsip_refer: ensure refer progress is still sent after Proceeding()

ASTERISK-28766 #close

Change-Id: I5ce2210062f9325db762edbf6e46075079bb2cd1
parent 87fda066
No related branches found
No related tags found
No related merge requests found
...@@ -233,11 +233,12 @@ static struct ast_frame *refer_progress_framehook(struct ast_channel *chan, stru ...@@ -233,11 +233,12 @@ static struct ast_frame *refer_progress_framehook(struct ast_channel *chan, stru
/* Determine the state of the REFER based on the control frames (or voice frames) passing */ /* Determine the state of the REFER based on the control frames (or voice frames) passing */
if (f->frametype == AST_FRAME_VOICE && !progress->subclass) { if (f->frametype == AST_FRAME_VOICE && !progress->subclass) {
/* Media is passing without progress, this means the call has been answered */ /* Media is passing without progress, this means the call has been answered */
progress->subclass = AST_CONTROL_ANSWER;
notification = refer_progress_notification_alloc(progress, 200, PJSIP_EVSUB_STATE_TERMINATED); notification = refer_progress_notification_alloc(progress, 200, PJSIP_EVSUB_STATE_TERMINATED);
} else if (f->frametype == AST_FRAME_CONTROL) { } else if (f->frametype == AST_FRAME_CONTROL) {
/* Based on the control frame being written we can send a NOTIFY advising of the progress */ /* Based on the control frame being written we can send a NOTIFY advising of the progress */
if ((f->subclass.integer == AST_CONTROL_RING) || (f->subclass.integer == AST_CONTROL_RINGING)) { if ((f->subclass.integer == AST_CONTROL_RING) || (f->subclass.integer == AST_CONTROL_RINGING)) {
progress->subclass = f->subclass.integer; /* Don't set progress->subclass; an ANSWER can still follow */
notification = refer_progress_notification_alloc(progress, 180, PJSIP_EVSUB_STATE_ACTIVE); notification = refer_progress_notification_alloc(progress, 180, PJSIP_EVSUB_STATE_ACTIVE);
} else if (f->subclass.integer == AST_CONTROL_BUSY) { } else if (f->subclass.integer == AST_CONTROL_BUSY) {
progress->subclass = f->subclass.integer; progress->subclass = f->subclass.integer;
...@@ -246,10 +247,10 @@ static struct ast_frame *refer_progress_framehook(struct ast_channel *chan, stru ...@@ -246,10 +247,10 @@ static struct ast_frame *refer_progress_framehook(struct ast_channel *chan, stru
progress->subclass = f->subclass.integer; progress->subclass = f->subclass.integer;
notification = refer_progress_notification_alloc(progress, 503, PJSIP_EVSUB_STATE_TERMINATED); notification = refer_progress_notification_alloc(progress, 503, PJSIP_EVSUB_STATE_TERMINATED);
} else if (f->subclass.integer == AST_CONTROL_PROGRESS) { } else if (f->subclass.integer == AST_CONTROL_PROGRESS) {
progress->subclass = f->subclass.integer; /* Don't set progress->subclass; an ANSWER can still follow */
notification = refer_progress_notification_alloc(progress, 183, PJSIP_EVSUB_STATE_ACTIVE); notification = refer_progress_notification_alloc(progress, 183, PJSIP_EVSUB_STATE_ACTIVE);
} else if (f->subclass.integer == AST_CONTROL_PROCEEDING) { } else if (f->subclass.integer == AST_CONTROL_PROCEEDING) {
progress->subclass = f->subclass.integer; /* Don't set progress->subclass; an ANSWER can still follow */
notification = refer_progress_notification_alloc(progress, 100, PJSIP_EVSUB_STATE_ACTIVE); notification = refer_progress_notification_alloc(progress, 100, PJSIP_EVSUB_STATE_ACTIVE);
} else if (f->subclass.integer == AST_CONTROL_ANSWER) { } else if (f->subclass.integer == AST_CONTROL_ANSWER) {
progress->subclass = f->subclass.integer; progress->subclass = f->subclass.integer;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment