Browse code

Process CANCEL before in-dialog requests. This prevents issues with some devices sending buggy CANCEL with To-tag when cancelling an initial INVITE.

IƱaki Baz Castillo authored on 16/08/2012 14:17:51
Showing 1 changed files
... ...
@@ -452,11 +452,6 @@ request_route {
452 452
 	# NAT detection
453 453
 	route(NATDETECT);
454 454
 
455
-	# handle requests within SIP dialogs
456
-	route(WITHINDLG);
457
-
458
-	### only initial requests (no To tag)
459
-
460 455
 	# CANCEL processing
461 456
 	if (is_method("CANCEL"))
462 457
 	{
... ...
@@ -465,6 +460,11 @@ request_route {
465 465
 		exit;
466 466
 	}
467 467
 
468
+	# handle requests within SIP dialogs
469
+	route(WITHINDLG);
470
+
471
+	### only initial requests (no To tag)
472
+
468 473
 	t_check_trans();
469 474
 
470 475
 	# authentication