Deprecated macro usage for connected line, redirecting, and CCSS
[asterisk/asterisk.git] / main / dial.c
index 3455ca3..fe8a74f 100644 (file)
@@ -437,13 +437,15 @@ static void handle_frame(struct ast_dial *dial, struct ast_dial_channel *channel
                        break;
                case AST_CONTROL_CONNECTED_LINE:
                        ast_verb(3, "%s connected line has changed, passing it to %s\n", ast_channel_name(channel->owner), ast_channel_name(chan));
-                       if (ast_channel_connected_line_macro(channel->owner, chan, fr, 1, 1)) {
+                       if (ast_channel_connected_line_sub(channel->owner, chan, fr, 1) &&
+                               ast_channel_connected_line_macro(channel->owner, chan, fr, 1, 1)) {
                                ast_indicate_data(chan, AST_CONTROL_CONNECTED_LINE, fr->data.ptr, fr->datalen);
                        }
                        break;
                case AST_CONTROL_REDIRECTING:
                        ast_verb(3, "%s redirecting info has changed, passing it to %s\n", ast_channel_name(channel->owner), ast_channel_name(chan));
-                       if (ast_channel_redirecting_macro(channel->owner, chan, fr, 1, 1)) {
+                       if (ast_channel_redirecting_sub(channel->owner, chan, fr, 1) &&
+                               ast_channel_redirecting_macro(channel->owner, chan, fr, 1, 1)) {
                                ast_indicate_data(chan, AST_CONTROL_REDIRECTING, fr->data.ptr, fr->datalen);
                        }
                        break;