[asterisk-commits] murf: branch group/newcdr r115477 - /team/group/newcdr/channels/chan_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 6 15:31:20 CDT 2008


Author: murf
Date: Tue May  6 15:31:20 2008
New Revision: 115477

URL: http://svn.digium.com/view/asterisk?view=rev&rev=115477
Log:
Some of the chan_zap linkedid stuff.... hmmmm.... doesn't look like several things got merged

Modified:
    team/group/newcdr/channels/chan_zap.c

Modified: team/group/newcdr/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/channels/chan_zap.c?view=diff&rev=115477&r1=115476&r2=115477
==============================================================================
--- team/group/newcdr/channels/chan_zap.c (original)
+++ team/group/newcdr/channels/chan_zap.c Tue May  6 15:31:20 2008
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2006, Digium, Inc.
+ * Copyright (C) 1999 - 2008, Digium, Inc.
  *
  * Mark Spencer <markster at digium.com>
  *
@@ -4586,6 +4586,29 @@
 
 							ast_verb(3, "Building conference on call on %s and %s\n", p->subs[SUB_THREEWAY].owner->name, p->subs[SUB_REAL].owner->name);
 							/* Put them in the threeway, and flip */
+							ast_verb(3, "Other is %s, 3way link=%s, real link=%s\n",
+									 other->name, p->subs[SUB_THREEWAY].owner->linkedid, p->subs[SUB_REAL].owner->linkedid);
+							ast_channel_log("+++++ 3WAY ===== SUB_THREEWAY channel:", p->subs[SUB_THREEWAY].owner);
+							ast_channel_log("+++++ 3WAY ===== SUB_REAL channel:", p->subs[SUB_REAL].owner);
+							ast_channel_log("+++++ 3WAY ===== 'other' channel:", other);
+							
+							/* get the youngest linked id and push it around */
+							if (strcmp(other->uniqueid, p->subs[SUB_REAL].owner->uniqueid) < 0)
+								firstlink = other->uniqueid;
+							else
+								firstlink = p->subs[SUB_REAL].owner->uniqueid;
+							if (strcmp(p->subs[SUB_THREEWAY].owner->uniqueid, firstlink) < 0)
+								firstlink = p->subs[SUB_THREEWAY].owner->uniqueid;
+							if (p->subs[SUB_REAL].owner->_bridge && strcmp(p->subs[SUB_REAL].owner->uniqueid, firstlink) < 0)
+								firstlink = p->subs[SUB_REAL].owner->_bridge->uniqueid;
+							
+							/* now, copy it around to all the linkedid fields */
+							ast_string_field_set(p->subs[SUB_THREEWAY].owner, linkedid, firstlink);
+							ast_string_field_set(p->subs[SUB_REAL].owner, linkedid, firstlink);
+							ast_string_field_set(other, linkedid, firstlink);
+							if (p->subs[SUB_REAL].owner->_bridge)
+								ast_string_field_set(p->subs[SUB_REAL].owner->_bridge, linkedid, firstlink);
+
 							p->subs[SUB_THREEWAY].inthreeway = 1;
 							p->subs[SUB_REAL].inthreeway = 1;
 							if (ast->_state == AST_STATE_UP) {




More information about the asterisk-commits mailing list