Merge "chan_sip: Fix lastrtprx always updated"
authorJoshua Colp <jcolp@digium.com>
Tue, 16 Aug 2016 15:26:27 +0000 (10:26 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Tue, 16 Aug 2016 15:26:27 +0000 (10:26 -0500)
30 files changed:
addons/chan_ooh323.c
apps/app_dial.c
apps/app_userevent.c
channels/chan_dahdi.c
channels/chan_iax2.c
channels/pjsip/dialplan_functions.c
channels/sip/dialplan_functions.c
configs/samples/asterisk.conf.sample
doc/appdocsxml.dtd
funcs/func_channel.c
include/asterisk/utils.h
main/aoc.c
main/asterisk.c
main/bridge.c
main/features.c
main/manager.c
main/manager_bridges.c
main/manager_channels.c
main/pbx.c
main/rtp_engine.c
main/sorcery.c
main/stasis.c
main/stasis_bridges.c
main/utils.c
pbx/pbx_dundi.c
res/res_agi.c
res/res_corosync.c
res/res_pjsip_publish_asterisk.c
res/res_sorcery_config.c
res/res_xmpp.c

index 7e50bbf..127ba0c 100644 (file)
        <support_level>extended</support_level>
  ***/
 
+/*** DOCUMENTATION
+<info name="OOH323CHANNEL" language="en_US" tech="OOH323">
+       <enumlist>
+               <enum name="faxdetect">
+                       <para>R/W Fax Detect</para>
+                       <para>Returns 0 or 1</para>
+                       <para>Write yes or no</para>
+               </enum>
+               <enum name="t38support">
+                       <para>R/W t38support</para>
+                       <para>Returns 0 or 1</para>
+                       <para>Write yes or no</para>
+               </enum>
+               <enum name="h323id_url">
+                       <para>R/0 Returns caller URL</para>
+                       </enum>
+               <enum name="caller_h323id">
+                       <para>R/0 Returns caller h323id</para>
+               </enum>
+               <enum name="caller_dialeddigits">
+                       <para>R/0 Returns caller dialed digits</para>
+               </enum>
+               <enum name="caller_email">
+                       <para>R/0 Returns caller email</para>
+               </enum>
+               <enum name="callee_email">
+                       <para>R/0 Returns callee email</para>
+               </enum>
+               <enum name="callee_dialeddigits">
+                       <para>R/0 Returns callee dialed digits</para>
+               </enum>
+               <enum name="caller_url">
+                       <para>R/0 Returns caller URL</para>
+               </enum>
+               <enum name="max_forwards">
+                       <para>R/W Get or set the maximum number of call forwards for this channel.
+
+                       This number describes the number of times a call may be forwarded by this channel
+                       before the call fails. "Forwards" in this case refers to redirects by phones as well
+                       as calls to local channels.
+
+                       Note that this has no relation to the SIP Max-Forwards header.
+                       </para>
+               </enum>
+       </enumlist>
+</info>
+ ***/
+
 #include "chan_ooh323.h"
 #include <math.h>
 
index c4d5273..48193b5 100644 (file)
@@ -103,15 +103,16 @@ ASTERISK_REGISTER_FILE()
                                <option name="a">
                                        <para>Immediately answer the calling channel when the called channel answers in
                                        all cases. Normally, the calling channel is answered when the called channel
-                                       answers, but when options such as A() and M() are used, the calling channel is
+                                       answers, but when options such as <literal>A()</literal> and
+                                       <literal>M()</literal> are used, the calling channel is
                                        not answered until all actions on the called channel (such as playing an
                                        announcement) are completed.  This option can be used to answer the calling
                                        channel before doing anything on the called channel. You will rarely need to use
                                        this option, the default behavior is adequate in most cases.</para>
                                </option>
                                <option name="b" argsep="^">
-                                       <para>Before initiating an outgoing call, Gosub to the specified
-                                       location using the newly created channel.  The Gosub will be
+                                       <para>Before initiating an outgoing call, <literal>Gosub</literal> to the specified
+                                       location using the newly created channel.  The <literal>Gosub</literal> will be
                                        executed for each destination channel.</para>
                                        <argument name="context" required="false" />
                                        <argument name="exten" required="false" />
@@ -121,8 +122,8 @@ ASTERISK_REGISTER_FILE()
                                        </argument>
                                </option>
                                <option name="B" argsep="^">
-                                       <para>Before initiating the outgoing call(s), Gosub to the specified
-                                       location using the current channel.</para>
+                                       <para>Before initiating the outgoing call(s), <literal>Gosub</literal> to the
+                                       specified location using the current channel.</para>
                                        <argument name="context" required="false" />
                                        <argument name="exten" required="false" />
                                        <argument name="priority" required="true" hasparams="optional" argsep="^">
@@ -134,7 +135,8 @@ ASTERISK_REGISTER_FILE()
                                        <para>Reset the call detail record (CDR) for this call.</para>
                                </option>
                                <option name="c">
-                                       <para>If the Dial() application cancels this call, always set HANGUPCAUSE to 'answered elsewhere'</para>
+                                       <para>If the Dial() application cancels this call, always set
+                                       <variable>HANGUPCAUSE</variable> to 'answered elsewhere'</para>
                                </option>
                                <option name="d">
                                        <para>Allow the calling user to dial a 1 digit extension while waiting for
@@ -156,8 +158,8 @@ ASTERISK_REGISTER_FILE()
                                        <replaceable>called</replaceable> DTMF string is sent to the called party, and the
                                        <replaceable>calling</replaceable> DTMF string is sent to the calling party.  Both arguments
                                        can be used alone.  If <replaceable>progress</replaceable> is specified, its DTMF is sent
-                                       to the called party immediately after receiving a PROGRESS message.</para>
-                                       <para>See SendDTMF for valid digits.</para>
+                                       to the called party immediately after receiving a <literal>PROGRESS</literal> message.</para>
+                                       <para>See <literal>SendDTMF</literal> for valid digits.</para>
                                </option>
                                <option name="e">
                                        <para>Execute the <literal>h</literal> extension for peer after the call ends</para>
@@ -165,7 +167,7 @@ ASTERISK_REGISTER_FILE()
                                <option name="f">
                                        <argument name="x" required="false" />
                                        <para>If <replaceable>x</replaceable> is not provided, force the CallerID sent on a call-forward or
-                                       deflection to the dialplan extension of this Dial() using a dialplan <literal>hint</literal>.
+                                       deflection to the dialplan extension of this <literal>Dial()</literal> using a dialplan <literal>hint</literal>.
                                        For example, some PSTNs do not allow CallerID to be set to anything
                                        other than the numbers assigned to you.
                                        If <replaceable>x</replaceable> is provided, force the CallerID sent to <replaceable>x</replaceable>.</para>
@@ -318,11 +320,11 @@ ASTERISK_REGISTER_FILE()
                                        <note>
                                                <para>You cannot use any additional action post answer options in conjunction
                                                with this option. Also, pbx services are run on the peer (called) channel,
-                                               so you will not be able to set timeouts via the TIMEOUT() function in this macro.</para>
+                                               so you will not be able to set timeouts via the <literal>TIMEOUT()</literal> function in this macro.</para>
                                        </note>
                                        <warning><para>Be aware of the limitations that macros have, specifically with regards to use of
                                        the <literal>WaitExten</literal> application. For more information, see the documentation for
-                                       Macro()</para></warning>
+                                       <literal>Macro()</literal>.</para></warning>
                                </option>
                                <option name="n">
                                        <argument name="delete">
@@ -339,7 +341,7 @@ ASTERISK_REGISTER_FILE()
                                </option>
                                <option name="N">
                                        <para>This option is a modifier for the call screening/privacy mode. It specifies
-                                       that if Caller*ID is present, do not screen the call.</para>
+                                       that if CallerID is present, do not screen the call.</para>
                                </option>
                                <option name="o">
                                        <argument name="x" required="false" />
@@ -347,7 +349,7 @@ ASTERISK_REGISTER_FILE()
                                        <emphasis>calling</emphasis> channel be stored as the CallerID on the <emphasis>called</emphasis> channel.
                                        This was the behavior of Asterisk 1.0 and earlier.
                                        If <replaceable>x</replaceable> is provided, specify the CallerID stored on the <emphasis>called</emphasis> channel.
-                                       Note that o(${CALLERID(all)}) is similar to option o without the parameter.</para>
+                                       Note that <literal>o(${CALLERID(all)})</literal> is similar to option <literal>o</literal> without the parameter.</para>
                                </option>
                                <option name="O">
                                        <argument name="mode">
@@ -377,13 +379,13 @@ ASTERISK_REGISTER_FILE()
                                        <para>Default: Indicate ringing to the calling party, even if the called party isn't actually ringing. Pass no audio to the calling
                                        party until the called channel has answered.</para>
                                        <argument name="tone" required="false">
-                                               <para>Indicate progress to calling party. Send audio 'tone' from the indications.conf tonezone currently in use.</para>
+                                               <para>Indicate progress to calling party. Send audio 'tone' from the <filename>indications.conf</filename> tonezone currently in use.</para>
                                        </argument>
                                </option>
-                                <option name="R">
-                                        <para>Default: Indicate ringing to the calling party, even if the called party isn't actually ringing. 
+                               <option name="R">
+                                       <para>Default: Indicate ringing to the calling party, even if the called party isn't actually ringing. 
                                        Allow interruption of the ringback if early media is received on the channel.</para>
-                                </option>
+                               </option>
                                <option name="S">
                                        <argument name="x" required="true" />
                                        <para>Hang up the call <replaceable>x</replaceable> seconds <emphasis>after</emphasis> the called party has
@@ -391,8 +393,8 @@ ASTERISK_REGISTER_FILE()
                                </option>
                                <option name="s">
                                        <argument name="x" required="true" />
-                                       <para>Force the outgoing callerid tag parameter to be set to the string <replaceable>x</replaceable>.</para>
-                                       <para>Works with the f option.</para>
+                                       <para>Force the outgoing CallerID tag parameter to be set to the string <replaceable>x</replaceable>.</para>
+                                       <para>Works with the <literal>f</literal> option.</para>
                                </option>
                                <option name="t">
                                        <para>Allow the called party to transfer the calling party by sending the
@@ -406,15 +408,15 @@ ASTERISK_REGISTER_FILE()
                                </option>
                                <option name="U" argsep="^">
                                        <argument name="x" required="true">
-                                               <para>Name of the subroutine to execute via Gosub</para>
+                                               <para>Name of the subroutine to execute via <literal>Gosub</literal></para>
                                        </argument>
                                        <argument name="arg" multiple="true" required="false">
-                                               <para>Arguments for the Gosub routine</para>
+                                               <para>Arguments for the <literal>Gosub</literal> routine</para>
                                        </argument>
-                                       <para>Execute via Gosub the routine <replaceable>x</replaceable> for the <emphasis>called</emphasis> channel before connecting
-                                       to the calling channel. Arguments can be specified to the Gosub
-                                       using <literal>^</literal> as a delimiter. The Gosub routine can set the variable
-                                       <variable>GOSUB_RESULT</variable> to specify the following actions after the Gosub returns.</para>
+                                       <para>Execute via <literal>Gosub</literal> the routine <replaceable>x</replaceable> for the <emphasis>called</emphasis> channel before connecting
+                                       to the calling channel. Arguments can be specified to the <literal>Gosub</literal>
+                                       using <literal>^</literal> as a delimiter. The <literal>Gosub</literal> routine can set the variable
+                                       <variable>GOSUB_RESULT</variable> to specify the following actions after the <literal>Gosub</literal> returns.</para>
                                        <variablelist>
                                                <variable name="GOSUB_RESULT">
                                                        <value name="ABORT">
@@ -438,7 +440,7 @@ ASTERISK_REGISTER_FILE()
                                        <note>
                                                <para>You cannot use any additional action post answer options in conjunction
                                                with this option. Also, pbx services are run on the peer (called) channel,
-                                               so you will not be able to set timeouts via the TIMEOUT() function in this routine.</para>
+                                               so you will not be able to set timeouts via the <literal>TIMEOUT()</literal> function in this routine.</para>
                                        </note>
                                </option>
                                <option name="u">
@@ -455,7 +457,7 @@ ASTERISK_REGISTER_FILE()
                                                <literal>prohib</literal>
                                                <literal>unavailable</literal></para>
                                        </argument>
-                                       <para>Works with the f option.</para>
+                                       <para>Works with the <literal>f</literal> option.</para>
                                </option>
                                <option name="w">
                                        <para>Allow the called party to enable recording of the call by sending
@@ -497,11 +499,59 @@ ASTERISK_REGISTER_FILE()
                        hangs up, or if the call is bridged and either of the parties in the bridge
                        ends the call.</para>
                        <para>If the <variable>OUTBOUND_GROUP</variable> variable is set, all peer channels created by this
-                       application will be put into that group (as in Set(GROUP()=...).
+                       application will be put into that group (as in <literal>Set(GROUP()=...</literal>).
                        If the <variable>OUTBOUND_GROUP_ONCE</variable> variable is set, all peer channels created by this
-                       application will be put into that group (as in Set(GROUP()=...). Unlike <variable>OUTBOUND_GROUP</variable>,
+                       application will be put into that group (as in <literal>Set(GROUP()=...</literal>). Unlike <variable>OUTBOUND_GROUP</variable>,
                        however, the variable will be unset after use.</para>
 
+                       <example title="Dial with 30 second timeout">
+                        same => n,Dial(PJSIP/alice,30)
+                       </example>
+                       <example title="Parallel dial with 45 second timeout">
+                        same => n,Dial(PJSIP/alice&amp;PJIP/bob,45)
+                       </example>
+                       <example title="Dial with 'g' continuation option">
+                        same => n,Dial(PJSIP/alice,,g)
+                        same => n,Log(NOTICE, Alice call result: ${DIALSTATUS})
+                       </example>
+                       <example title="Dial with transfer/recording features for calling party">
+                        same => n,Dial(PJSIP/alice,,TX)
+                       </example>
+                       <example title="Dial with call length limit">
+                        same => n,Dial(PJSIP/alice,,L(60000:30000:10000))
+                       </example>
+                       <example title="Dial with pre-dial subroutines">
+                       [default]
+
+                       exten => callee_channel,1,NoOp()
+                        same => n,Log(NOTICE, I'm called on channel ${CHANNEL} prior to it starting the dial attempt)
+                        same => n,Return()
+
+                       exten => called_channel,1,NoOp()
+                        same => n,Log(NOTICE, I'm called on outbound channel ${CHANNEL} prior to it being used to dial someone)
+                        same => n,Return()
+
+                       exten => _X.,1,NoOp()
+                        same => n,Dial(PJSIP/alice,,b(default^called_channel^1)B(default^callee_channel^1))
+                        same => n,Hangup()
+                       </example>
+                       <example title="Dial with post-answer subroutine executed on outbound channel">
+                       [default]
+
+                       exten => called_channel,1,NoOp()
+                        same => n,Playback(hello)
+                        same => n,Return()
+
+                       exten => _X.,1,NoOp()
+                        same => n,Dial(PJSIP/alice,,U(default^called_channel^1))
+                        same => n,Hangup()
+                       </example>
+                       <example title="Dial into ConfBridge using 'G' option">
+                        same => n,Dial(PJSIP/alice,,G(jump_to_here))
+                        same => n(jump_to_here),Goto(confbridge)
+                        same => n,Goto(confbridge)
+                        same => n(confbridge),ConfBridge(${EXTEN})
+                       </example>
                        <para>This application sets the following channel variables:</para>
                        <variablelist>
                                <variable name="DIALEDTIME">
@@ -510,6 +560,15 @@ ASTERISK_REGISTER_FILE()
                                <variable name="ANSWEREDTIME">
                                        <para>This is the amount of time for actual call.</para>
                                </variable>
+                               <variable name="DIALEDPEERNAME">
+                                       <para>The name of the outbound channel that answered the call.</para>
+                               </variable>
+                               <variable name="DIALEDPEERNUMBER">
+                                       <para>The number that was dialed for the answered outbound channel.</para>
+                               </variable>
+                               <variable name="FORWARDERNAME">
+                                       <para>If a call forward occurred, the name of the forwarded channel.</para>
+                               </variable>
                                <variable name="DIALSTATUS">
                                        <para>This is the status of the call</para>
                                        <value name="CHANUNAVAIL" />
@@ -530,6 +589,12 @@ ASTERISK_REGISTER_FILE()
                                </variable>
                        </variablelist>
                </description>
+               <see-also>
+                       <ref type="application">RetryDial</ref>
+                       <ref type="application">SendDTMF</ref>
+                       <ref type="application">Gosub</ref>
+                       <ref type="application">Macro</ref>
+               </see-also>
        </application>
        <application name="RetryDial" language="en_US">
                <synopsis>
@@ -562,6 +627,9 @@ ASTERISK_REGISTER_FILE()
                        The <replaceable>dialargs</replaceable> are specified in the same format that arguments are provided
                        to the Dial application.</para>
                </description>
+               <see-also>
+                       <ref type="application">Dial</ref>
+               </see-also>
        </application>
  ***/
 
index c4f985f..826b4dc 100644 (file)
@@ -62,6 +62,10 @@ ASTERISK_REGISTER_FILE()
                        <replaceable>eventname</replaceable> under the
                        <literal>eventname</literal> key.</para>
                </description>
+               <see-also>
+                       <ref type="manager">UserEvent</ref>
+                       <ref type="managerEvent">UserEvent</ref>
+               </see-also>
        </application>
  ***/
 
index 7a3c31f..cbe7dba 100644 (file)
@@ -178,6 +178,60 @@ ASTERISK_REGISTER_FILE()
                        <para>This application will Accept the R2 call either with charge or no charge.</para>
                </description>
        </application>
+       <info name="DAHDICHANNEL" language="en_US" tech="DAHDI">
+               <enumlist>
+                       <enum name="dahdi_channel">
+                               <para>R/O DAHDI channel related to this channel.</para>
+                       </enum>
+                       <enum name="dahdi_span">
+                               <para>R/O DAHDI span related to this channel.</para>
+                       </enum>
+                       <enum name="dahdi_type">
+                               <para>R/O DAHDI channel type, one of:</para>
+                               <enumlist>
+                                       <enum name="analog" />
+                                       <enum name="mfc/r2" />
+                                       <enum name="pri" />
+                                       <enum name="pseudo" />
+                                       <enum name="ss7" />
+                               </enumlist>
+                       </enum>
+                       <enum name="keypad_digits">
+                               <para>R/O PRI Keypad digits that came in with the SETUP message.</para>
+                       </enum>
+                       <enum name="reversecharge">
+                               <para>R/O PRI Reverse Charging Indication, one of:</para>
+                               <enumlist>
+                                       <enum name="-1"> <para>None</para></enum>
+                                       <enum name=" 1"> <para>Reverse Charging Requested</para></enum>
+                               </enumlist>
+                       </enum>
+                       <enum name="no_media_path">
+                               <para>R/O PRI Nonzero if the channel has no B channel.
+                               The channel is either on hold or a call waiting call.</para>
+                       </enum>
+                       <enum name="buffers">
+                               <para>W/O Change the channel's buffer policy (for the current call only)</para>
+                               <para>This option takes two arguments:</para>
+                               <para>  Number of buffers,</para>
+                               <para>  Buffer policy being one of:</para>
+                               <para>      <literal>full</literal></para>
+                               <para>      <literal>immediate</literal></para>
+                               <para>      <literal>half</literal></para>
+                       </enum>
+                       <enum name="echocan_mode">
+                               <para>W/O Change the configuration of the active echo
+                               canceller on the channel (if any), for the current call
+                               only.</para>
+                               <para>Possible values are:</para>
+                               <para>  <literal>on</literal>   Normal mode (the echo canceller is actually reinitalized)</para>
+                               <para>  <literal>off</literal>  Disabled</para>
+                               <para>  <literal>fax</literal>  FAX/data mode (NLP disabled if possible, otherwise
+                                       completely disabled)</para>
+                               <para>  <literal>voice</literal>        Voice mode (returns from FAX mode, reverting the changes that were made)</para>
+                       </enum>
+               </enumlist>
+       </info>
        <manager name="DAHDITransfer" language="en_US">
                <synopsis>
                        Transfer DAHDI Channel.
index 721da9a..1b3e287 100644 (file)
@@ -212,6 +212,25 @@ ASTERISK_REGISTER_FILE()
                        <para>Gets or sets a variable that is sent to a remote IAX2 peer during call setup.</para>
                </description>
        </function>
+       <info name="IAXCHANNEL" language="en_US" tech="IAX">
+               <enumlist>
+                       <enum name="osptoken">
+                               <para>R/O Get the peer's osptoken.</para>
+                       </enum>
+                       <enum name="peerip">
+                               <para>R/O Get the peer's ip address.</para>
+                       </enum>
+                       <enum name="peername">
+                               <para>R/O Get the peer's username.</para>
+                       </enum>
+                       <enum name="secure_signaling">
+                               <para>R/O Get the if the IAX channel is secured.</para>
+                       </enum>
+                       <enum name="secure_media">
+                               <para>R/O Get the if the IAX channel is secured.</para>
+                       </enum>
+               </enumlist>
+       </info>
        <manager name="IAXpeers" language="en_US">
                <synopsis>
                        List IAX peers.
index c1a3873..322f564 100644 (file)
                </enum>
        </enumlist>
 </info>
+<info name="PJSIPCHANNEL_EXAMPLES" language="en_US" tech="PJSIP">
+       <example title="PJSIP specific CHANNEL examples">
+               ; Log the current Call-ID
+               same => n,Log(NOTICE, ${CHANNEL(pjsip,call-id)})
+
+               ; Log the destination address of the audio stream
+               same => n,Log(NOTICE, ${CHANNEL(rtp,dest)})
+
+               ; Store the round-trip time associated with a
+               ; video stream in the CDR field video-rtt
+               same => n,Set(CDR(video-rtt)=${CHANNEL(rtcp,rtt,video)})
+       </example>
+</info>
 ***/
 
 #include "asterisk.h"
index 644da38..9883788 100644 (file)
        <support_level>extended</support_level>
  ***/
 
+/*** DOCUMENTATION
+<info name="SIPCHANNEL" language="en_US" tech="SIP">
+       <enumlist>
+               <enum name="peerip">
+                       <para>R/O Get the IP address of the peer.</para>
+               </enum>
+               <enum name="recvip">
+                       <para>R/O Get the source IP address of the peer.</para>
+               </enum>
+               <enum name="recvport">
+                       <para>R/O Get the source port of the peer.</para>
+               </enum>
+               <enum name="from">
+                       <para>R/O Get the URI from the From: header.</para>
+               </enum>
+               <enum name="uri">
+                       <para>R/O Get the URI from the Contact: header.</para>
+               </enum>
+               <enum name="useragent">
+                       <para>R/O Get the useragent.</para>
+               </enum>
+               <enum name="peername">
+                       <para>R/O Get the name of the peer.</para>
+               </enum>
+               <enum name="t38passthrough">
+                       <para>R/O <literal>1</literal> if T38 is offered or enabled in this channel,
+                       otherwise <literal>0</literal></para>
+               </enum>
+               <enum name="rtpqos">
+                       <para>R/O Get QOS information about the RTP stream</para>
+                       <para>    This option takes two additional arguments:</para>
+                       <para>    Argument 1:</para>
+                       <para>     <literal>audio</literal>             Get data about the audio stream</para>
+                       <para>     <literal>video</literal>             Get data about the video stream</para>
+                       <para>     <literal>text</literal>              Get data about the text stream</para>
+                       <para>    Argument 2:</para>
+                       <para>     <literal>local_ssrc</literal>        Local SSRC (stream ID)</para>
+                       <para>     <literal>local_lostpackets</literal> Local lost packets</para>
+                       <para>     <literal>local_jitter</literal>      Local calculated jitter</para>
+                       <para>     <literal>local_maxjitter</literal>   Local calculated jitter (maximum)</para>
+                       <para>     <literal>local_minjitter</literal>   Local calculated jitter (minimum)</para>
+                       <para>     <literal>local_normdevjitter</literal>Local calculated jitter (normal deviation)</para>
+                       <para>     <literal>local_stdevjitter</literal> Local calculated jitter (standard deviation)</para>
+                       <para>     <literal>local_count</literal>       Number of received packets</para>
+                       <para>     <literal>remote_ssrc</literal>       Remote SSRC (stream ID)</para>
+                       <para>     <literal>remote_lostpackets</literal>Remote lost packets</para>
+                       <para>     <literal>remote_jitter</literal>     Remote reported jitter</para>
+                       <para>     <literal>remote_maxjitter</literal>  Remote calculated jitter (maximum)</para>
+                       <para>     <literal>remote_minjitter</literal>  Remote calculated jitter (minimum)</para>
+                       <para>     <literal>remote_normdevjitter</literal>Remote calculated jitter (normal deviation)</para>
+                       <para>     <literal>remote_stdevjitter</literal>Remote calculated jitter (standard deviation)</para>
+                       <para>     <literal>remote_count</literal>      Number of transmitted packets</para>
+                       <para>     <literal>rtt</literal>               Round trip time</para>
+                       <para>     <literal>maxrtt</literal>            Round trip time (maximum)</para>
+                       <para>     <literal>minrtt</literal>            Round trip time (minimum)</para>
+                       <para>     <literal>normdevrtt</literal>        Round trip time (normal deviation)</para>
+                       <para>     <literal>stdevrtt</literal>          Round trip time (standard deviation)</para>
+                       <para>     <literal>all</literal>               All statistics (in a form suited to logging,
+                       but not for parsing)</para>
+               </enum>
+               <enum name="rtpdest">
+                       <para>R/O Get remote RTP destination information.</para>
+                       <para>   This option takes one additional argument:</para>
+                       <para>    Argument 1:</para>
+                       <para>     <literal>audio</literal>             Get audio destination</para>
+                       <para>     <literal>video</literal>             Get video destination</para>
+                       <para>     <literal>text</literal>              Get text destination</para>
+                       <para>   Defaults to <literal>audio</literal> if unspecified.</para>
+               </enum>
+               <enum name="rtpsource">
+                       <para>R/O Get source RTP destination information.</para>
+                       <para>   This option takes one additional argument:</para>
+                       <para>    Argument 1:</para>
+                       <para>     <literal>audio</literal>             Get audio destination</para>
+                       <para>     <literal>video</literal>             Get video destination</para>
+                       <para>     <literal>text</literal>              Get text destination</para>
+                       <para>   Defaults to <literal>audio</literal> if unspecified.</para>
+               </enum>
+       </enumlist>
+</info>
+ ***/
+
 #include "asterisk.h"
 
 ASTERISK_REGISTER_FILE()
index 818f5c2..6d6d2f0 100644 (file)
@@ -89,6 +89,14 @@ documentation_language = en_US       ; Set the language you want documentation
                                ; considered dangerous because they can allow
                                ; privilege escalation.
                                ; Default no
+;entityid=00:11:22:33:44:55    ; Entity ID.
+                               ; This is in the form of a MAC address.
+                               ; It should be universally unique.
+                               ; It must be unique between servers communicating
+                               ; with a protocol that uses this value.
+                               ; This is currently is used by DUNDi and
+                               ; Exchanging Device and Mailbox State
+                               ; using protocols: XMPP, Corosync and PJSIP.
 
 ; Changing the following lines may compromise your security.
 ;[files]
index 511930f..21f1b9d 100644 (file)
@@ -67,7 +67,7 @@
   <!ELEMENT field (#PCDATA)>
   <!ATTLIST field name CDATA #REQUIRED>
 
-  <!ELEMENT info (para|note|warning|variablelist|enumlist|info|xi:include)*>
+  <!ELEMENT info (para|example|note|warning|variablelist|enumlist|info|xi:include)*>
   <!ATTLIST info name CDATA #REQUIRED>
   <!ATTLIST info language CDATA #REQUIRED>
   <!ATTLIST info tech CDATA #REQUIRED>
index 39d7499..9831dd7 100644 (file)
@@ -232,207 +232,41 @@ ASTERISK_REGISTER_FILE()
                                        <enum name="linkedid">
                                                <para>R/O returns the linkedid if available, otherwise returns the uniqueid.</para>
                                        </enum>
-                               </enumlist>
-                               <para><emphasis>chan_sip</emphasis> provides the following additional options:</para>
-                               <enumlist>
-                                       <enum name="peerip">
-                                               <para>R/O Get the IP address of the peer.</para>
-                                       </enum>
-                                       <enum name="recvip">
-                                               <para>R/O Get the source IP address of the peer.</para>
-                                       </enum>
-                                       <enum name="recvport">
-                                               <para>R/O Get the source port of the peer.</para>
-                                       </enum>
-                                       <enum name="from">
-                                               <para>R/O Get the URI from the From: header.</para>
-                                       </enum>
-                                       <enum name="uri">
-                                               <para>R/O Get the URI from the Contact: header.</para>
-                                       </enum>
-                                       <enum name="useragent">
-                                               <para>R/O Get the useragent.</para>
-                                       </enum>
-                                       <enum name="peername">
-                                               <para>R/O Get the name of the peer.</para>
-                                       </enum>
-                                       <enum name="t38passthrough">
-                                               <para>R/O <literal>1</literal> if T38 is offered or enabled in this channel,
-                                               otherwise <literal>0</literal></para>
-                                       </enum>
-                                       <enum name="rtpqos">
-                                               <para>R/O Get QOS information about the RTP stream</para>
-                                               <para>    This option takes two additional arguments:</para>
-                                               <para>    Argument 1:</para>
-                                               <para>     <literal>audio</literal>             Get data about the audio stream</para>
-                                               <para>     <literal>video</literal>             Get data about the video stream</para>
-                                               <para>     <literal>text</literal>              Get data about the text stream</para>
-                                               <para>    Argument 2:</para>
-                                               <para>     <literal>local_ssrc</literal>        Local SSRC (stream ID)</para>
-                                               <para>     <literal>local_lostpackets</literal> Local lost packets</para>
-                                               <para>     <literal>local_jitter</literal>      Local calculated jitter</para>
-                                               <para>     <literal>local_maxjitter</literal>   Local calculated jitter (maximum)</para>
-                                               <para>     <literal>local_minjitter</literal>   Local calculated jitter (minimum)</para>
-                                               <para>     <literal>local_normdevjitter</literal>Local calculated jitter (normal deviation)</para>
-                                               <para>     <literal>local_stdevjitter</literal> Local calculated jitter (standard deviation)</para>
-                                               <para>     <literal>local_count</literal>       Number of received packets</para>
-                                               <para>     <literal>remote_ssrc</literal>       Remote SSRC (stream ID)</para>
-                                               <para>     <literal>remote_lostpackets</literal>Remote lost packets</para>
-                                               <para>     <literal>remote_jitter</literal>     Remote reported jitter</para>
-                                               <para>     <literal>remote_maxjitter</literal>  Remote calculated jitter (maximum)</para>
-                                               <para>     <literal>remote_minjitter</literal>  Remote calculated jitter (minimum)</para>
-                                               <para>     <literal>remote_normdevjitter</literal>Remote calculated jitter (normal deviation)</para>
-                                               <para>     <literal>remote_stdevjitter</literal>Remote calculated jitter (standard deviation)</para>
-                                               <para>     <literal>remote_count</literal>      Number of transmitted packets</para>
-                                               <para>     <literal>rtt</literal>               Round trip time</para>
-                                               <para>     <literal>maxrtt</literal>            Round trip time (maximum)</para>
-                                               <para>     <literal>minrtt</literal>            Round trip time (minimum)</para>
-                                               <para>     <literal>normdevrtt</literal>        Round trip time (normal deviation)</para>
-                                               <para>     <literal>stdevrtt</literal>          Round trip time (standard deviation)</para>
-                                               <para>     <literal>all</literal>               All statistics (in a form suited to logging,
-                                               but not for parsing)</para>
-                                       </enum>
-                                       <enum name="rtpdest">
-                                               <para>R/O Get remote RTP destination information.</para>
-                                               <para>   This option takes one additional argument:</para>
-                                               <para>    Argument 1:</para>
-                                               <para>     <literal>audio</literal>             Get audio destination</para>
-                                               <para>     <literal>video</literal>             Get video destination</para>
-                                               <para>     <literal>text</literal>              Get text destination</para>
-                                               <para>   Defaults to <literal>audio</literal> if unspecified.</para>
-                                       </enum>
-                                       <enum name="rtpsource">
-                                               <para>R/O Get source RTP destination information.</para>
-                                               <para>   This option takes one additional argument:</para>
-                                               <para>    Argument 1:</para>
-                                               <para>     <literal>audio</literal>             Get audio destination</para>
-                                               <para>     <literal>video</literal>             Get video destination</para>
-                                               <para>     <literal>text</literal>              Get text destination</para>
-                                               <para>   Defaults to <literal>audio</literal> if unspecified.</para>
-                                       </enum>
-                               </enumlist>
-                               <xi:include xpointer="xpointer(/docs/info[@name='PJSIPCHANNEL'])" />
-                               <para><emphasis>chan_iax2</emphasis> provides the following additional options:</para>
-                               <enumlist>
-                                       <enum name="osptoken">
-                                               <para>R/O Get the peer's osptoken.</para>
-                                       </enum>
-                                       <enum name="peerip">
-                                               <para>R/O Get the peer's ip address.</para>
-                                       </enum>
-                                       <enum name="peername">
-                                               <para>R/O Get the peer's username.</para>
-                                       </enum>
-                                       <enum name="secure_signaling">
-                                               <para>R/O Get the if the IAX channel is secured.</para>
-                                       </enum>
-                                       <enum name="secure_media">
-                                               <para>R/O Get the if the IAX channel is secured.</para>
-                                       </enum>
-                               </enumlist>
-                               <para><emphasis>chan_dahdi</emphasis> provides the following additional options:</para>
-                               <enumlist>
-                                       <enum name="dahdi_channel">
-                                               <para>R/O DAHDI channel related to this channel.</para>
-                                       </enum>
-                                       <enum name="dahdi_span">
-                                               <para>R/O DAHDI span related to this channel.</para>
-                                       </enum>
-                                       <enum name="dahdi_type">
-                                               <para>R/O DAHDI channel type, one of:</para>
-                                               <enumlist>
-                                                       <enum name="analog" />
-                                                       <enum name="mfc/r2" />
-                                                       <enum name="pri" />
-                                                       <enum name="pseudo" />
-                                                       <enum name="ss7" />
-                                               </enumlist>
-                                       </enum>
-                                       <enum name="keypad_digits">
-                                               <para>R/O PRI Keypad digits that came in with the SETUP message.</para>
-                                       </enum>
-                                       <enum name="reversecharge">
-                                               <para>R/O PRI Reverse Charging Indication, one of:</para>
-                                               <enumlist>
-                                                       <enum name="-1"> <para>None</para></enum>
-                                                       <enum name=" 1"> <para>Reverse Charging Requested</para></enum>
-                                               </enumlist>
-                                       </enum>
-                                       <enum name="no_media_path">
-                                               <para>R/O PRI Nonzero if the channel has no B channel.
-                                               The channel is either on hold or a call waiting call.</para>
-                                       </enum>
-                                       <enum name="buffers">
-                                               <para>W/O Change the channel's buffer policy (for the current call only)</para>
-                                               <para>This option takes two arguments:</para>
-                                               <para>  Number of buffers,</para>
-                                               <para>  Buffer policy being one of:</para>
-                                               <para>      <literal>full</literal></para>
-                                               <para>      <literal>immediate</literal></para>
-                                               <para>      <literal>half</literal></para>
-                                       </enum>
-                                       <enum name="echocan_mode">
-                                               <para>W/O Change the configuration of the active echo
-                                               canceller on the channel (if any), for the current call
-                                               only.</para>
-                                               <para>Possible values are:</para>
-                                               <para>  <literal>on</literal>   Normal mode (the echo canceller is actually reinitalized)</para>
-                                               <para>  <literal>off</literal>  Disabled</para>
-                                               <para>  <literal>fax</literal>  FAX/data mode (NLP disabled if possible, otherwise
-                                                       completely disabled)</para>
-                                               <para>  <literal>voice</literal>        Voice mode (returns from FAX mode, reverting the changes that were made)</para>
-                                       </enum>
-                               </enumlist>
-                               <para><emphasis>chan_ooh323</emphasis> provides the following additional options:</para>
-                               <enumlist>
-                                       <enum name="faxdetect">
-                                               <para>R/W Fax Detect</para>
-                                               <para>Returns 0 or 1</para>
-                                               <para>Write yes or no</para>
-                                       </enum>
-                                       <enum name="t38support">
-                                               <para>R/W t38support</para>
-                                               <para>Returns 0 or 1</para>
-                                               <para>Write yes or no</para>
-                                       </enum>
-                                       <enum name="h323id_url">
-                                               <para>R/0 Returns caller URL</para>
-                                       </enum>
-                                       <enum name="caller_h323id">
-                                               <para>R/0 Returns caller h323id</para>
-                                       </enum>
-                                       <enum name="caller_dialeddigits">
-                                               <para>R/0 Returns caller dialed digits</para>
-                                       </enum>
-                                       <enum name="caller_email">
-                                               <para>R/0 Returns caller email</para>
-                                       </enum>
-                                       <enum name="callee_email">
-                                               <para>R/0 Returns callee email</para>
-                                       </enum>
-                                       <enum name="callee_dialeddigits">
-                                               <para>R/0 Returns callee dialed digits</para>
-                                       </enum>
-                                       <enum name="caller_url">
-                                               <para>R/0 Returns caller URL</para>
-                                       </enum>
                                        <enum name="max_forwards">
-                                               <para>R/W Get or set the maximum number of call forwards for this channel.
-
-                                               This number describes the number of times a call may be forwarded by this channel
-                                               before the call fails. "Forwards" in this case refers to redirects by phones as well
-                                               as calls to local channels.
-
-                                               Note that this has no relation to the SIP Max-Forwards header.
-                                               </para>
+                                               <para>R/W The maximum number of forwards allowed.</para>
                                        </enum>
                                </enumlist>
+                               <xi:include xpointer="xpointer(/docs/info[@name='SIPCHANNEL'])" />
+                               <xi:include xpointer="xpointer(/docs/info[@name='PJSIPCHANNEL'])" />
+                               <xi:include xpointer="xpointer(/docs/info[@name='IAXCHANNEL'])" />
+                               <xi:include xpointer="xpointer(/docs/info[@name='DAHDICHANNEL'])" />
+                               <xi:include xpointer="xpointer(/docs/info[@name='OOH323CHANNEL'])" />
                        </parameter>
                </syntax>
                <description>
                        <para>Gets/sets various pieces of information about the channel, additional <replaceable>item</replaceable> may
                        be available from the channel driver; see its documentation for details. Any <replaceable>item</replaceable>
                        requested that is not available on the current channel will return an empty string.</para>
+                       <example title="Standard CHANNEL item examples">
+                               ; Push a hangup handler subroutine existing at dialplan
+                               ; location default,s,1 onto the current channel
+                               same => n,Set(CHANNEL(hangup_handler_push)=default,s,1)
+
+                               ; Set the current tonezone to Germany (de)
+                               same => n,Set(CHANNEL(tonezone)=de)
+
+                               ; Set the allowed maximum number of forwarding attempts
+                               same => n,Set(CHANNEL(max_forwards)=10)
+
+                               ; If this channel is ejected from its next bridge, and if
+                               ; the channel is not hung up, begin executing dialplan at
+                               ; location default,after-bridge,1
+                               same => n,Set(CHANNEL(after_bridge_goto)=default,after-bridge,1)
+
+                               ; Log the current state of the channel
+                               same => n,Log(NOTICE, This channel is: ${CHANNEL(state)})
+                       </example>
+                       <xi:include xpointer="xpointer(/docs/info[@name='PJSIPCHANNEL_EXAMPLES'])" />
                </description>
        </function>
  ***/
index c311e9c..c3df477 100644 (file)
@@ -973,6 +973,14 @@ int ast_str_to_eid(struct ast_eid *eid, const char *s);
 int ast_eid_cmp(const struct ast_eid *eid1, const struct ast_eid *eid2);
 
 /*!
+ * \brief Check if EID is empty
+ *
+ * \return 1 if the EID is empty, zero otherwise
+ * \since 13.12.0
+ */
+int ast_eid_is_empty(const struct ast_eid *eid);
+
+/*!
  * \brief Get current thread ID
  * \return the ID if platform is supported, else -1
  */
index 54edafa..cd9c461 100644 (file)
@@ -85,6 +85,10 @@ ASTERISK_REGISTER_FILE();
                                </parameter>
                                <parameter name="SpecialCode" />
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">AOC-D</ref>
+                               <ref type="managerEvent">AOC-E</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="AOC-D">
@@ -138,6 +142,11 @@ ASTERISK_REGISTER_FILE();
                                <parameter name="NumberOf" />
                                <parameter name="TypeOf" />
                        </syntax>
+                       <see-also>
+                               <ref type="manager">AOCMessage</ref>
+                               <ref type="managerEvent">AOC-S</ref>
+                               <ref type="managerEvent">AOC-E</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="AOC-E">
@@ -151,6 +160,11 @@ ASTERISK_REGISTER_FILE();
                                <parameter name="ID" />
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='AOC-D']/managerEventInstance/syntax/parameter)" />
                        </syntax>
+                       <see-also>
+                               <ref type="manager">AOCMessage</ref>
+                               <ref type="managerEvent">AOC-S</ref>
+                               <ref type="managerEvent">AOC-D</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
 ***/
index 50d8af2..3c2ca25 100644 (file)
@@ -3661,10 +3661,10 @@ static void ast_readconfig(void)
                } else if (!strcasecmp(v->name, "entityid")) {
                        struct ast_eid tmp_eid;
                        if (!ast_str_to_eid(&tmp_eid, v->value)) {
-                               ast_verbose("Successfully set global EID to '%s'\n", v->value);
                                ast_eid_default = tmp_eid;
-                       } else
-                               ast_verbose("Invalid Entity ID '%s' provided\n", v->value);
+                       } else {
+                               ast_log(LOG_WARNING, "Invalid Entity ID '%s' provided\n", v->value);
+                       }
                } else if (!strcasecmp(v->name, "lightbackground")) {
                        ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_LIGHT_BACKGROUND);
                } else if (!strcasecmp(v->name, "forceblackbackground")) {
index 68ac24b..e92875d 100644 (file)
                <description>
                        <para>Returns detailed information about the available bridging technologies.</para>
                </description>
+               <see-also>
+                       <ref type="manager">BridgeTechnologySuspend</ref>
+                       <ref type="manager">BridgeTechnologyUnsuspend</ref>
+               </see-also>
        </manager>
        <manager name="BridgeTechnologySuspend" language="en_US">
                <synopsis>
                <description>
                        <para>Marks a bridging technology as suspended, which prevents subsequently created bridges from using it.</para>
                </description>
+               <see-also>
+                       <ref type="manager">BridgeTechnologySuspend</ref>
+                       <ref type="manager">BridgeTechnologyUnsuspend</ref>
+               </see-also>
        </manager>
        <manager name="BridgeTechnologyUnsuspend" language="en_US">
                <synopsis>
                <description>
                        <para>Clears a previously suspended bridging technology, which allows subsequently created bridges to use it.</para>
                </description>
+               <see-also>
+                       <ref type="manager">BridgeTechnologyList</ref>
+                       <ref type="manager">BridgeTechnologySuspend</ref>
+               </see-also>
        </manager>
 ***/
 
index 4062e96..0af5a78 100644 (file)
@@ -202,6 +202,11 @@ ASTERISK_REGISTER_FILE()
                                </variable>
                        </variablelist>
                </description>
+               <see-also>
+                       <ref type="manager">Bridge</ref>
+                       <ref type="managerEvent">BridgeCreate</ref>
+                       <ref type="managerEvent">BridgeEnter</ref>
+               </see-also>
        </application>
        <manager name="Bridge" language="en_US">
                <synopsis>
@@ -228,6 +233,15 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Bridge together two channels already in the PBX.</para>
                </description>
+               <see-also>
+                       <ref type="application">Bridge</ref>
+                       <ref type="managerEvent">BridgeCreate</ref>
+                       <ref type="managerEvent">BridgeEnter</ref>
+                       <ref type="manager">BridgeDestroy</ref>
+                       <ref type="manager">BridgeInfo</ref>
+                       <ref type="manager">BridgeKick</ref>
+                       <ref type="manager">BridgeList</ref>
+               </see-also>
        </manager>
  ***/
 
index 029da70..32322b8 100644 (file)
@@ -149,6 +149,9 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Logoff the current manager session.</para>
                </description>
+               <see-also>
+                       <ref type="manager">Login</ref>
+               </see-also>
        </manager>
        <manager name="Login" language="en_US">
                <synopsis>
@@ -168,6 +171,9 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Login Manager.</para>
                </description>
+               <see-also>
+                       <ref type="manager">Logoff</ref>
+               </see-also>
        </manager>
        <manager name="Challenge" language="en_US">
                <synopsis>
@@ -329,6 +335,9 @@ ASTERISK_REGISTER_FILE()
                                <para>If a channel name is not provided then the variable is considered global.</para>
                        </note>
                </description>
+               <see-also>
+                       <ref type="manager">Getvar</ref>
+               </see-also>
        </manager>
        <manager name="Getvar" language="en_US">
                <synopsis>
@@ -349,6 +358,9 @@ ASTERISK_REGISTER_FILE()
                                <para>If a channel name is not provided then the variable is considered global.</para>
                        </note>
                </description>
+               <see-also>
+                       <ref type="manager">Setvar</ref>
+               </see-also>
        </manager>
        <manager name="GetConfig" language="en_US">
                <synopsis>
@@ -381,6 +393,12 @@ ASTERISK_REGISTER_FILE()
                        In the case where a category name is non-unique, a filter may be specified
                        to match only categories with matching variable values.</para>
                </description>
+               <see-also>
+                       <ref type="manager">GetConfigJSON</ref>
+                       <ref type="manager">UpdateConfig</ref>
+                       <ref type="manager">CreateConfig</ref>
+                       <ref type="manager">ListCategories</ref>
+               </see-also>
        </manager>
        <manager name="GetConfigJSON" language="en_US">
                <synopsis>
@@ -405,6 +423,12 @@ ASTERISK_REGISTER_FILE()
                        In the case where a category name is non-unique, a filter may be specified
                        to match only categories with matching variable values.</para>
                </description>
+               <see-also>
+                       <ref type="manager">GetConfig</ref>
+                       <ref type="manager">UpdateConfig</ref>
+                       <ref type="manager">CreateConfig</ref>
+                       <ref type="manager">ListCategories</ref>
+               </see-also>
        </manager>
        <manager name="UpdateConfig" language="en_US">
                <synopsis>
@@ -496,6 +520,12 @@ ASTERISK_REGISTER_FILE()
                        <para>This action will modify, create, or delete configuration elements
                        in Asterisk configuration files.</para>
                </description>
+               <see-also>
+                       <ref type="manager">GetConfig</ref>
+                       <ref type="manager">GetConfigJSON</ref>
+                       <ref type="manager">CreateConfig</ref>
+                       <ref type="manager">ListCategories</ref>
+               </see-also>
        </manager>
        <manager name="CreateConfig" language="en_US">
                <synopsis>
@@ -512,6 +542,12 @@ ASTERISK_REGISTER_FILE()
                        directory. This action is intended to be used before an UpdateConfig
                        action.</para>
                </description>
+               <see-also>
+                       <ref type="manager">GetConfig</ref>
+                       <ref type="manager">GetConfigJSON</ref>
+                       <ref type="manager">UpdateConfig</ref>
+                       <ref type="manager">ListCategories</ref>
+               </see-also>
        </manager>
        <manager name="ListCategories" language="en_US">
                <synopsis>
@@ -526,6 +562,12 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>This action will dump the categories in a given file.</para>
                </description>
+               <see-also>
+                       <ref type="manager">GetConfig</ref>
+                       <ref type="manager">GetConfigJSON</ref>
+                       <ref type="manager">UpdateConfig</ref>
+                       <ref type="manager">CreateConfig</ref>
+               </see-also>
        </manager>
        <manager name="Redirect" language="en_US">
                <synopsis>
@@ -561,6 +603,9 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Redirect (transfer) a call.</para>
                </description>
+               <see-also>
+                       <ref type="manager">BlindTransfer</ref>
+               </see-also>
        </manager>
        <manager name="Atxfer" language="en_US">
                <synopsis>
@@ -581,6 +626,9 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Attended transfer.</para>
                </description>
+               <see-also>
+                       <ref type="managerEvent">AttendedTransfer</ref>
+               </see-also>
        </manager>
        <manager name="Originate" language="en_US">
                <synopsis>
@@ -705,6 +753,9 @@ ASTERISK_REGISTER_FILE()
                        <para>Will return an <literal>Extension Status</literal> message. The response will include
                        the hint for the extension and the status.</para>
                </description>
+               <see-also>
+                       <ref type="managerEvent">ExtensionStatus</ref>
+               </see-also>
        </manager>
        <manager name="PresenceState" language="en_US">
                <synopsis>
@@ -721,6 +772,9 @@ ASTERISK_REGISTER_FILE()
                        <para>Will return a <literal>Presence State</literal> message. The response will include the
                        presence state and, if set, a presence subtype and custom message.</para>
                </description>
+               <see-also>
+                       <ref type="managerEvent">PresenceStatus</ref>
+               </see-also>
        </manager>
        <manager name="AbsoluteTimeout" language="en_US">
                <synopsis>
@@ -758,6 +812,9 @@ ASTERISK_REGISTER_FILE()
                        <para>Waiting: <literal>0</literal> if messages waiting, <literal>1</literal>
                        if no messages waiting.</para>
                </description>
+               <see-also>
+                       <ref type="manager">MailboxCount</ref>
+               </see-also>
        </manager>
        <manager name="MailboxCount" language="en_US">
                <synopsis>
@@ -778,6 +835,9 @@ ASTERISK_REGISTER_FILE()
                        <para>NewMessages: <replaceable>count</replaceable></para>
                        <para>OldMessages: <replaceable>count</replaceable></para>
                </description>
+               <see-also>
+                       <ref type="manager">MailboxStatus</ref>
+               </see-also>
        </manager>
        <manager name="ListCommands" language="en_US">
                <synopsis>
@@ -827,6 +887,10 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Send an event to manager sessions.</para>
                </description>
+               <see-also>
+                       <ref type="managerEvent">UserEvent</ref>
+                       <ref type="application">UserEvent</ref>
+               </see-also>
        </manager>
        <manager name="WaitEvent" language="en_US">
                <synopsis>
@@ -879,6 +943,9 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Send a reload event.</para>
                </description>
+               <see-also>
+                       <ref type="manager">ModuleLoad</ref>
+               </see-also>
        </manager>
        <managerEvent language="en_US" name="CoreShowChannel">
                <managerEventInstance class="EVENT_FLAG_CALL">
@@ -991,6 +1058,10 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Loads, unloads or reloads an Asterisk module in a running system.</para>
                </description>
+               <see-also>
+                       <ref type="manager">Reload</ref>
+                       <ref type="manager">ModuleCheck</ref>
+               </see-also>
        </manager>
        <manager name="ModuleCheck" language="en_US">
                <synopsis>
@@ -1006,6 +1077,9 @@ ASTERISK_REGISTER_FILE()
                        <para>Checks if Asterisk module is loaded. Will return Success/Failure.
                        For success returns, the module revision number is included.</para>
                </description>
+               <see-also>
+                       <ref type="manager">ModuleLoad</ref>
+               </see-also>
        </manager>
        <manager name="AOCMessage" language="en_US">
                <synopsis>
@@ -1112,6 +1186,10 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Generates an AOC-D or AOC-E message on a channel.</para>
                </description>
+               <see-also>
+                       <ref type="managerEvent">AOC-D</ref>
+                       <ref type="managerEvent">AOC-E</ref>
+               </see-also>
        </manager>
        <function name="AMI_CLIENT" language="en_US">
                <synopsis>
@@ -1171,6 +1249,9 @@ ASTERISK_REGISTER_FILE()
                        this command can be used to create filters that may bypass
                        filters defined in manager.conf</para>
                </description>
+               <see-also>
+                       <ref type="manager">FilterList</ref>
+               </see-also>
        </manager>
        <manager name="FilterList" language="en_US">
                <synopsis>
@@ -1180,6 +1261,9 @@ ASTERISK_REGISTER_FILE()
                        <para>The filters displayed are for the current session.  Only those filters defined in
                         manager.conf will be present upon starting a new session.</para>
                </description>
+               <see-also>
+                       <ref type="manager">Filter</ref>
+               </see-also>
        </manager>
        <manager name="BlindTransfer" language="en_US">
                <synopsis>
@@ -1198,6 +1282,7 @@ ASTERISK_REGISTER_FILE()
                </description>
                <see-also>
                        <ref type="manager">Redirect</ref>
+                       <ref type="managerEvent">BlindTransfer</ref>
                </see-also>
        </manager>
        <managerEvent name="ExtensionStatus" language="en_US">
@@ -1275,6 +1360,9 @@ ASTERISK_REGISTER_FILE()
                                        </enumlist>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="manager">ExtensionState</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent name="PresenceStatus" language="en_US">
@@ -1288,6 +1376,9 @@ ASTERISK_REGISTER_FILE()
                                <parameter name="Subtype" />
                                <parameter name="Message" />
                        </syntax>
+                       <see-also>
+                               <ref type="manager">PresenceState</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
  ***/
index 2069d50..b6aaa55 100644 (file)
@@ -42,6 +42,11 @@ static struct stasis_message_router *bridge_state_router;
                        <syntax>
                                <bridge_snapshot/>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">BridgeDestroy</ref>
+                               <ref type="managerEvent">BridgeEnter</ref>
+                               <ref type="managerEvent">BridgeLeave</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="BridgeDestroy">
@@ -50,6 +55,11 @@ static struct stasis_message_router *bridge_state_router;
                        <syntax>
                                <bridge_snapshot/>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">BridgeCreate</ref>
+                               <ref type="managerEvent">BridgeEnter</ref>
+                               <ref type="managerEvent">BridgeLeave</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="BridgeEnter">
@@ -62,6 +72,11 @@ static struct stasis_message_router *bridge_state_router;
                                        <para>The uniqueid of the channel being swapped out of the bridge</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">BridgeCreate</ref>
+                               <ref type="managerEvent">BridgeDestroy</ref>
+                               <ref type="managerEvent">BridgeLeave</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="BridgeLeave">
@@ -71,6 +86,11 @@ static struct stasis_message_router *bridge_state_router;
                                <bridge_snapshot/>
                                <channel_snapshot/>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">BridgeCreate</ref>
+                               <ref type="managerEvent">BridgeDestroy</ref>
+                               <ref type="managerEvent">BridgeEnter</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <manager name="BridgeList" language="en_US">
@@ -86,6 +106,12 @@ static struct stasis_message_router *bridge_state_router;
                <description>
                        <para>Returns a list of bridges, optionally filtering on a bridge type.</para>
                </description>
+               <see-also>
+                       <ref type="manager">Bridge</ref>
+                       <ref type="manager">BridgeDestroy</ref>
+                       <ref type="manager">BridgeInfo</ref>
+                       <ref type="manager">BridgeKick</ref>
+               </see-also>
        </manager>
        <manager name="BridgeInfo" language="en_US">
                <synopsis>
@@ -100,6 +126,12 @@ static struct stasis_message_router *bridge_state_router;
                <description>
                        <para>Returns detailed information about a bridge and the channels in it.</para>
                </description>
+               <see-also>
+                       <ref type="manager">Bridge</ref>
+                       <ref type="manager">BridgeDestroy</ref>
+                       <ref type="manager">BridgeKick</ref>
+                       <ref type="manager">BridgeList</ref>
+               </see-also>
                <responses>
                        <list-elements>
                                <managerEvent language="en_US" name="BridgeInfoChannel">
@@ -134,6 +166,13 @@ static struct stasis_message_router *bridge_state_router;
                <description>
                        <para>Deletes the bridge, causing channels to continue or hang up.</para>
                </description>
+               <see-also>
+                       <ref type="manager">Bridge</ref>
+                       <ref type="manager">BridgeInfo</ref>
+                       <ref type="manager">BridgeKick</ref>
+                       <ref type="manager">BridgeList</ref>
+                       <ref type="managerEvent">BridgeDestroy</ref>
+               </see-also>
        </manager>
        <manager name="BridgeKick" language="en_US">
                <synopsis>
@@ -153,6 +192,13 @@ static struct stasis_message_router *bridge_state_router;
                <description>
                        <para>The channel is removed from the bridge.</para>
                </description>
+               <see-also>
+                       <ref type="manager">Bridge</ref>
+                       <ref type="manager">BridgeDestroy</ref>
+                       <ref type="manager">BridgeInfo</ref>
+                       <ref type="manager">BridgeList</ref>
+                       <ref type="managerEvent">BridgeLeave</ref>
+               </see-also>
        </manager>
  ***/
 
index ec1f807..ce0e38d 100644 (file)
@@ -44,6 +44,10 @@ ASTERISK_REGISTER_FILE()
                        <syntax>
                                <channel_snapshot/>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">Newstate</ref>
+                               <ref type="managerEvent">Hangup</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="Newstate">
@@ -52,6 +56,10 @@ ASTERISK_REGISTER_FILE()
                        <syntax>
                                <channel_snapshot/>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">Newchannel</ref>
+                               <ref type="managerEvent">Hangup</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="Hangup">
@@ -66,6 +74,12 @@ ASTERISK_REGISTER_FILE()
                                        <para>A description of why the channel was hung up.</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">Newchannel</ref>
+                               <ref type="managerEvent">SoftHangupRequest</ref>
+                               <ref type="managerEvent">HangupRequest</ref>
+                               <ref type="managerEvent">Newstate</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="HangupRequest">
@@ -75,6 +89,10 @@ ASTERISK_REGISTER_FILE()
                                <channel_snapshot/>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='Hangup']/managerEventInstance/syntax/parameter[@name='Cause'])" />
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">SoftHangupRequest</ref>
+                               <ref type="managerEvent">Hangup</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="SoftHangupRequest">
@@ -84,6 +102,10 @@ ASTERISK_REGISTER_FILE()
                                <channel_snapshot/>
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='Hangup']/managerEventInstance/syntax/parameter[@name='Cause'])" />
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">HangupRequest</ref>
+                               <ref type="managerEvent">Hangup</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="NewExten">
@@ -114,6 +136,9 @@ ASTERISK_REGISTER_FILE()
                                        <para>A description of the Caller ID presentation.</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="function">CALLERID</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="NewAccountCode">
@@ -125,6 +150,9 @@ ASTERISK_REGISTER_FILE()
                                        <para>The channel's previous account code</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="function">CHANNEL</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="DialBegin">
@@ -139,6 +167,9 @@ ASTERISK_REGISTER_FILE()
                        </syntax>
                        <see-also>
                                <ref type="application">Dial</ref>
+                               <ref type="application">Originate</ref>
+                               <ref type="manager">Originate</ref>
+                               <ref type="managerEvent">DialEnd</ref>
                        </see-also>
                </managerEventInstance>
        </managerEvent>
@@ -219,6 +250,9 @@ ASTERISK_REGISTER_FILE()
                        </syntax>
                        <see-also>
                                <ref type="application">Dial</ref>
+                               <ref type="application">Originate</ref>
+                               <ref type="manager">Originate</ref>
+                               <ref type="managerEvent">DialBegin</ref>
                        </see-also>
                </managerEventInstance>
        </managerEvent>
@@ -231,6 +265,9 @@ ASTERISK_REGISTER_FILE()
                                        <para>The suggested MusicClass, if provided.</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">Unhold</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="Unhold">
@@ -239,6 +276,9 @@ ASTERISK_REGISTER_FILE()
                        <syntax>
                                <channel_snapshot/>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">Hold</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="ChanSpyStart">
@@ -249,7 +289,8 @@ ASTERISK_REGISTER_FILE()
                                <channel_snapshot prefix="Spyee"/>
                        </syntax>
                        <see-also>
-                               <ref type="application">ChanSpyStop</ref>
+                               <ref type="managerEvent">ChanSpyStop</ref>
+                               <ref type="application">ChanSpy</ref>
                        </see-also>
                </managerEventInstance>
        </managerEvent>
@@ -261,7 +302,8 @@ ASTERISK_REGISTER_FILE()
                                <channel_snapshot prefix="Spyee"/>
                        </syntax>
                        <see-also>
-                               <ref type="application">ChanSpyStart</ref>
+                               <ref type="managerEvent">ChanSpyStart</ref>
+                               <ref type="application">ChanSpy</ref>
                        </see-also>
                </managerEventInstance>
        </managerEvent>
@@ -274,6 +316,9 @@ ASTERISK_REGISTER_FILE()
                                        <para>Hangup handler parameter string passed to the Gosub application.</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="function">CHANNEL</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="HangupHandlerPop">
@@ -380,6 +425,7 @@ ASTERISK_REGISTER_FILE()
                        </syntax>
                        <see-also>
                                <ref type="managerEvent">MusicOnHoldStop</ref>
+                               <ref type="application">StartMusicOnHold</ref>
                                <ref type="application">MusicOnHold</ref>
                        </see-also>
                </managerEventInstance>
@@ -856,6 +902,9 @@ static void channel_dtmf_begin_cb(void *data, struct stasis_subscription *sub,
                                                </enumlist>
                                        </parameter>
                                </syntax>
+                               <see-also>
+                                       <ref type="managerEvent">DTMFEnd</ref>
+                               </see-also>
                </managerEventInstance>
        ***/
        manager_event(EVENT_FLAG_DTMF, "DTMFBegin",
@@ -902,6 +951,9 @@ static void channel_dtmf_end_cb(void *data, struct stasis_subscription *sub,
                                                </enumlist>
                                        </parameter>
                                </syntax>
+                               <see-also>
+                                       <ref type="managerEvent">DTMFBegin</ref>
+                               </see-also>
                </managerEventInstance>
        ***/
        manager_event(EVENT_FLAG_DTMF, "DTMFEnd",
index 3705ea1..63385f9 100644 (file)
@@ -5033,9 +5033,11 @@ int ast_context_remove_extension_callerid2(struct ast_context *con, const char *
        /* scan the extension list to find first matching extension-registrar */
        for (exten = con->root; exten; prev_exten = exten, exten = exten->next) {
                if (!strcmp(exten->exten, ex.exten) &&
-                       (!registrar || !strcmp(exten->registrar, registrar)) &&
-                       (!matchcallerid || (!ast_strlen_zero(callerid) && !ast_strlen_zero(exten->cidmatch) && !strcmp(exten->cidmatch, callerid)) || (ast_strlen_zero(callerid) && ast_strlen_zero(exten->cidmatch))))
+                       (!matchcallerid ||
+                               (!ast_strlen_zero(ex.cidmatch) && !ast_strlen_zero(exten->cidmatch) && !strcmp(exten->cidmatch, ex.cidmatch)) ||
+                               (ast_strlen_zero(ex.cidmatch) && ast_strlen_zero(exten->cidmatch)))) {
                        break;
+               }
        }
        if (!exten) {
                /* we can't find right extension */
@@ -5047,7 +5049,7 @@ int ast_context_remove_extension_callerid2(struct ast_context *con, const char *
        /* scan the priority list to remove extension with exten->priority == priority */
        for (peer = exten, next_peer = exten->peer ? exten->peer : exten->next;
                 peer && !strcmp(peer->exten, ex.exten) &&
-                       (!callerid || (!matchcallerid && !peer->matchcid) || (matchcallerid && peer->matchcid && !strcmp(peer->cidmatch, callerid))) ;
+                       (!callerid || (!matchcallerid && !peer->matchcid) || (matchcallerid && peer->matchcid && !strcmp(peer->cidmatch, ex.cidmatch))) ;
                        peer = next_peer, next_peer = next_peer ? (next_peer->peer ? next_peer->peer : next_peer->next) : NULL) {
 
                if ((priority == 0 || peer->priority == priority) &&
index c2b1c8c..0671374 100644 (file)
                                        and sending this report.</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">RTCPReceived</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="RTCPReceived">
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='RTCPSent']/managerEventInstance/syntax/parameter[@name='SentOctets'])" />
                                <xi:include xpointer="xpointer(/docs/managerEvent[@name='RTCPSent']/managerEventInstance/syntax/parameter[contains(@name, 'ReportX')])" />
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">RTCPSent</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
  ***/
index a739f5e..55ee830 100644 (file)
@@ -508,13 +508,15 @@ int ast_sorcery_init(void)
        };
        ast_assert(wizards == NULL);
 
-       if (!(threadpool = ast_threadpool_create("Sorcery", NULL, &options))) {
-               threadpool = NULL;
+       threadpool = ast_threadpool_create("Sorcery", NULL, &options);
+       if (!threadpool) {
                return -1;
        }
 
-       if (!(wizards = ao2_container_alloc(WIZARD_BUCKETS, sorcery_wizard_hash, sorcery_wizard_cmp))) {
-               ast_threadpool_shutdown(threadpool);
+       wizards = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0, WIZARD_BUCKETS,
+               sorcery_wizard_hash, NULL, sorcery_wizard_cmp);
+       if (!wizards) {
+               sorcery_cleanup();
                return -1;
        }
 
@@ -524,8 +526,8 @@ int ast_sorcery_init(void)
                return -1;
        }
 
-       instances = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, INSTANCE_BUCKETS,
-               sorcery_instance_hash, sorcery_instance_cmp);
+       instances = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_RWLOCK, 0, INSTANCE_BUCKETS,
+               sorcery_instance_hash, NULL, sorcery_instance_cmp);
        if (!instances) {
                sorcery_cleanup();
                return -1;
@@ -606,7 +608,7 @@ static int sorcery_generic_observer_remove(void *obj, void *arg, int flags)
 {
        const struct sorcery_global_observer *observer = obj;
 
-       return (observer->callbacks == arg) ? CMP_MATCH | CMP_STOP : 0;
+       return (observer->callbacks == arg) ? CMP_MATCH : 0;
 }
 
 int ast_sorcery_global_observer_add(const struct ast_sorcery_global_observer *callbacks)
@@ -842,23 +844,30 @@ static struct ast_sorcery_object_type *sorcery_object_type_alloc(const char *typ
                return NULL;
        }
 
-       if (!(object_type->fields = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_NOLOCK, OBJECT_FIELD_BUCKETS,
-                                       object_type_field_hash, object_type_field_cmp))) {
+       object_type->fields = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_NOLOCK, 0,
+               OBJECT_FIELD_BUCKETS, object_type_field_hash, NULL, object_type_field_cmp);
+       if (!object_type->fields) {
                ao2_ref(object_type, -1);
                return NULL;
        }
 
-       if (!(object_type->observers = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, 1, NULL, NULL))) {
+       object_type->observers = ao2_container_alloc_list(AO2_ALLOC_OPT_LOCK_RWLOCK, 0,
+               NULL, NULL);
+       if (!object_type->observers) {
                ao2_ref(object_type, -1);
                return NULL;
        }
 
-       if (!(object_type->info = ast_calloc(1, sizeof(*object_type->info) + 2 * sizeof(object_type->info->files[0])))) {
+       object_type->info = ast_calloc(1,
+               sizeof(*object_type->info) + 2 * sizeof(object_type->info->files[0]));
+       if (!object_type->info) {
                ao2_ref(object_type, -1);
                return NULL;
        }
 
-       if (!(object_type->file = ast_calloc(1, sizeof(*object_type->file) + 2 * sizeof(object_type->file->types[0])))) {
+       object_type->file = ast_calloc(1,
+               sizeof(*object_type->file) + 2 * sizeof(object_type->file->types[0]));
+       if (!object_type->file) {
                ao2_ref(object_type, -1);
                return NULL;
        }
@@ -1343,8 +1352,10 @@ static void sorcery_observer_invocation_destroy(void *obj)
 /*! \brief Allocator function for observer invocation */
 static struct sorcery_observer_invocation *sorcery_observer_invocation_alloc(struct ast_sorcery_object_type *object_type, void *object)
 {
-       struct sorcery_observer_invocation *invocation = ao2_alloc(sizeof(*invocation), sorcery_observer_invocation_destroy);
+       struct sorcery_observer_invocation *invocation;
 
+       invocation = ao2_alloc_options(sizeof(*invocation),
+               sorcery_observer_invocation_destroy, AO2_ALLOC_OPT_LOCK_NOLOCK);
        if (!invocation) {
                return NULL;
        }
@@ -1969,11 +1980,8 @@ struct ao2_container *ast_sorcery_retrieve_by_regex(const struct ast_sorcery *so
 }
 
 /*! \brief Internal function which returns if the wizard has created the object */
-static int sorcery_wizard_create(void *obj, void *arg, int flags)
+static int sorcery_wizard_create(const struct ast_sorcery_object_wizard *object_wizard, const struct sorcery_details *details)
 {
-       const struct ast_sorcery_object_wizard *object_wizard = obj;
-       const struct sorcery_details *details = arg;
-
        if (!object_wizard->wizard->callbacks.create) {
                ast_debug(5, "Sorcery wizard '%s' does not support creation\n", object_wizard->wizard->callbacks.name);
                return 0;
@@ -2028,7 +2036,8 @@ int ast_sorcery_create(const struct ast_sorcery *sorcery, void *object)
        AST_VECTOR_RW_RDLOCK(&object_type->wizards);
        for (i = 0; i < AST_VECTOR_SIZE(&object_type->wizards); i++) {
                found_wizard = AST_VECTOR_GET(&object_type->wizards, i);
-               if (!found_wizard->caching && sorcery_wizard_create(found_wizard, &sdetails, 0) == CMP_MATCH) {
+               if (!found_wizard->caching
+                       && sorcery_wizard_create(found_wizard, &sdetails) == CMP_MATCH) {
                        object_wizard = found_wizard;
                }
        }
@@ -2037,14 +2046,14 @@ int ast_sorcery_create(const struct ast_sorcery *sorcery, void *object)
                for (i = 0; i < AST_VECTOR_SIZE(&object_type->wizards); i++) {
                        found_wizard = AST_VECTOR_GET(&object_type->wizards, i);
                        if (found_wizard->caching) {
-                               sorcery_wizard_create(found_wizard, &sdetails, 0);
+                               sorcery_wizard_create(found_wizard, &sdetails);
                        }
                }
 
                if (ao2_container_count(object_type->observers)) {
-                       struct sorcery_observer_invocation *invocation = sorcery_observer_invocation_alloc(
-                               object_type, object);
+                       struct sorcery_observer_invocation *invocation;
 
+                       invocation = sorcery_observer_invocation_alloc(object_type, object);
                        if (invocation
                                && ast_taskprocessor_push(object_type->serializer, sorcery_observers_notify_create,
                                        invocation)) {
@@ -2082,11 +2091,8 @@ static int sorcery_observers_notify_update(void *data)
 }
 
 /*! \brief Internal function which returns if a wizard has updated the object */
-static int sorcery_wizard_update(void *obj, void *arg, int flags)
+static int sorcery_wizard_update(const struct ast_sorcery_object_wizard *object_wizard, const struct sorcery_details *details)
 {
-       const struct ast_sorcery_object_wizard *object_wizard = obj;
-       const struct sorcery_details *details = arg;
-
        if (!object_wizard->wizard->callbacks.update) {
                ast_debug(5, "Sorcery wizard '%s' does not support updating\n", object_wizard->wizard->callbacks.name);
                return 0;
@@ -2118,7 +2124,8 @@ int ast_sorcery_update(const struct ast_sorcery *sorcery, void *object)
        AST_VECTOR_RW_RDLOCK(&object_type->wizards);
        for (i = 0; i < AST_VECTOR_SIZE(&object_type->wizards); i++) {
                found_wizard = AST_VECTOR_GET(&object_type->wizards, i);
-               if (!found_wizard->caching && sorcery_wizard_update(found_wizard, &sdetails, 0) == CMP_MATCH) {
+               if (!found_wizard->caching
+                       && sorcery_wizard_update(found_wizard, &sdetails) == CMP_MATCH) {
                        object_wizard = found_wizard;
                }
        }
@@ -2127,14 +2134,14 @@ int ast_sorcery_update(const struct ast_sorcery *sorcery, void *object)
                for (i = 0; i < AST_VECTOR_SIZE(&object_type->wizards); i++) {
                        found_wizard = AST_VECTOR_GET(&object_type->wizards, i);
                        if (found_wizard->caching) {
-                               sorcery_wizard_update(found_wizard, &sdetails, 0);
+                               sorcery_wizard_update(found_wizard, &sdetails);
                        }
                }
 
                if (ao2_container_count(object_type->observers)) {
-                       struct sorcery_observer_invocation *invocation = sorcery_observer_invocation_alloc(
-                               object_type, object);
+                       struct sorcery_observer_invocation *invocation;
 
+                       invocation = sorcery_observer_invocation_alloc(object_type, object);
                        if (invocation
                                && ast_taskprocessor_push(object_type->serializer, sorcery_observers_notify_update,
                                        invocation)) {
@@ -2172,11 +2179,8 @@ static int sorcery_observers_notify_delete(void *data)
 }
 
 /*! \brief Internal function which returns if a wizard has deleted the object */
-static int sorcery_wizard_delete(void *obj, void *arg, int flags)
+static int sorcery_wizard_delete(const struct ast_sorcery_object_wizard *object_wizard, const struct sorcery_details *details)
 {
-       const struct ast_sorcery_object_wizard *object_wizard = obj;
-       const struct sorcery_details *details = arg;
-
        if (!object_wizard->wizard->callbacks.delete) {
                ast_debug(5, "Sorcery wizard '%s' does not support deletion\n", object_wizard->wizard->callbacks.name);
                return 0;
@@ -2208,7 +2212,8 @@ int ast_sorcery_delete(const struct ast_sorcery *sorcery, void *object)
        AST_VECTOR_RW_RDLOCK(&object_type->wizards);
        for (i = 0; i < AST_VECTOR_SIZE(&object_type->wizards); i++) {
                found_wizard = AST_VECTOR_GET(&object_type->wizards, i);
-               if (!found_wizard->caching && sorcery_wizard_delete(found_wizard, &sdetails, 0) == CMP_MATCH) {
+               if (!found_wizard->caching
+                       && sorcery_wizard_delete(found_wizard, &sdetails) == CMP_MATCH) {
                        object_wizard = found_wizard;
                }
        }
@@ -2217,14 +2222,14 @@ int ast_sorcery_delete(const struct ast_sorcery *sorcery, void *object)
                for (i = 0; i < AST_VECTOR_SIZE(&object_type->wizards); i++) {
                        found_wizard = AST_VECTOR_GET(&object_type->wizards, i);
                        if (found_wizard->caching) {
-                               sorcery_wizard_delete(found_wizard, &sdetails, 0);
+                               sorcery_wizard_delete(found_wizard, &sdetails);
                        }
                }
 
                if (ao2_container_count(object_type->observers)) {
-                       struct sorcery_observer_invocation *invocation = sorcery_observer_invocation_alloc(
-                               object_type, object);
+                       struct sorcery_observer_invocation *invocation;
 
+                       invocation = sorcery_observer_invocation_alloc(object_type, object);
                        if (invocation
                                && ast_taskprocessor_push(object_type->serializer, sorcery_observers_notify_delete,
                                        invocation)) {
@@ -2368,7 +2373,7 @@ static int sorcery_observer_remove(void *obj, void *arg, int flags)
 {
        const struct ast_sorcery_object_type_observer *observer = obj;
 
-       return (observer->callbacks == arg) ? CMP_MATCH | CMP_STOP : 0;
+       return (observer->callbacks == arg) ? CMP_MATCH : 0;
 }
 
 void ast_sorcery_observer_remove(const struct ast_sorcery *sorcery, const char *type, const struct ast_sorcery_observer *callbacks)
@@ -2390,18 +2395,20 @@ void ast_sorcery_observer_remove(const struct ast_sorcery *sorcery, const char *
 
 int ast_sorcery_object_id_sort(const void *obj, const void *arg, int flags)
 {
+       const void *object_left = obj;
+       const void *object_right = arg;
        const char *right_key = arg;
        int cmp;
 
        switch (flags & OBJ_SEARCH_MASK) {
        case OBJ_SEARCH_OBJECT:
-               right_key = ast_sorcery_object_get_id(arg);
+               right_key = ast_sorcery_object_get_id(object_right);
                /* Fall through */
        case OBJ_SEARCH_KEY:
-               cmp = strcmp(ast_sorcery_object_get_id(obj), right_key);
+               cmp = strcmp(ast_sorcery_object_get_id(object_left), right_key);
                break;
        case OBJ_SEARCH_PARTIAL_KEY:
-               cmp = strncmp(ast_sorcery_object_get_id(obj), right_key, strlen(right_key));
+               cmp = strncmp(ast_sorcery_object_get_id(object_left), right_key, strlen(right_key));
                break;
        default:
                cmp = 0;
@@ -2412,37 +2419,32 @@ int ast_sorcery_object_id_sort(const void *obj, const void *arg, int flags)
 
 int ast_sorcery_object_id_compare(void *obj, void *arg, int flags)
 {
-       const char *right_key = arg;
-       int cmp = 0;
+       int cmp;
+
+       cmp = ast_sorcery_object_id_sort(obj, arg, flags);
+       if (cmp) {
+               return 0;
+       }
+       return CMP_MATCH;
+}
+
+int ast_sorcery_object_id_hash(const void *obj, int flags)
+{
+       const char *key;
 
        switch (flags & OBJ_SEARCH_MASK) {
-       case OBJ_SEARCH_OBJECT:
-               right_key = ast_sorcery_object_get_id(arg);
-               /* Fall through */
        case OBJ_SEARCH_KEY:
-               if (strcmp(ast_sorcery_object_get_id(obj), right_key) == 0) {
-                       cmp = CMP_MATCH | CMP_STOP;
-               }
+               key = obj;
                break;
-       case OBJ_SEARCH_PARTIAL_KEY:
-               if (strncmp(ast_sorcery_object_get_id(obj), right_key, strlen(right_key)) == 0) {
-                       cmp = CMP_MATCH;
-               }
+       case OBJ_SEARCH_OBJECT:
+               key = ast_sorcery_object_get_id(obj);
                break;
        default:
-               cmp = 0;
-               break;
-       }
-       return cmp;
-}
-
-int ast_sorcery_object_id_hash(const void *obj, int flags) {
-       if (flags & OBJ_SEARCH_OBJECT) {
-               return ast_str_hash(ast_sorcery_object_get_id(obj));
-       } else if (flags & OBJ_SEARCH_KEY) {
-               return ast_str_hash(obj);
+               /* Hash can only work on something with a full key. */
+               ast_assert(0);
+               return 0;
        }
-       return -1;
+       return ast_str_hash(key);
 }
 
 struct ast_sorcery_object_type *ast_sorcery_get_object_type(const struct ast_sorcery *sorcery,
@@ -2459,7 +2461,7 @@ static int is_registered_cb(void *obj, void *arg, int flags)
 
        if (object_field->name_regex
                && !regexec(object_field->name_regex, name, 0, NULL, 0)) {
-               rc = CMP_MATCH | CMP_STOP;
+               rc = CMP_MATCH;
        }
 
        return rc;
index 91ad94e..e04d92a 100644 (file)
@@ -59,6 +59,7 @@ ASTERISK_REGISTER_FILE();
                        </description>
                        <see-also>
                                <ref type="application">UserEvent</ref>
+                               <ref type="managerEvent">UserEvent</ref>
                        </see-also>
                </managerEventInstance>
        </managerEvent>
index 0e46edb..a5f29c7 100644 (file)
@@ -79,6 +79,9 @@ ASTERISK_REGISTER_FILE()
                                        <para>Destination extension for the blind transfer.</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="manager">BlindTransfer</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="AttendedTransfer">
@@ -131,6 +134,9 @@ ASTERISK_REGISTER_FILE()
                                <para>  <replaceable>SecondTransfererChannel</replaceable>: Alice's channel in the bridge with Bob.</para>
                                <para>  <replaceable>SecondBridgeUniqueid</replaceable>: The bridge between Alice and Bob.</para>
                        </description>
+                       <see-also>
+                               <ref type="manager">AtxFer</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
  ***/
index 46edf43..1d2aa0b 100644 (file)
@@ -2488,7 +2488,7 @@ void ast_set_default_eid(struct ast_eid *eid)
                return;
        }
        for (x = 0; x < MAXIF; x++) {
-               static const char *prefixes[] = { "eth", "em" };
+               static const char *prefixes[] = { "eth", "em", "eno", "ens" };
                unsigned int i;
 
                for (i = 0; i < ARRAY_LEN(prefixes); i++) {
@@ -2539,7 +2539,7 @@ void ast_set_default_eid(struct ast_eid *eid)
        }
 #endif
 #endif
-       ast_debug(1, "No ethernet interface found for seeding global EID. You will have to set it manually.\n");
+       ast_log(LOG_WARNING, "No ethernet interface found for seeding global EID. You will have to set it manually.\n");
 }
 
 int ast_str_to_eid(struct ast_eid *eid, const char *s)
@@ -2564,6 +2564,14 @@ int ast_eid_cmp(const struct ast_eid *eid1, const struct ast_eid *eid2)
        return memcmp(eid1, eid2, sizeof(*eid1));
 }
 
+int ast_eid_is_empty(const struct ast_eid *eid)
+{
+       struct ast_eid empty_eid;
+
+       memset(&empty_eid, 0, sizeof(empty_eid));
+       return memcmp(eid, &empty_eid, sizeof(empty_eid)) ? 0 : 1;
+}
+
 int ast_file_is_readable(const char *filename)
 {
 #if defined(HAVE_EACCESS) || defined(HAVE_EUIDACCESS)
index 94b71a0..af5cb32 100644 (file)
@@ -4847,6 +4847,9 @@ static int set_config(char *config_file, struct sockaddr_in* sin, int reload)
                ast_log(LOG_WARNING, "Unable to get host name!\n");
        AST_LIST_LOCK(&peers);
 
+       if (ast_eid_is_empty(&ast_eid_default)) {
+               ast_log(LOG_WARNING, "Entity ID is not set.\n");
+       }
        memcpy(&global_eid, &ast_eid_default, sizeof(global_eid));
 
        global_storehistory = 0;
index e8249e2..e0eb8e2 100644 (file)
@@ -22,7 +22,6 @@
  *
  * \author Mark Spencer <markster@digium.com>
  *
- * \todo Convert the rest of the AGI commands over to XML documentation
  */
 
 /*** MODULEINFO
@@ -85,6 +84,7 @@ ASTERISK_REGISTER_FILE()
                </description>
                <see-also>
                        <ref type="agi">hangup</ref>
+                       <ref type="application">AGI</ref>
                </see-also>
        </agi>
        <agi name="asyncagi break" language="en_US">
@@ -98,6 +98,7 @@ ASTERISK_REGISTER_FILE()
                </description>
                <see-also>
                        <ref type="agi">hangup</ref>
+                       <ref type="application">AGI</ref>
                </see-also>
        </agi>
        <agi name="channel status" language="en_US">
@@ -138,6 +139,9 @@ ASTERISK_REGISTER_FILE()
                                </enum>
                        </enumlist>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="control stream file" language="en_US">
                <synopsis>
@@ -188,6 +192,11 @@ ASTERISK_REGISTER_FILE()
                                </variable>
                        </variablelist>
                </description>
+               <see-also>
+                       <ref type="agi">get option</ref>
+                       <ref type="agi">control stream file</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="database del" language="en_US">
                <synopsis>
@@ -203,6 +212,12 @@ ASTERISK_REGISTER_FILE()
                        <para>Returns <literal>1</literal> if successful, <literal>0</literal>
                        otherwise.</para>
                </description>
+               <see-also>
+                       <ref type="agi">database get</ref>
+                       <ref type="agi">database put</ref>
+                       <ref type="agi">database deltree</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="database deltree" language="en_US">
                <synopsis>
@@ -217,6 +232,12 @@ ASTERISK_REGISTER_FILE()
                        within a <replaceable>family</replaceable> in the Asterisk database.</para>
                        <para>Returns <literal>1</literal> if successful, <literal>0</literal> otherwise.</para>
                </description>
+               <see-also>
+                       <ref type="agi">database get</ref>
+                       <ref type="agi">database put</ref>
+                       <ref type="agi">database del</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="database get" language="en_US">
                <synopsis>
@@ -234,6 +255,12 @@ ASTERISK_REGISTER_FILE()
                        in parenthesis.</para>
                        <para>Example return code: 200 result=1 (testvariable)</para>
                </description>
+               <see-also>
+                       <ref type="agi">database put</ref>
+                       <ref type="agi">database del</ref>
+                       <ref type="agi">database deltree</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="database put" language="en_US">
                <synopsis>
@@ -250,6 +277,12 @@ ASTERISK_REGISTER_FILE()
                        <replaceable>value</replaceable>.</para>
                        <para>Returns <literal>1</literal> if successful, <literal>0</literal> otherwise.</para>
                </description>
+               <see-also>
+                       <ref type="agi">database get</ref>
+                       <ref type="agi">database del</ref>
+                       <ref type="agi">database deltree</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="exec" language="en_US">
                <synopsis>
@@ -265,6 +298,9 @@ ASTERISK_REGISTER_FILE()
                        <para>Returns whatever the <replaceable>application</replaceable> returns, or
                        <literal>-2</literal> on failure to find <replaceable>application</replaceable>.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="get data" language="en_US">
                <synopsis>
@@ -279,6 +315,9 @@ ASTERISK_REGISTER_FILE()
                        <para>Stream the given <replaceable>file</replaceable>, and receive DTMF data.</para>
                        <para>Returns the digits received from the channel at the other end.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="get full variable" language="en_US">
                <synopsis>
@@ -295,6 +334,11 @@ ASTERISK_REGISTER_FILE()
                        variables, unlike GET VARIABLE.</para>
                        <para>Example return code: 200 result=1 (testvariable)</para>
                </description>
+               <see-also>
+                       <ref type="agi">get variable</ref>
+                       <ref type="agi">set variable</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="get option" language="en_US">
                <synopsis>
@@ -310,6 +354,8 @@ ASTERISK_REGISTER_FILE()
                </description>
                <see-also>
                        <ref type="agi">stream file</ref>
+                       <ref type="agi">control stream file</ref>
+                       <ref type="application">AGI</ref>
                </see-also>
        </agi>
        <agi name="get variable" language="en_US">
@@ -325,6 +371,11 @@ ASTERISK_REGISTER_FILE()
                        the variable in parentheses.</para>
                        <para>Example return code: 200 result=1 (testvariable)</para>
                </description>
+               <see-also>
+                       <ref type="agi">get full variable</ref>
+                       <ref type="agi">set variable</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="hangup" language="en_US">
                <synopsis>
@@ -337,6 +388,9 @@ ASTERISK_REGISTER_FILE()
                        <para>Hangs up the specified channel. If no channel name is given, hangs
                        up the current channel</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="noop" language="en_US">
                <synopsis>
@@ -346,6 +400,9 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Does nothing.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="receive char" language="en_US">
                <synopsis>
@@ -363,6 +420,10 @@ ASTERISK_REGISTER_FILE()
                        if one is received, or <literal>0</literal> if the channel does not support
                        text reception. Returns <literal>-1</literal> only on error/hangup.</para>
                </description>
+               <see-also>
+                       <ref type="agi">receive text</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="receive text" language="en_US">
                <synopsis>
@@ -379,6 +440,11 @@ ASTERISK_REGISTER_FILE()
                        do not support the reception of text. Returns <literal>-1</literal> for failure
                        or <literal>1</literal> for success, and the string in parenthesis.</para>
                </description>
+               <see-also>
+                       <ref type="agi">receive char</ref>
+                       <ref type="agi">send text</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="record file" language="en_US">
                <synopsis>
@@ -404,6 +470,9 @@ ASTERISK_REGISTER_FILE()
                        lack of dtmf digits or reaching <replaceable>timeout</replaceable>. <replaceable>silence</replaceable>
                        value must be preceded by <literal>s=</literal> and is also optional.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="say alpha" language="en_US">
                <synopsis>
@@ -419,6 +488,15 @@ ASTERISK_REGISTER_FILE()
                        without a digit being pressed, or the ASCII numerical value of the digit if one
                        was pressed or <literal>-1</literal> on error/hangup.</para>
                </description>
+               <see-also>
+                       <ref type="agi">say digits</ref>
+                       <ref type="agi">say number</ref>
+                       <ref type="agi">say phonetic</ref>
+                       <ref type="agi">say date</ref>
+                       <ref type="agi">say time</ref>
+                       <ref type="agi">say datetime</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="say digits" language="en_US">
                <synopsis>
@@ -434,6 +512,15 @@ ASTERISK_REGISTER_FILE()
                        without a digit being pressed, or the ASCII numerical value of the digit if one
                        was pressed or <literal>-1</literal> on error/hangup.</para>
                </description>
+               <see-also>
+                       <ref type="agi">say alpha</ref>
+                       <ref type="agi">say number</ref>
+                       <ref type="agi">say phonetic</ref>
+                       <ref type="agi">say date</ref>
+                       <ref type="agi">say time</ref>
+                       <ref type="agi">say datetime</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="say number" language="en_US">
                <synopsis>
@@ -450,6 +537,15 @@ ASTERISK_REGISTER_FILE()
                        completes without a digit being pressed, or the ASCII numerical value of
                        the digit if one was pressed or <literal>-1</literal> on error/hangup.</para>
                </description>
+               <see-also>
+                       <ref type="agi">say alpha</ref>
+                       <ref type="agi">say digits</ref>
+                       <ref type="agi">say phonetic</ref>
+                       <ref type="agi">say date</ref>
+                       <ref type="agi">say time</ref>
+                       <ref type="agi">say datetime</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="say phonetic" language="en_US">
                <synopsis>
@@ -465,6 +561,15 @@ ASTERISK_REGISTER_FILE()
                        playback completes without a digit pressed, the ASCII numerical value of the digit
                        if one was pressed, or <literal>-1</literal> on error/hangup.</para>
                </description>
+               <see-also>
+                       <ref type="agi">say alpha</ref>
+                       <ref type="agi">say digits</ref>
+                       <ref type="agi">say number</ref>
+                       <ref type="agi">say date</ref>
+                       <ref type="agi">say time</ref>
+                       <ref type="agi">say datetime</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="say date" language="en_US">
                <synopsis>
@@ -483,6 +588,15 @@ ASTERISK_REGISTER_FILE()
                        completes without a digit being pressed, or the ASCII numerical value of the
                        digit if one was pressed or <literal>-1</literal> on error/hangup.</para>
                </description>
+               <see-also>
+                       <ref type="agi">say alpha</ref>
+                       <ref type="agi">say digits</ref>
+                       <ref type="agi">say number</ref>
+                       <ref type="agi">say phonetic</ref>
+                       <ref type="agi">say time</ref>
+                       <ref type="agi">say datetime</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="say time" language="en_US">
                <synopsis>
@@ -501,6 +615,15 @@ ASTERISK_REGISTER_FILE()
                        without a digit being pressed, or the ASCII numerical value of the digit if
                        one was pressed or <literal>-1</literal> on error/hangup.</para>
                </description>
+               <see-also>
+                       <ref type="agi">say alpha</ref>
+                       <ref type="agi">say digits</ref>
+                       <ref type="agi">say number</ref>
+                       <ref type="agi">say phonetic</ref>
+                       <ref type="agi">say date</ref>
+                       <ref type="agi">say datetime</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="say datetime" language="en_US">
                <synopsis>
@@ -528,6 +651,15 @@ ASTERISK_REGISTER_FILE()
                        completes without a digit being pressed, or the ASCII numerical value of the
                        digit if one was pressed or <literal>-1</literal> on error/hangup.</para>
                </description>
+               <see-also>
+                       <ref type="agi">say alpha</ref>
+                       <ref type="agi">say digits</ref>
+                       <ref type="agi">say number</ref>
+                       <ref type="agi">say phonetic</ref>
+                       <ref type="agi">say date</ref>
+                       <ref type="agi">say time</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="send image" language="en_US">
                <synopsis>
@@ -542,6 +674,9 @@ ASTERISK_REGISTER_FILE()
                        the channel does not support image transmission.  Returns <literal>-1</literal>
                        only on error/hangup. Image names should not include extensions.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="send text" language="en_US">
                <synopsis>
@@ -559,6 +694,10 @@ ASTERISK_REGISTER_FILE()
                        channel does not support text transmission. Returns <literal>-1</literal> only
                        on error/hangup.</para>
                </description>
+               <see-also>
+                       <ref type="agi">receive text</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="set autohangup" language="en_US">
                <synopsis>
@@ -572,6 +711,9 @@ ASTERISK_REGISTER_FILE()
                        seconds in the future. Of course it can be hungup before then as well. Setting to
                        <literal>0</literal> will cause the autohangup feature to be disabled on this channel.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="set callerid" language="en_US">
                <synopsis>
@@ -583,6 +725,9 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Changes the callerid of the current channel.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="set context" language="en_US">
                <synopsis>
@@ -594,6 +739,11 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Sets the context for continuation upon exiting the application.</para>
                </description>
+               <see-also>
+                       <ref type="agi">set extension</ref>
+                       <ref type="agi">set priority</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="set extension" language="en_US">
                <synopsis>
@@ -605,6 +755,11 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Changes the extension for continuation upon exiting the application.</para>
                </description>
+               <see-also>
+                       <ref type="agi">set context</ref>
+                       <ref type="agi">set priority</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="set music" language="en_US">
                <synopsis>
@@ -629,6 +784,9 @@ ASTERISK_REGISTER_FILE()
                        used. This generator will be stopped automatically when playing a file.</para>
                        <para>Always returns <literal>0</literal>.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="set priority" language="en_US">
                <synopsis>
@@ -641,6 +799,11 @@ ASTERISK_REGISTER_FILE()
                        <para>Changes the priority for continuation upon exiting the application.
                        The priority must be a valid priority or label.</para>
                </description>
+               <see-also>
+                       <ref type="agi">set context</ref>
+                       <ref type="agi">set extension</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="set variable" language="en_US">
                <synopsis>
@@ -653,6 +816,11 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Sets a variable to the current channel.</para>
                </description>
+               <see-also>
+                       <ref type="agi">get variable</ref>
+                       <ref type="agi">get full variable</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="stream file" language="en_US">
                <synopsis>
@@ -690,6 +858,8 @@ ASTERISK_REGISTER_FILE()
                </description>
                <see-also>
                        <ref type="agi">control stream file</ref>
+                       <ref type="agi">get option</ref>
+                       <ref type="application">AGI</ref>
                </see-also>
        </agi>
        <agi name="tdd mode" language="en_US">
@@ -708,6 +878,9 @@ ASTERISK_REGISTER_FILE()
                        <para>Enable/Disable TDD transmission/reception on a channel. Returns <literal>1</literal> if
                        successful, or <literal>0</literal> if channel is not TDD-capable.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="verbose" language="en_US">
                <synopsis>
@@ -722,6 +895,9 @@ ASTERISK_REGISTER_FILE()
                        message system. <replaceable>level</replaceable> is the verbose level (1-4).
                        Always returns <literal>1</literal></para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="wait for digit" language="en_US">
                <synopsis>
@@ -737,6 +913,9 @@ ASTERISK_REGISTER_FILE()
                        one is received. Use <literal>-1</literal> for the <replaceable>timeout</replaceable> value if
                        you desire the call to block indefinitely.</para>
                </description>
+               <see-also>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="speech create" language="en_US">
                <synopsis>
@@ -748,6 +927,16 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Create a speech object to be used by the other Speech AGI commands.</para>
                </description>
+               <see-also>
+                       <ref type="agi">speech set</ref>
+                       <ref type="agi">speech destroy</ref>
+                       <ref type="agi">speech load grammar</ref>
+                       <ref type="agi">speech unload grammar</ref>
+                       <ref type="agi">speech activate grammar</ref>
+                       <ref type="agi">speech deactivate grammar</ref>
+                       <ref type="agi">speech recognize</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="speech set" language="en_US">
                <synopsis>
@@ -760,6 +949,16 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Set an engine-specific setting.</para>
                </description>
+               <see-also>
+                       <ref type="agi">speech create</ref>
+                       <ref type="agi">speech destroy</ref>
+                       <ref type="agi">speech load grammar</ref>
+                       <ref type="agi">speech unload grammar</ref>
+                       <ref type="agi">speech activate grammar</ref>
+                       <ref type="agi">speech deactivate grammar</ref>
+                       <ref type="agi">speech recognize</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="speech destroy" language="en_US">
                <synopsis>
@@ -772,6 +971,13 @@ ASTERISK_REGISTER_FILE()
                </description>
                <see-also>
                        <ref type="agi">speech create</ref>
+                       <ref type="agi">speech set</ref>
+                       <ref type="agi">speech load grammar</ref>
+                       <ref type="agi">speech unload grammar</ref>
+                       <ref type="agi">speech activate grammar</ref>
+                       <ref type="agi">speech deactivate grammar</ref>
+                       <ref type="agi">speech recognize</ref>
+                       <ref type="application">AGI</ref>
                </see-also>
        </agi>
        <agi name="speech load grammar" language="en_US">
@@ -785,6 +991,16 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Loads the specified grammar as the specified name.</para>
                </description>
+               <see-also>
+                       <ref type="agi">speech create</ref>
+                       <ref type="agi">speech set</ref>
+                       <ref type="agi">speech destroy</ref>
+                       <ref type="agi">speech unload grammar</ref>
+                       <ref type="agi">speech activate grammar</ref>
+                       <ref type="agi">speech deactivate grammar</ref>
+                       <ref type="agi">speech recognize</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="speech unload grammar" language="en_US">
                <synopsis>
@@ -796,6 +1012,16 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Unloads the specified grammar.</para>
                </description>
+               <see-also>
+                       <ref type="agi">speech create</ref>
+                       <ref type="agi">speech set</ref>
+                       <ref type="agi">speech destroy</ref>
+                       <ref type="agi">speech load grammar</ref>
+                       <ref type="agi">speech activate grammar</ref>
+                       <ref type="agi">speech deactivate grammar</ref>
+                       <ref type="agi">speech recognize</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="speech activate grammar" language="en_US">
                <synopsis>
@@ -807,6 +1033,16 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Activates the specified grammar on the speech object.</para>
                </description>
+               <see-also>
+                       <ref type="agi">speech create</ref>
+                       <ref type="agi">speech set</ref>
+                       <ref type="agi">speech destroy</ref>
+                       <ref type="agi">speech load grammar</ref>
+                       <ref type="agi">speech unload grammar</ref>
+                       <ref type="agi">speech deactivate grammar</ref>
+                       <ref type="agi">speech recognize</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="speech deactivate grammar" language="en_US">
                <synopsis>
@@ -818,6 +1054,16 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Deactivates the specified grammar on the speech object.</para>
                </description>
+               <see-also>
+                       <ref type="agi">speech create</ref>
+                       <ref type="agi">speech set</ref>
+                       <ref type="agi">speech destroy</ref>
+                       <ref type="agi">speech load grammar</ref>
+                       <ref type="agi">speech unload grammar</ref>
+                       <ref type="agi">speech activate grammar</ref>
+                       <ref type="agi">speech recognize</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <agi name="speech recognize" language="en_US">
                <synopsis>
@@ -832,14 +1078,27 @@ ASTERISK_REGISTER_FILE()
                        <para>Plays back given <replaceable>prompt</replaceable> while listening for
                        speech and dtmf.</para>
                </description>
+               <see-also>
+                       <ref type="agi">speech create</ref>
+                       <ref type="agi">speech set</ref>
+                       <ref type="agi">speech destroy</ref>
+                       <ref type="agi">speech load grammar</ref>
+                       <ref type="agi">speech unload grammar</ref>
+                       <ref type="agi">speech activate grammar</ref>
+                       <ref type="agi">speech deactivate grammar</ref>
+                       <ref type="application">AGI</ref>
+               </see-also>
        </agi>
        <application name="AGI" language="en_US">
                <synopsis>
                        Executes an AGI compliant application.
                </synopsis>
                <syntax>
-                       <parameter name="command" required="true" />
+                       <parameter name="command" required="true">
+                               <para>How AGI should be invoked on the channel.</para>
+                       </parameter>
                        <parameter name="args">
+                               <para>Arguments to pass to the AGI script or server.</para>
                                <argument name="arg1" required="true" />
                                <argument name="arg2" multiple="yes" />
                        </parameter>
@@ -848,21 +1107,72 @@ ASTERISK_REGISTER_FILE()
                        <para>Executes an Asterisk Gateway Interface compliant
                        program on a channel. AGI allows Asterisk to launch external programs written
                        in any language to control a telephony channel, play audio, read DTMF digits,
-                       etc. by communicating with the AGI protocol on <emphasis>stdin</emphasis> and
-                       <emphasis>stdout</emphasis>. As of <literal>1.6.0</literal>, this channel will
+                       etc. by communicating with the AGI protocol.</para>
+                       <para>The following variants of AGI exist, and are chosen based on the value
+                       passed to <replaceable>command</replaceable>:</para>
+                       <enumlist>
+                               <enum name="AGI">
+                                       <para>The classic variant of AGI, this will launch the script
+                                       specified by <replaceable>command</replaceable> as a new process.
+                                       Communication with the script occurs on <literal>stdin</literal> and
+                                       <literal>stdout</literal>. If the full path to the script is not
+                                       provided, the <directory>astagidir</directory> specified in
+                                       <filename>asterisk.conf</filename> will be used.
+                                       </para>
+                               </enum>
+                               <enum name="FastAGI">
+                                       <para>Connect Asterisk to a FastAGI server using a TCP connection.
+                                       The URI to the FastAGI server should be given in the form
+                                       <literal>[scheme]://host.domain[:port][/script/name]</literal>,
+                                       where <replaceable>scheme</replaceable> is either <literal>agi</literal>
+                                       or <literal>hagi</literal>.</para>
+                                       <para>In the case of <literal>hagi</literal>, an SRV lookup will be
+                                       performed to try to connect to a list of FastAGI servers. The hostname in
+                                       the URI must be prefixed with <literal>_agi._tcp</literal>. prior to the DNS resolution. For
+                                       example, if you specify the URI <literal>hagi://agi.example.com/foo.agi</literal>
+                                       the DNS query would be for <literal>_agi._tcp.agi.example.com</literal>. You
+                                       will need to make sure this resolves correctly.</para>
+                               </enum>
+                               <enum name="AsyncAGI">
+                                       <para>Use AMI to control the channel in AGI. AGI commands can be invoked
+                                       using the <literal>AMI</literal> action, with a variety of AGI specific
+                                       events passed back over the AMI connection. AsyncAGI should be invoked
+                                       by passing <literal>agi:async</literal> to the <replaceable>command</replaceable>
+                                       parameter.</para>
+                               </enum>
+                       </enumlist>
+                       <note>
+                       <para>As of <literal>1.6.0</literal>, this channel will
                        not stop dialplan execution on hangup inside of this application. Dialplan
                        execution will continue normally, even upon hangup until the AGI application
                        signals a desire to stop (either by exiting or, in the case of a net script, by
-                       closing the connection). A locally executed AGI script will receive SIGHUP on
-                       hangup from the channel except when using DeadAGI. A fast AGI server will
-                       correspondingly receive a HANGUP inline with the command dialog. Both of theses
-                       signals may be disabled by setting the <variable>AGISIGHUP</variable> channel
-                       variable to <literal>no</literal> before executing the AGI application.
+                       closing the connection).</para>
+                       <para>A locally executed AGI script will receive <literal>SIGHUP</literal> on
+                       hangup from the channel except when using <literal>DeadAGI</literal>
+                       (or when the channel is already hungup). A fast AGI server will
+                       correspondingly receive a <literal>HANGUP</literal> inline with the command dialog.
+                       Both of these signals may be disabled by setting the <variable>AGISIGHUP</variable>
+                       channel variable to <literal>no</literal> before executing the AGI application.
                        Alternatively, if you would like the AGI application to exit immediately
                        after a channel hangup is detected, set the <variable>AGIEXITONHANGUP</variable>
                        variable to <literal>yes</literal>.</para>
-                       <para>Use the CLI command <literal>agi show commands</literal> to list available agi
-                       commands.</para>
+                       </note>
+                       <example title="AGI invocation examples">
+                               ; Start the AGI script /tmp/my-cool-script.sh, passing it the contents
+                               ; of the channel variable FOO
+                               same => n,AGI(/tmp/my-cool-script.sh,${FOO})
+
+                               ; Start the AGI script my-cool-script.sh located in the astagidir
+                               ; directory, specified in asterisk.conf
+                               same => n,AGI(my-cool-script.sh)
+
+                               ; Connect to the FastAGI server located at 127.0.0.1 and start the script
+                               ; awesome-script
+                               same => n,AGI(agi://127.0.0.1/awesome-script)
+
+                               ; Start AsyncAGI
+                               same => n,AGI(agi:async)
+                       </example>
                        <para>This application sets the following channel variable upon completion:</para>
                        <variablelist>
                                <variable name="AGISTATUS">
@@ -876,8 +1186,12 @@ ASTERISK_REGISTER_FILE()
                        </variablelist>
                </description>
                <see-also>
+                       <ref type="manager">AGI</ref>
+                       <ref type="managerEvent">AsyncAGIStart</ref>
+                       <ref type="managerEvent">AsyncAGIEnd</ref>
                        <ref type="application">EAGI</ref>
                        <ref type="application">DeadAGI</ref>
+                       <ref type="filename">asterisk.conf</ref>
                </see-also>
        </application>
        <application name="EAGI" language="en_US">
@@ -890,8 +1204,10 @@ ASTERISK_REGISTER_FILE()
                </syntax>
                <description>
                        <para>Using 'EAGI' provides enhanced AGI, with incoming audio available out of band
-                       on file descriptor 3.</para>
-                       <xi:include xpointer="xpointer(/docs/application[@name='AGI']/description/para)" />
+                       on file descriptor 3. In all other respects, it behaves in the same fashion as
+                       AGI. See the documentation for the <literal>AGI</literal> dialplan application for
+                       more information on invoking AGI on a channel.</para>
+                       <para>This application sets the following channel variable upon completion:</para>
                        <xi:include xpointer="xpointer(/docs/application[@name='AGI']/description/variablelist)" />
                </description>
                <see-also>
@@ -908,7 +1224,16 @@ ASTERISK_REGISTER_FILE()
                        <xi:include xpointer="xpointer(/docs/application[@name='AGI']/syntax/parameter[@name='args'])" />
                </syntax>
                <description>
-                       <xi:include xpointer="xpointer(/docs/application[@name='AGI']/description/para)" />
+                       <warning>
+                               <para>This application is deprecated and may be removed in a future version
+                               of Asterisk. Use the replacement application <literal>AGI</literal> instead
+                               of <literal>DeadAGI</literal>.
+                               </para>
+                       </warning>
+                       <para>Execute AGI on a 'dead' or hungup channel. See the documentation for the
+                       <literal>AGI</literal> dialplan application for more information on invoking
+                       AGI on a channel.</para>
+                       <para>This application sets the following channel variable upon completion:</para>
                        <xi:include xpointer="xpointer(/docs/application[@name='AGI']/description/variablelist)" />
                </description>
                <see-also>
@@ -936,6 +1261,11 @@ ASTERISK_REGISTER_FILE()
                <description>
                        <para>Add an AGI command to the execute queue of the channel in Async AGI.</para>
                </description>
+               <see-also>
+                       <ref type="managerEvent">AsyncAGIStart</ref>
+                       <ref type="managerEvent">AsyncAGIExec</ref>
+                       <ref type="managerEvent">AsyncAGIEnd</ref>
+               </see-also>
        </manager>
        <managerEvent language="en_US" name="AsyncAGIStart">
                <managerEventInstance class="EVENT_FLAG_AGI">
@@ -946,6 +1276,12 @@ ASTERISK_REGISTER_FILE()
                                        <para>URL encoded string read from the AsyncAGI server.</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">AsyncAGIEnd</ref>
+                               <ref type="managerEvent">AsyncAGIExec</ref>
+                               <ref type="application">AGI</ref>
+                               <ref type="manager">AGI</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="AsyncAGIEnd">
@@ -954,6 +1290,12 @@ ASTERISK_REGISTER_FILE()
                        <syntax>
                                <channel_snapshot/>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">AsyncAGIStart</ref>
+                               <ref type="managerEvent">AsyncAGIExec</ref>
+                               <ref type="application">AGI</ref>
+                               <ref type="manager">AGI</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="AsyncAGIExec">
@@ -968,6 +1310,12 @@ ASTERISK_REGISTER_FILE()
                                        <para>URL encoded result string from the executed AGI command.</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">AsyncAGIStart</ref>
+                               <ref type="managerEvent">AsyncAGIEnd</ref>
+                               <ref type="application">AGI</ref>
+                               <ref type="manager">AGI</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="AGIExecStart">
@@ -982,6 +1330,10 @@ ASTERISK_REGISTER_FILE()
                                        <para>Random identification number assigned to the execution of this command.</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">AGIExecEnd</ref>
+                               <ref type="application">AGI</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
        <managerEvent language="en_US" name="AGIExecEnd">
@@ -997,6 +1349,10 @@ ASTERISK_REGISTER_FILE()
                                        <para>The text result reason from AGI</para>
                                </parameter>
                        </syntax>
+                       <see-also>
+                               <ref type="managerEvent">AGIExecStart</ref>
+                               <ref type="application">AGI</ref>
+                       </see-also>
                </managerEventInstance>
        </managerEvent>
  ***/
index 675bb33..dbb8846 100644 (file)
@@ -1103,6 +1103,11 @@ static int load_module(void)
        cs_error_t cs_err;
        struct cpg_name name;
 
+       if (ast_eid_is_empty(&ast_eid_default)) {
+               ast_log(LOG_ERROR, "Entity ID is not set.\n");
+               return AST_MODULE_LOAD_DECLINE;
+       }
+
        nodes = ao2_container_alloc(23, corosync_node_hash_fn, corosync_node_cmp_fn);
        if (!nodes) {
                goto failed;
@@ -1162,6 +1167,7 @@ static int load_module(void)
 
        ast_cli_register_multiple(corosync_cli, ARRAY_LEN(corosync_cli));
 
+
        return AST_MODULE_LOAD_SUCCESS;
 
 failed:
index 002d976..b32408a 100644 (file)
@@ -858,6 +858,11 @@ static int load_module(void)
 {
        CHECK_PJSIP_PUBSUB_MODULE_LOADED();
 
+       if (ast_eid_is_empty(&ast_eid_default)) {
+               ast_log(LOG_ERROR, "Entity ID is not set.\n");
+               return AST_MODULE_LOAD_DECLINE;
+       }
+
        ast_sorcery_apply_config(ast_sip_get_sorcery(), "asterisk-publication");
        ast_sorcery_apply_default(ast_sip_get_sorcery(), "asterisk-publication", "config", "pjsip.conf,criteria=type=asterisk-publication");
 
index 6059a52..852537b 100644 (file)
@@ -109,22 +109,6 @@ static void sorcery_config_destructor(void *obj)
        ast_variables_destroy(config->criteria);
 }
 
-/*! \brief Hashing function for sorcery objects */
-static int sorcery_config_hash(const void *obj, const int flags)
-{
-       const char *id = obj;
-
-       return ast_str_hash(flags & OBJ_KEY ? id : ast_sorcery_object_get_id(obj));
-}
-
-/*! \brief Comparator function for sorcery objects */
-static int sorcery_config_cmp(void *obj, void *arg, int flags)
-{
-       const char *id = arg;
-
-       return !strcmp(ast_sorcery_object_get_id(obj), flags & OBJ_KEY ? id : ast_sorcery_object_get_id(arg)) ? CMP_MATCH | CMP_STOP : 0;
-}
-
 static int sorcery_config_fields_cmp(void *obj, void *arg, int flags)
 {
        const struct sorcery_config_fields_cmp_params *params = arg;
@@ -145,14 +129,16 @@ static int sorcery_config_fields_cmp(void *obj, void *arg, int flags)
                return 0;
        }
 
+       /* We want this object */
        if (params->container) {
+               /*
+                * We are putting the found objects into the given container instead
+                * of the normal container traversal return mechanism.
+                */
                ao2_link(params->container, obj);
-
-               /* As multiple objects are being returned keep going */
                return 0;
        } else {
-               /* Immediately stop and return, we only want a single object */
-               return CMP_MATCH | CMP_STOP;
+               return CMP_MATCH;
        }
 }
 
@@ -179,7 +165,7 @@ static void *sorcery_config_retrieve_id(const struct ast_sorcery *sorcery, void
        struct sorcery_config *config = data;
        RAII_VAR(struct ao2_container *, objects, ao2_global_obj_ref(config->objects), ao2_cleanup);
 
-       return objects ? ao2_find(objects, id, OBJ_KEY) : NULL;
+       return objects ? ao2_find(objects, id, OBJ_SEARCH_KEY) : NULL;
 }
 
 static void sorcery_config_retrieve_multiple(const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const struct ast_variable *fields)
@@ -196,7 +182,7 @@ static void sorcery_config_retrieve_multiple(const struct ast_sorcery *sorcery,
                return;
        }
 
-       ao2_callback(config_objects, 0, sorcery_config_fields_cmp, &params);
+       ao2_callback(config_objects, OBJ_NODATA | OBJ_MULTIPLE, sorcery_config_fields_cmp, &params);
 }
 
 static void sorcery_config_retrieve_regex(const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const char *regex)
@@ -218,7 +204,7 @@ static void sorcery_config_retrieve_regex(const struct ast_sorcery *sorcery, voi
                return;
        }
 
-       ao2_callback(config_objects, 0, sorcery_config_fields_cmp, &params);
+       ao2_callback(config_objects, OBJ_NODATA | OBJ_MULTIPLE, sorcery_config_fields_cmp, &params);
        regfree(&expression);
 }
 
@@ -280,8 +266,9 @@ static void sorcery_config_internal_load(void *data, const struct ast_sorcery *s
        ast_debug(2, "Using bucket size of '%d' for objects of type '%s' from '%s'\n",
                buckets, type, config->filename);
 
-       if (!(objects = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_NOLOCK, buckets,
-               sorcery_config_hash, sorcery_config_cmp))) {
+       objects = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_NOLOCK, 0, buckets,
+               ast_sorcery_object_id_hash, NULL, ast_sorcery_object_id_compare);
+       if (!objects) {
                ast_log(LOG_ERROR, "Could not create bucket for new objects from '%s', keeping existing objects\n",
                        config->filename);
                ast_config_destroy(cfg);
@@ -300,8 +287,7 @@ static void sorcery_config_internal_load(void *data, const struct ast_sorcery *s
                /*  Confirm an object with this id does not already exist in the bucket.
                 *  If it exists, however, the configuration is invalid so stop
                 *  processing and destroy it. */
-               obj = ao2_find(objects, id, OBJ_KEY);
-
+               obj = ao2_find(objects, id, OBJ_SEARCH_KEY);
                if (obj) {
                        ast_log(LOG_ERROR, "Config file '%s' could not be loaded; configuration contains a duplicate object: '%s' of type '%s'\n",
                                config->filename, id, type);
index 67e479d..c2b7796 100644 (file)
@@ -4652,6 +4652,10 @@ static int load_module(void)
        ast_mutex_init(&messagelock);
        ast_cond_init(&message_received_condition, NULL);
 
+       if (ast_eid_is_empty(&ast_eid_default)) {
+               ast_log(LOG_WARNING, "Entity ID is not set. The distributing device state or MWI will not work.\n");
+       }
+
        return AST_MODULE_LOAD_SUCCESS;
 }