Page 521 - Asterisk™: The Future of Telephony
P. 521

APPENDIX E

                                    Asterisk Dialplan Functions















               Dialplan functions are very powerful, and once you begin using them, you will wonder
               how you got along without them. Functions are used in the dialplan in a similar manner
               to variables. If it helps, you can think of them as intelligent variables (or for those of
               you from the database world, variables with triggers). When you invoke them, they
               perform a specific action, and their result becomes a part of the command in which
               you have included the function (in exactly the same way as a variable would).


               AGENT                                              Returns information about an agent

               AGENT(agentid[:item])

               This function allows you to retrieve information pertaining to agents and may only be
               read, not set.
               The valid items to retrieve are:

               status (default)
                   The status of the agent (LOGGEDIN | LOGGEDOUT)
               password
                   The password of the agent

               name
                   The name of the agent
               mohclass
                   Music-on-hold class

               exten
                   The callback extension for the Agent (AgentCallbackLogin)
               channel
                   The name of the active channel for the Agent (AgentLogin)






                                                                                     493
   516   517   518   519   520   521   522   523   524   525   526