[svn-commits] rmudgett: branch rmudgett/cid r264624 - in /team/rmudgett/cid: channels/ incl...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 20 12:00:12 CDT 2010


Author: rmudgett
Date: Thu May 20 12:00:10 2010
New Revision: 264624

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=264624
Log:
Move ast_channel.cid.cid_ton to ast_channel.caller.id.number.plan.

Modified:
    team/rmudgett/cid/channels/chan_iax2.c
    team/rmudgett/cid/channels/chan_misdn.c
    team/rmudgett/cid/include/asterisk/channel.h
    team/rmudgett/cid/main/pbx.c
    team/rmudgett/cid/tests/test_substitution.c

Modified: team/rmudgett/cid/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/channels/chan_iax2.c?view=diff&rev=264624&r1=264623&r2=264624
==============================================================================
--- team/rmudgett/cid/channels/chan_iax2.c (original)
+++ team/rmudgett/cid/channels/chan_iax2.c Thu May 20 12:00:10 2010
@@ -5556,7 +5556,7 @@
 	tmp->redirecting.from.XXX_number.valid = 1;
 	tmp->redirecting.from.XXX_number.str = ast_strdup(i->rdnis);
 	tmp->cid.cid_pres = i->calling_pres;
-	tmp->cid.cid_ton = i->calling_ton;
+	tmp->caller.id.XXX_number.plan = i->calling_ton;
 	tmp->dialed.transit_network_select = i->calling_tns;
 	if (!ast_strlen_zero(i->language))
 		ast_string_field_set(tmp, language, i->language);

Modified: team/rmudgett/cid/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/channels/chan_misdn.c?view=diff&rev=264624&r1=264623&r2=264624
==============================================================================
--- team/rmudgett/cid/channels/chan_misdn.c (original)
+++ team/rmudgett/cid/channels/chan_misdn.c Thu May 20 12:00:10 2010
@@ -9842,7 +9842,7 @@
 		/* Update asterisk channel caller information */
 		chan_misdn_log(2, bc->port, " --> TON: %s(%d)\n", misdn_to_str_ton(bc->caller.number_type), bc->caller.number_type);
 		chan_misdn_log(2, bc->port, " --> PLAN: %s(%d)\n", misdn_to_str_plan(bc->caller.number_plan), bc->caller.number_plan);
-		chan->cid.cid_ton = misdn_to_ast_ton(bc->caller.number_type)
+		chan->caller.id.XXX_number.plan = misdn_to_ast_ton(bc->caller.number_type)
 			| misdn_to_ast_plan(bc->caller.number_plan);
 
 		chan_misdn_log(2, bc->port, " --> PRES: %s(%d)\n", misdn_to_str_pres(bc->caller.presentation), bc->caller.presentation);

Modified: team/rmudgett/cid/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/include/asterisk/channel.h?view=diff&rev=264624&r1=264623&r2=264624
==============================================================================
--- team/rmudgett/cid/include/asterisk/channel.h (original)
+++ team/rmudgett/cid/include/asterisk/channel.h Thu May 20 12:00:10 2010
@@ -326,16 +326,6 @@
 	 * (Field will eventually move to struct ast_channel.caller.ani2)
 	 */
 	int cid_ani2;
-
-	/*!
-	 * \brief Callerid Q.931 encoded type-of-number/numbering-plan fields
-	 * \note Currently this value is mostly just passed around the system.
-	 * The H.323 interfaces set the value from received messages and uses the value for sent messages.
-	 * The DAHDI PRI interfaces set the value from received messages but does not use it for sent messages.
-	 * You can read it and set it but only H.323 uses it.
-	 * (Field will eventually move to struct ast_channel.caller.id.number_type)
-	 */
-	int cid_ton;
 };
 
 /*!

Modified: team/rmudgett/cid/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/main/pbx.c?view=diff&rev=264624&r1=264623&r2=264624
==============================================================================
--- team/rmudgett/cid/main/pbx.c (original)
+++ team/rmudgett/cid/main/pbx.c Thu May 20 12:00:10 2010
@@ -3017,7 +3017,7 @@
 					ast_str_set(str, maxlen, "%d", c->cid.cid_ani2);
 					s = ast_str_buffer(*str);
 				} else if (!strcmp(var + 7, "TON")) {		/* CALLINGTON */
-					ast_str_set(str, maxlen, "%d", c->cid.cid_ton);
+					ast_str_set(str, maxlen, "%d", c->caller.id.XXX_number.plan);
 					s = ast_str_buffer(*str);
 				} else if (!strcmp(var + 7, "TNS")) {		/* CALLINGTNS */
 					ast_str_set(str, maxlen, "%d", c->dialed.transit_network_select);

Modified: team/rmudgett/cid/tests/test_substitution.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/tests/test_substitution.c?view=diff&rev=264624&r1=264623&r2=264624
==============================================================================
--- team/rmudgett/cid/tests/test_substitution.c (original)
+++ team/rmudgett/cid/tests/test_substitution.c Thu May 20 12:00:10 2010
@@ -222,7 +222,7 @@
 #define TEST(t) if (t == AST_TEST_FAIL) { res = AST_TEST_FAIL; }
 	TEST(test_chan_integer(test, c, &c->cid.cid_pres, "${CALLINGPRES}"));
 	TEST(test_chan_integer(test, c, &c->cid.cid_ani2, "${CALLINGANI2}"));
-	TEST(test_chan_integer(test, c, &c->cid.cid_ton, "${CALLINGTON}"));
+	TEST(test_chan_integer(test, c, &c->caller.id.XXX_number.plan, "${CALLINGTON}"));
 	TEST(test_chan_integer(test, c, &c->dialed.transit_network_select, "${CALLINGTNS}"));
 	TEST(test_chan_integer(test, c, &c->hangupcause, "${HANGUPCAUSE}"));
 	TEST(test_chan_integer(test, c, &c->priority, "${PRIORITY}"));




More information about the svn-commits mailing list