"Fossies" - the Fresh Open Source Software Archive

Member "opensips-3.0.1/modules/pua_xmpp/doc/pua_xmpp_admin.xml" (29 May 2019, 4650 Bytes) of package /linux/misc/opensips-3.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "pua_xmpp_admin.xml": 2.4.5_vs_3.0.0.

    1 <!-- Module User's Guide -->
    2 
    3 <chapter>
    4     
    5     <title>&adminguide;</title>
    6     
    7     <section id="overview" xreflabel="Overview">
    8     <title>Overview</title>
    9     <para>
   10         This module is a gateway for presence between SIP and XMPP.  
   11     </para>
   12     <para>
   13         It translates one format into another and uses xmpp, pua and presence
   14         modules to manage the transmition of presence state information. 
   15     </para>
   16     </section>
   17         <section id="dependencies" xreflabel="Dependencies">
   18     <title>Dependencies</title>
   19     <section>
   20         <title>&osips; Modules</title>
   21         <para>
   22         The following modules must be loaded before this module:
   23             <itemizedlist>
   24             <listitem>
   25             <para>
   26                 <emphasis>presence</emphasis>.
   27             </para>
   28             </listitem>
   29             <listitem>
   30             <para>
   31                 <emphasis>pua</emphasis>.
   32             </para>
   33             </listitem>
   34             <listitem>
   35             <para>
   36                 <emphasis>xmpp</emphasis>.
   37             </para>
   38             </listitem>
   39             </itemizedlist>
   40         </para>
   41     </section>
   42     <section>
   43         <title>External Libraries or Applications</title>
   44         <para>
   45         The following libraries or applications must be installed before running
   46         &osips; with this module loaded:
   47             <itemizedlist>
   48             <listitem>
   49             <para>
   50                 <emphasis>libxml</emphasis>.
   51             </para>
   52             </listitem>
   53             </itemizedlist>
   54         </para>
   55     </section>
   56     </section>
   57 
   58     <section id="exported_parameters" xreflabel="Exported Parameters">
   59     <title>Exported Parameters</title>
   60         <section id="param_server_address" xreflabel="server_address">
   61         <title><varname>server_address</varname>(str)</title>
   62         <para>
   63         The IP address of the server. 
   64         </para>
   65         <example>
   66         <title>Set <varname>server_address</varname> parameter</title>
   67         <programlisting format="linespecific">
   68 ...
   69 modparam("pua_xmpp", "server_address", "sip:sa@opensips.org:5060")
   70 ...
   71 </programlisting>
   72         </example>
   73     </section>
   74 
   75     <section id="param_presence_server" xreflabel="presence_server">
   76         <title><varname>presence_server</varname> (str)</title>
   77         <para>
   78         The the address of the presence server. If set, it will be
   79         used as outbound proxy when sending PUBLISH requests.
   80         </para>
   81         <example>
   82         <title>Set <varname>presence_server</varname> parameter</title>
   83         <programlisting format="linespecific">
   84 ...
   85 modparam("pua_xmpp", "presence_server", "sip:pa@opensips.org:5075")
   86 ...
   87     </programlisting>
   88         </example>
   89     </section>
   90 
   91     </section>
   92 
   93     <section id="exported_functions" xreflabel="exported_functions">
   94     <title>Exported Functions</title>
   95     <para>
   96     Functions exported to be used in configuration file.
   97     </para>
   98     <section id="func_pua_xmpp_notify" xreflabel="pua_xmpp_notify()">
   99         <title>
  100         <function moreinfo="none">pua_xmpp_notify()</function>
  101         </title>
  102         <para>
  103         Function that handles Notify messages addressed to a user from
  104         an xmpp domain. It requires filtering after method and domain in
  105         configuration file. If the function is successful, a 2xx reply must
  106         be sent.  
  107         </para>
  108         <para>
  109         This function can be used from REQUEST_ROUTE.
  110         </para>
  111         <example>
  112         <title><function>Notify2Xmpp</function> usage</title>
  113         <programlisting format="linespecific">
  114 ...
  115     if( is_method("NOTIFY") &amp;&amp; $ru=~"sip:.+@sip-xmpp.siphub.ro")
  116     {
  117         if(Notify2Xmpp())
  118             t_reply(200, "OK");
  119         exit;
  120     }
  121 ...
  122 </programlisting>
  123         </example>
  124     </section>
  125 
  126     <section id="func_pua_xmpp_req_winfo" xreflabel="pua_xmpp_req_winfo()">
  127         <title>
  128         <function moreinfo="none">pua_xmpp_req_winfo(request_uri, expires)</function>
  129         </title>
  130         <para>
  131         Function called when a Subscribe addressed to a user from a
  132         xmpp domain is received. It calls sending a Subscribe for 
  133         winfo for the user, and the following Notify with dialog-info
  134         is translated into a subscription in xmpp. 
  135         It also requires filtering in configuration file, after method, 
  136         domain and event(only for presence).
  137         </para>
  138         <para>Parameters:</para>
  139         <itemizedlist>
  140             <listitem><para>
  141                 <emphasis>request_uri</emphasis> (string)
  142             </para></listitem>
  143             <listitem><para>
  144                 <emphasis>expires</emphasis> (int) - value of Expires header field 
  145                 in received Subscribe.
  146             </para></listitem>
  147         </itemizedlist>
  148         <para>
  149         This function can be used from REQUEST_ROUTE.
  150         </para>
  151         <example>
  152         <title><function>xmpp_send_winfo</function> usage</title>
  153         <programlisting format="linespecific">
  154 ...
  155     if( is_method("SUBSCRIBE"))
  156     {
  157         handle_subscribe();
  158         if($ru=~"sip:.+@sip-xmpp.siphub.ro" &amp;&amp; $hdr(Event)== "presence")
  159         {
  160             pua_xmpp_req_winfo($ruri, $hdr(Expires));
  161         }
  162         t_release();
  163     }
  164 
  165 ...
  166         </programlisting>
  167         </example>
  168     </section>
  169     </section>
  170     <section>
  171     <title> Filtering </title>
  172     <para> 
  173     Instead of "sip-xmpp.siphub.ro"  in the example you should use the value
  174     set for the xmpp module parameter named 'gateway_domain'.
  175     </para>
  176     </section>
  177 
  178 
  179 </chapter>
  180