[asterisk-commits] mmichelson: trunk r404452 - in /trunk: ./ res/res_pjsip_refer.c

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


Author: mmichelson
Date: Fri Dec 20 14:28:19 2013
New Revision: 404452

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

Merged revisions 404439 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip_refer.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/res_pjsip_refer.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_refer.c?view=diff&rev=404452&r1=404451&r2=404452
==============================================================================
--- trunk/res/res_pjsip_refer.c (original)
+++ trunk/res/res_pjsip_refer.c Fri Dec 20 14:28:19 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