[asterisk-commits] mattf: branch 1.6.0 r114422 - in /branches/1.6.0: ./ channels/chan_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 21 15:23:01 CDT 2008


Author: mattf
Date: Mon Apr 21 15:23:01 2008
New Revision: 114422

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114422
Log:
Merged revisions 114389 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r114389 | mattf | 2008-04-21 13:44:35 -0500 (Mon, 21 Apr 2008) | 1 line

Add support for generic name transmission (#12484) on SS7 in chan_zap
........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_zap.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_zap.c?view=diff&rev=114422&r1=114421&r2=114422
==============================================================================
--- branches/1.6.0/channels/chan_zap.c (original)
+++ branches/1.6.0/channels/chan_zap.c Mon Apr 21 15:23:01 2008
@@ -2380,6 +2380,7 @@
 		const char *gen_digits = NULL;
 		const char *gen_dig_type = NULL;
 		const char *gen_dig_scheme = NULL;
+		const char *gen_name = NULL;
 		const char *jip_digits = NULL;
 		const char *lspi_ident = NULL;
 		const char *rlt_flag = NULL;
@@ -2465,6 +2466,10 @@
 		if (gen_digits)
 			isup_set_gen_digits(p->ss7call, gen_digits, atoi(gen_dig_type), atoi(gen_dig_scheme)); 
 		
+		gen_name = pbx_builtin_getvar_helper(ast, "SS7_GENERIC_NAME");
+		if (gen_name)
+			isup_set_generic_name(p->ss7call, gen_name, GEN_NAME_TYPE_CALLING_NAME, GEN_NAME_AVAIL_AVAILABLE, GEN_NAME_PRES_ALLOWED);
+
 		jip_digits = pbx_builtin_getvar_helper(ast, "SS7_JIP");
 		if (jip_digits)
 			isup_set_jip_digits(p->ss7call, jip_digits);
@@ -9469,12 +9474,10 @@
 				p->ss7call = e->iam.call;
 				isup_set_call_dpc(p->ss7call, dpc);
 
-				if ( (p->use_callerid) && (!ast_strlen_zero(e->iam.calling_party_num)) )
-				{
+				if ((p->use_callerid) && (!ast_strlen_zero(e->iam.calling_party_num))) {
 					ss7_apply_plan_to_number(p->cid_num, sizeof(p->cid_num), linkset, e->iam.calling_party_num, e->iam.calling_nai);
 					p->callingpres = ss7_pres_scr2cid_pres(e->iam.presentation_ind, e->iam.screening_ind);
-				}
-				else
+				} else
 					p->cid_num[0] = 0;
 
 				if (p->immediate) {
@@ -9490,7 +9493,11 @@
 						p->exten[0] = '\0';
 
 				p->cid_ani[0] = '\0';
-				p->cid_name[0] = '\0';
+				if ((p->use_callerid) && (!ast_strlen_zero(e->iam.generic_name)))
+					ast_copy_string(p->cid_name, e->iam.generic_name, sizeof(p->cid_name));
+				else
+					p->cid_name[0] = '\0';
+				
 				p->cid_ani2 = e->iam.oli_ani2;
 				p->cid_ton = 0;
 				ast_copy_string(p->charge_number, e->iam.charge_number, sizeof(p->charge_number));




More information about the asterisk-commits mailing list