[asterisk-commits] mmichelson: branch 12 r404439 - /branches/12/res/res_pjsip_refer.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 20 14:11:28 CST 2013


Author: mmichelson
Date: Fri Dec 20 14:11:25 2013
New Revision: 404439

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=404439
Log:
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.


Modified:
    branches/12/res/res_pjsip_refer.c

Modified: branches/12/res/res_pjsip_refer.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_refer.c?view=diff&rev=404439&r1=404438&r2=404439
==============================================================================
--- branches/12/res/res_pjsip_refer.c (original)
+++ branches/12/res/res_pjsip_refer.c Fri Dec 20 14:11:25 2013
@@ -191,20 +191,25 @@
 		/* 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);
 		}
 	}




More information about the asterisk-commits mailing list