[asterisk-commits] rmudgett: branch group/issue14068 r210901 - /team/group/issue14068/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 6 15:27:29 CDT 2009


Author: rmudgett
Date: Thu Aug  6 15:27:26 2009
New Revision: 210901

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=210901
Log:
Update DNID when we have collected enough overlap digits for a dialplan match.

Modified:
    team/group/issue14068/channels/sig_pri.c

Modified: team/group/issue14068/channels/sig_pri.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14068/channels/sig_pri.c?view=diff&rev=210901&r1=210900&r2=210901
==============================================================================
--- team/group/issue14068/channels/sig_pri.c (original)
+++ team/group/issue14068/channels/sig_pri.c Thu Aug  6 15:27:26 2009
@@ -893,6 +893,11 @@
 		ast_verb(3, "Going to extension s|1 because of empty extension received on overlap call\n");
 		exten[0] = 's';
 		exten[1] = '\0';
+	} else {
+		if (chan->cid.cid_dnid) {
+			ast_free(chan->cid.cid_dnid);
+		}
+		chan->cid.cid_dnid = ast_strdup(exten);
 	}
 	sig_pri_play_tone(p, -1);
 	if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num)) {
@@ -1488,7 +1493,6 @@
 							&& pri->pvts[chanpos]->call == e->ring.call
 							&& pri->pvts[chanpos]->owner) {
 							/* how to do that */
-							struct ast_channel *owner;
 							int digitlen = strlen(e->ring.callednum);
 							int i;
 
@@ -1496,29 +1500,6 @@
 								struct ast_frame f = { AST_FRAME_DTMF, e->ring.callednum[i], };
 
 								pri_queue_frame(pri->pvts[chanpos], &f, pri);
-							}
-							sig_pri_lock_owner(pri, chanpos);
-							owner = pri->pvts[chanpos]->owner;
-							if (owner) {
-								char dnid[AST_MAX_EXTENSION];
-
-								/*
-								 * Append the received info digits to the end of
-								 * the exten and dnid strings
-								 */
-								strncat(owner->exten, e->ring.callednum,
-									(sizeof(owner->exten) - 1) - strlen(owner->exten));
-								if (owner->cid.cid_dnid) {
-									ast_copy_string(dnid, owner->cid.cid_dnid,
-										sizeof(dnid));
-									ast_free(owner->cid.cid_dnid);
-								} else {
-									dnid[0] = 0;
-								}
-								strncat(dnid, e->ring.callednum,
-									(sizeof(dnid) - 1) - strlen(dnid));
-								owner->cid.cid_dnid = ast_strdup(dnid);
-								ast_channel_unlock(owner);
 							}
 						}
 						sig_pri_unlock_private(pri->pvts[chanpos]);




More information about the asterisk-commits mailing list