diff options
author | Mark Michelson <mmichelson@digium.com> | 2013-12-20 20:28:19 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2013-12-20 20:28:19 +0000 |
commit | 344cdab3a71d8f8b3517e7efe6864165142b14ca (patch) | |
tree | 76cfe17c441a71e4576719266f8877f7af1b8cd0 /res/res_pjsip_refer.c | |
parent | 7ddfe12affea126d4cae0a2c75fac626cabbc496 (diff) |
Fix issue where PJSIP blind transferer dialog may not complete as planned.
When transferring to a dialplan extension that will not place any outbound
calls, the only control frames that the PJSIP REFER framehook will receive
are inconsequential (such as unhold or srcchange). As such, we shouldn't
allow for the reception of those types of frames prevent us from signaling
to the transferring party that the transfer has completed successfully once
voice frames are read.
Thanks to Jonathan Rose for pointing this out.
........
Merged revisions 404439 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_refer.c')
-rw-r--r-- | res/res_pjsip_refer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c index da48e523b..7664f1a22 100644 --- a/res/res_pjsip_refer.c +++ b/res/res_pjsip_refer.c @@ -191,20 +191,25 @@ static struct ast_frame *refer_progress_framehook(struct ast_channel *chan, stru /* Media is passing without progress, this means the call has been answered */ notification = refer_progress_notification_alloc(progress, 200, PJSIP_EVSUB_STATE_TERMINATED); } else if (f->frametype == AST_FRAME_CONTROL) { - progress->subclass = f->subclass.integer; /* 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)) { + progress->subclass = f->subclass.integer; notification = refer_progress_notification_alloc(progress, 180, PJSIP_EVSUB_STATE_ACTIVE); } else if (f->subclass.integer == AST_CONTROL_BUSY) { + progress->subclass = f->subclass.integer; notification = refer_progress_notification_alloc(progress, 486, PJSIP_EVSUB_STATE_TERMINATED); } else if (f->subclass.integer == AST_CONTROL_CONGESTION) { + progress->subclass = f->subclass.integer; notification = refer_progress_notification_alloc(progress, 503, PJSIP_EVSUB_STATE_TERMINATED); } else if (f->subclass.integer == AST_CONTROL_PROGRESS) { + progress->subclass = f->subclass.integer; notification = refer_progress_notification_alloc(progress, 183, PJSIP_EVSUB_STATE_ACTIVE); } else if (f->subclass.integer == AST_CONTROL_PROCEEDING) { + progress->subclass = f->subclass.integer; notification = refer_progress_notification_alloc(progress, 100, PJSIP_EVSUB_STATE_ACTIVE); } else if (f->subclass.integer == AST_CONTROL_ANSWER) { + progress->subclass = f->subclass.integer; notification = refer_progress_notification_alloc(progress, 200, PJSIP_EVSUB_STATE_TERMINATED); } } |