]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge Script <automerge@asterisk.org>
Wed, 28 Feb 2007 19:22:31 +0000 (19:22 +0000)
committerAutomerge Script <automerge@asterisk.org>
Wed, 28 Feb 2007 19:22:31 +0000 (19:22 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@57138 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c
pbx.c

index 2c84b8f105f0fa8aa24f6d42b40e59c0a5c2267c..9084cb09a3c16f05bf7c7af8b3cb7838006ba57e 100644 (file)
@@ -793,6 +793,8 @@ static int agent_hangup(struct ast_channel *ast)
                        } else if (!p->loginstart) {
                                p->loginchan[0] = '\0';
                                p->logincallerid[0] = '\0';
+                               if (persistent_agents)
+                                       dump_agents();
                        }
                } else if (p->dead) {
                        ast_mutex_lock(&p->chan->lock);
@@ -805,9 +807,16 @@ static int agent_hangup(struct ast_channel *ast)
                }
        }
        ast_mutex_unlock(&p->lock);
+
        /* Only register a device state change if the agent is still logged in */
-       if (p->loginstart)
+       if (!p->loginstart) {
+               p->loginchan[0] = '\0';
+               p->logincallerid[0] = '\0';
+               if (persistent_agents)
+                       dump_agents();
+       } else {
                ast_device_state_changed("Agent/%s", p->agent);
+       }
 
        if (p->pending) {
                ast_mutex_lock(&agentlock);
diff --git a/pbx.c b/pbx.c
index 7a8f9979d29d35531b468be5ded1345b90c40e55..6bdd7dd7dd1804e31834cf05ebb70fd0b744db38 100644 (file)
--- a/pbx.c
+++ b/pbx.c
@@ -319,8 +319,13 @@ static struct pbx_builtin {
        "calling channel to continue dialplan execution at the specified priority.\n"
        "If no specific extension, or extension and context, are specified, then this\n"
        "application will jump to the specified priority of the current extension.\n"
+       "  At least a priority is required as an argument, or the goto will return a -1,\n"
+       "and the channel and call will be terminated.\n"
        "  If the attempt to jump to another location in the dialplan is not successful,\n"
-       "then the channel will continue at the next priority of the current extension.\n"
+       "then the execution engine will try to find and execute the code in the 'i' (invalid)\n"
+       "extension in the current context. If that does not exist, it will try to execute the\n"
+       "'h' extension. If either or neither the 'h' or 'i' extensions have been defined, the\n"
+       "channel is hung up, and the execution of instructions on the channel is terminated.\n"
        },
 
        { "GotoIf", pbx_builtin_gotoif,
@@ -331,7 +336,12 @@ static struct pbx_builtin {
        "'labeliftrue' if the condition is true, or 'labeliffalse' if the condition is\n"
        "false. The labels are specified with the same syntax as used within the Goto\n"
        "application.  If the label chosen by the condition is omitted, no jump is\n"
-       "performed, but execution continues with the next priority in the dialplan.\n"
+       "performed, and the execution passes to the next instruction.\n"
+       "If the target location is bogus, and does not exist, the execution engine will try \n"
+       "to find and execute the code in the 'i' (invalid)\n"
+       "extension in the current context. If that does not exist, it will try to execute the\n"
+       "'h' extension. If either or neither the 'h' or 'i' extensions have been defined, the\n"
+       "channel is hung up, and the execution of instructions on the channel is terminated.\n"
        },
 
        { "GotoIfTime", pbx_builtin_gotoiftime,
@@ -341,6 +351,7 @@ static struct pbx_builtin {
        "int the dialplan if the current time matches the given time specification.\n"
        "Further information on the time specification can be found in examples\n"
        "illustrating how to do time-based context includes in the dialplan.\n" 
+       "If the target jump location is bogus, the same actions would be taken as for Goto.\n"
        },
 
        { "ExecIfTime", pbx_builtin_execiftime,