[asterisk-commits] murf: trunk r62690 - in /trunk: ./ cdr/ channels/ main/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 2 10:24:03 MST 2007


Author: murf
Date: Wed May  2 12:24:03 2007
New Revision: 62690

URL: http://svn.digium.com/view/asterisk?view=rev&rev=62690
Log:
Merged revisions 62689 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62689 | murf | 2007-05-02 11:10:50 -0600 (Wed, 02 May 2007) | 1 line

a)In chan_zap, set the clid, src fields in channel_alloc call. b)in the channel_alloc func, set the cid_num and name fields from the arglist[blush]. c) don't update the channel app & app data fields if you are in the 'h' extension. d)the load_module func in cdr_radius needs to return DECLINE, SUCCESS.
........

Modified:
    trunk/   (props changed)
    trunk/cdr/cdr_radius.c
    trunk/channels/chan_zap.c
    trunk/main/channel.c
    trunk/main/pbx.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/cdr/cdr_radius.c
URL: http://svn.digium.com/view/asterisk/trunk/cdr/cdr_radius.c?view=diff&rev=62690&r1=62689&r2=62690
==============================================================================
--- trunk/cdr/cdr_radius.c (original)
+++ trunk/cdr/cdr_radius.c Wed May  2 12:24:03 2007
@@ -239,6 +239,7 @@
 static int load_module(void)
 {
 	struct ast_config *cfg;
+	int res;
 	const char *tmp;
 
 	if ((cfg = ast_config_load(cdr_config))) {
@@ -257,16 +258,17 @@
 	/* read radiusclient-ng config file */
 	if (!(rh = rc_read_config(radiuscfg))) {
 		ast_log(LOG_NOTICE, "Cannot load radiusclient-ng configuration file %s.\n", radiuscfg);
-		return -1;
+		return AST_MODULE_LOAD_DECLINE;
 	}
 
 	/* read radiusclient-ng dictionaries */
 	if (rc_read_dictionary(rh, rc_conf_str(rh, "dictionary"))) {
 		ast_log(LOG_NOTICE, "Cannot load radiusclient-ng dictionary file.\n");
-		return -1;
+		return AST_MODULE_LOAD_DECLINE;
 	}
 	
-	return ast_cdr_register(name, desc, radius_log);
+	res = ast_cdr_register(name, desc, radius_log);
+	return AST_MODULE_LOAD_SUCCESS;
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "RADIUS CDR Backend");

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=62690&r1=62689&r2=62690
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Wed May  2 12:24:03 2007
@@ -5548,7 +5548,7 @@
 		}
 		y++;
 	} while (x < 3);
-	tmp = ast_channel_alloc(0, state, 0, 0, i->accountcode, i->exten, i->context, i->amaflags, b2);
+	tmp = ast_channel_alloc(0, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, i->amaflags, b2);
 	if (b2) /*!> b2 can be freed now, it's been copied into the channel structure */
 		free(b2);
 	if (!tmp)

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=62690&r1=62689&r2=62690
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Wed May  2 12:24:03 2007
@@ -710,6 +710,9 @@
 				       (long) time(NULL), ast_atomic_fetchadd_int(&uniqueint, 1));
 	}
 
+	tmp->cid.cid_name = ast_strdup(cid_name);
+	tmp->cid.cid_num = ast_strdup(cid_num);
+	
 	if (!ast_strlen_zero(name_fmt)) {
 		/* Almost every channel is calling this function, and setting the name via the ast_string_field_build() call.
 		 * And they all use slightly different formats for their name string.

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=62690&r1=62689&r2=62690
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Wed May  2 12:24:03 2007
@@ -515,7 +515,7 @@
 	const char *saved_c_appl;
 	const char *saved_c_data;
 
-	if (c->cdr)
+	if (c->cdr && !(c->exten[0] == 'h' && c->exten[1] == 0) )
 		ast_cdr_setapp(c->cdr, app->name, data);
 
 	/* save channel values */



More information about the asterisk-commits mailing list