Module: kamailio Branch: master Commit: ad0f9a692e9e56195844e77ee8e6ebe0ca1f0bd2 URL: https://github.com/kamailio/kamailio/commit/ad0f9a692e9e56195844e77ee8e6ebe0...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-09-13T10:25:46+02:00
dispatcher: docs for ds_is_active()
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/ad0f9a692e9e56195844e77ee8e6ebe0... Patch: https://github.com/kamailio/kamailio/commit/ad0f9a692e9e56195844e77ee8e6ebe0...
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index 0ac1a430e6..7507773e13 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -1732,6 +1732,46 @@ if(ds_is_from_list("10", "3", "sip:127.0.0.1:5080")) { ... } ... +</programlisting> + </example> + </section> + <section id="dispatcher.f.ds_is_active"> + <title> + <function moreinfo="none">ds_is_active(groupid [, uri])</function> + </title> + <para> + This function returns true, if there is an active URI in the destination + group; otherwise false. If the uri parameter is provided, then the + corresponding destination has to be active. + </para> + <para>Description of parameters:</para> + <itemizedlist> + <listitem> + <para><emphasis>groupid</emphasis> - the group id. The parameter + can be an integer or a variable holding an integer value. + </para> + </listitem> + <listitem> + <para><emphasis>uri</emphasis> (optional) - the URI of the destination. + if parameter is empty or missing, the any destination is matched. + </para> + </listitem> + </itemizedlist> + + <para> + This function can be used from ANY_ROUTE. + </para> + <example> + <title><function>ds_is_active</function> usage</title> + <programlisting format="linespecific"> +... +if(ds_is_active("10")) { + ... +} +if(ds_is_active("10", "sip:127.0.0.1:5080")) { + ... +} +... </programlisting> </example> </section>