Cleanup formatting in bug 2741 patch
[asterisk/asterisk.git] / res / res_features.c
index 560885a..f79d2b4 100755 (executable)
@@ -241,7 +241,7 @@ int ast_park_call(struct ast_channel *chan, struct ast_channel *peer, int timeou
                        }
                        if (con) {
                                snprintf(exten, sizeof(exten), "%d", x);
-                               ast_add_extension2(con, 1, exten, 1, NULL, parkedcall, strdup(exten), free, registrar);
+                               ast_add_extension2(con, 1, exten, 1, NULL, NULL, parkedcall, strdup(exten), free, registrar);
                        }
                        return 0;
                } else {
@@ -304,6 +304,12 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
        int allowdisconnect_in,allowdisconnect_out,allowredirect_in,allowredirect_out;
        char *monitor_exec;
 
+       if (chan && peer) {
+               pbx_builtin_setvar_helper(chan, "BRIDGEPEER", peer->name);
+               pbx_builtin_setvar_helper(peer, "BRIDGEPEER", chan->name);
+       } else if (chan)
+               pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", NULL);
+
        if (monitor_ok) {
                if (!monitor_app) { 
                        if (!(monitor_app = pbx_findapp("Monitor")))
@@ -482,6 +488,8 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
                                        }
                                        /* XXX Maybe we should have another message here instead of invalid extension XXX */
                                } else if (ast_exists_extension(transferee, transferer_real_context, newext, 1, transferer->cid.cid_num)) {
+                                       pbx_builtin_setvar_helper(peer, "BLINDTRANSFER", chan->name);
+                                       pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", peer->name);
                                        ast_moh_stop(transferee);
                                        res=ast_autoservice_stop(transferee);
                                        if (!transferee->pbx) {
@@ -930,7 +938,7 @@ int load_module(void)
                        return -1;
                }
        }
-       ast_add_extension2(con, 1, ast_parking_ext(), 1, NULL, parkcall, strdup(""),free, registrar);
+       ast_add_extension2(con, 1, ast_parking_ext(), 1, NULL, NULL, parkcall, strdup(""),free, registrar);
        ast_pthread_create(&parking_thread, NULL, do_parking_thread, NULL);
        res = ast_register_application(parkedcall, park_exec, synopsis, descrip);
        if (!res)