Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv16500

Modified Files:
        ChangeLog channel.c 
Log Message:
issue #5564


Index: ChangeLog
===================================================================
RCS file: /usr/cvsroot/asterisk/ChangeLog,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ChangeLog   1 Nov 2005 21:02:07 -0000       1.7
+++ ChangeLog   1 Nov 2005 21:11:56 -0000       1.8
@@ -1,5 +1,9 @@
 2005-11-01  Kevin P. Fleming  <[EMAIL PROTECTED]>
 
+       * apps/app_parkandannounce.c (parkandannounce_exec): supply parent 
channel to ast_request_and_dial so channel variables can be inherited (issue 
#5564)
+       * include/asterisk/channel.h: add parent_channel field
+       * channel.c (__ast_request_and_dial): use parent_channel field to 
inherit variables into new channel
+
        * apps/app_cut.c (cut_internal): use ast_separate_app_args() instead of 
open code (issue #5560)
 
        * apps/app_mixmonitor.c (launch_monitor_thread): ast_strlen_zero can 
handle NULL input (issue #5561)

Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -d -r1.256 -r1.257
--- channel.c   1 Nov 2005 18:48:05 -0000       1.256
+++ channel.c   1 Nov 2005 21:11:56 -0000       1.257
@@ -2355,8 +2355,12 @@
        chan = ast_request(type, format, data, &cause);
        if (chan) {
                if (oh) {
-                       ast_set_variables(chan, oh->vars);
-                       ast_set_callerid(chan, oh->cid_num, oh->cid_name, 
oh->cid_num);
+                       if (oh->vars)   
+                               ast_set_variables(chan, oh->vars);
+                       if (oh->cid_num && *oh->cid_num && oh->cid_name && 
*oh->cid_name)
+                               ast_set_callerid(chan, oh->cid_num, 
oh->cid_name, oh->cid_num);
+                       if (oh->parent_channel)
+                               
ast_channel_inherit_variables(oh->parent_channel, chan);
                }
                ast_set_callerid(chan, cid_num, cid_name, cid_num);
 

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to