[Asterisk-cvs] asterisk/channels chan_sip.c,1.479,1.480

markster at lists.digium.com markster at lists.digium.com
Thu Aug 26 22:16:37 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv21838/channels

Modified Files:
	chan_sip.c 
Log Message:
When detecting a hairpin, redirect to the appropriate local extension (bug #1974)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.479
retrieving revision 1.480
diff -u -d -r1.479 -r1.480
--- chan_sip.c	27 Aug 2004 02:45:35 -0000	1.479
+++ chan_sip.c	27 Aug 2004 03:16:16 -0000	1.480
@@ -6719,6 +6719,14 @@
 						update_user_counter(p, DEC_IN_USE);
 					}
 					break;
+				case 482: /* SIP is incapable of performing a hairpin call, which
+				             is yet another failure of not having a layer 2 (again, YAY
+							 IETF for thinking ahead).  So we treat this as a call
+							 forward and hope we end up at the right place... */
+					ast_log(LOG_DEBUG, "Hairpin detected, setting up call forward for what it's worth\n");
+					if (p->owner)
+						snprintf(p->owner->call_forward, sizeof(p->owner->call_forward), "Local/%s@%s", p->username, p->context);
+					/* Fall through */
 				case 486: /* Busy here */
 				case 600: /* Busy everywhere */
 				case 603: /* Decline */




More information about the svn-commits mailing list