[asterisk-commits] rmudgett: branch rmudgett/bkp_issue14068 r210896 - /team/rmudgett/bkp_issue14...

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


Author: rmudgett
Date: Thu Aug  6 15:26:21 2009
New Revision: 210896

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

Modified:
    team/rmudgett/bkp_issue14068/channels/chan_dahdi.c

Modified: team/rmudgett/bkp_issue14068/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/rmudgett/bkp_issue14068/channels/chan_dahdi.c?view=diff&rev=210896&r1=210895&r2=210896
==============================================================================
--- team/rmudgett/bkp_issue14068/channels/chan_dahdi.c (original)
+++ team/rmudgett/bkp_issue14068/channels/chan_dahdi.c Thu Aug  6 15:26:21 2009
@@ -9267,6 +9267,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);
 		}
 		tone_zone_play_tone(p->subs[idx].dfd, -1);
 		if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num)) {
@@ -14579,7 +14584,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;
 
@@ -14587,29 +14591,6 @@
 								struct ast_frame f = { AST_FRAME_DTMF, e->ring.callednum[i], };
 
 								dahdi_queue_frame(pri->pvts[chanpos], &f, pri);
-							}
-							dahdi_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);
 							}
 						}
 						ast_mutex_unlock(&pri->pvts[chanpos]->lock);




More information about the asterisk-commits mailing list