Expand setinterfacevar option to also set a variable, MEMBERNAME, which contains...
[asterisk/asterisk.git] / apps / app_queue.c
index 7e37b19..79a8f2e 100644 (file)
@@ -2580,8 +2580,10 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
                                ast_log(LOG_DEBUG, "app_queue: sendurl=%s.\n", url);
                        ast_channel_sendurl(peer, url);
                }
-               if (qe->parent->setinterfacevar)
+               if (qe->parent->setinterfacevar) {
                                pbx_builtin_setvar_helper(qe->chan, "MEMBERINTERFACE", member->interface);
+                               pbx_builtin_setvar_helper(qe->chan, "MEMBERNAME", member->membername);
+               }
                if (!ast_strlen_zero(agi)) {
                        if (option_debug)
                                ast_log(LOG_DEBUG, "app_queue: agi=%s.\n", agi);