<div dir="ltr">Hi Daniel,<div><br></div><div>This is very useful :)</div><div><br></div><div>It is also a good use case for <span style="color:rgb(0,0,0);background-color:rgb(254,254,238)">dmq_bcast_message() in config.</span></div>
<div><span style="color:rgb(0,0,0);background-color:rgb(254,254,238)"><br></span></div><div><span style="color:rgb(0,0,0);background-color:rgb(254,254,238)">Do you think it would be worthwhile adding dmq integration to dialog module to enable the notifications to be sent and processed automatically? I'm happy to do it if so.</span></div>
<div><span style="color:rgb(0,0,0);background-color:rgb(254,254,238)"><br></span></div><div><span style="color:rgb(0,0,0);background-color:rgb(254,254,238)">Regards,</span></div><div><span style="color:rgb(0,0,0);background-color:rgb(254,254,238)"><br>
</span></div><div><span style="color:rgb(0,0,0);background-color:rgb(254,254,238)">Charles</span></div><div><span style="color:rgb(0,0,0);background-color:rgb(254,254,238)"><br></span></div><div><span style="color:rgb(0,0,0);background-color:rgb(254,254,238)"><br>
</span></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 22 August 2014 14:59, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Module: sip-router<br>
Branch: master<br>
Commit: d5c6185f4369833113e21802baafe18288fb4254<br>
URL:    <a href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d5c6185f4369833113e21802baafe18288fb4254" target="_blank">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d5c6185f4369833113e21802baafe18288fb4254</a><br>

<br>
Author: Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>><br>
Committer: Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>><br>
Date:   Fri Aug 22 15:52:12 2014 +0200<br>
<br>
dialog: documentation for dlg_remote_profile() config function<br>
<br>
---<br>
<br>
 modules/dialog/README               |   31 +++++++++++++++++++++<br>
 modules/dialog/doc/dialog_admin.xml |   51 +++++++++++++++++++++++++++++++++++<br>
 2 files changed, 82 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/modules/dialog/README b/modules/dialog/README<br>
index aeafc0b..37b2bc4 100644<br>
--- a/modules/dialog/README<br>
+++ b/modules/dialog/README<br>
@@ -110,6 +110,7 @@ Alex Balashov<br>
               6.14. dlg_set_timeout(timeout [, h_entry, h_id])<br>
               6.15. dlg_set_timeout_by_profile(profile, [value], timeout)<br>
               6.16. dlg_set_property(attr)<br>
+              6.17. dlg_remote_profile(cmd, profile, value, uid, expires)<br>
<br>
         7. Statistics<br>
<br>
@@ -233,6 +234,7 @@ Alex Balashov<br>
    1.64. dlg_set_timeout usage<br>
    1.65. dlg_set_timeout_by_profile usage<br>
    1.66. dlg_set_property usage<br>
+   1.67. dlg_remote_profile usage<br>
<br>
 Chapter 1. Admin Guide<br>
<br>
@@ -317,6 +319,7 @@ Chapter 1. Admin Guide<br>
         6.14. dlg_set_timeout(timeout [, h_entry, h_id])<br>
         6.15. dlg_set_timeout_by_profile(profile, [value], timeout)<br>
         6.16. dlg_set_property(attr)<br>
+        6.17. dlg_remote_profile(cmd, profile, value, uid, expires)<br>
<br>
    7. Statistics<br>
<br>
@@ -1169,6 +1172,7 @@ modparam("dialog", "timer_procs", 1)<br>
    6.14. dlg_set_timeout(timeout [, h_entry, h_id])<br>
    6.15. dlg_set_timeout_by_profile(profile, [value], timeout)<br>
    6.16. dlg_set_property(attr)<br>
+   6.17. dlg_remote_profile(cmd, profile, value, uid, expires)<br>
<br>
 6.1. set_dlg_profile(profile,[value])<br>
<br>
@@ -1511,6 +1515,33 @@ dlg_set_property("ka-dst");<br>
 dlg_set_property("timeout-noreset");<br>
 ...<br>
<br>
+6.17. dlg_remote_profile(cmd, profile, value, uid, expires)<br>
+<br>
+   Manage remote profile via config file. A remote profile item is<br>
+   considered when the dialog is not managed by this server instance. The<br>
+   notification to add/remove can be received via SIP or a RPC command,<br>
+   the operation can be then triggered from configuration file. This<br>
+   should allow counting active dialogs in a profile that are managed by<br>
+   multiple SIP server instances.<br>
+<br>
+   Meaning of the parameters is as follows:<br>
+     * cmd - the operations to do: add - add an item in profile; rm -<br>
+       remove an item from profile<br>
+     * profile - name of profile<br>
+     * value - value for profile (if no value is needed for that profile,<br>
+       use an empty string.<br>
+     * expires - absolute time (unix timestamp) when this profile item<br>
+       should be removed automatically (time based), if still in the<br>
+       profile<br>
+<br>
+   This function can be used from ANY_ROUTE.<br>
+<br>
+   Example 1.67. dlg_remote_profile usage<br>
+...<br>
+$var(exp) = 3600 + $Ts;<br>
+dlg_remote_profile("add", "caller", "test", "$sruid", "$var(exp)");<br>
+...<br>
+<br>
 7. Statistics<br>
<br>
    7.1. active_dialogs<br>
diff --git a/modules/dialog/doc/dialog_admin.xml b/modules/dialog/doc/dialog_admin.xml<br>
index 1d5506f..3feb5f3 100644<br>
--- a/modules/dialog/doc/dialog_admin.xml<br>
+++ b/modules/dialog/doc/dialog_admin.xml<br>
@@ -1886,6 +1886,57 @@ dlg_set_property("timeout-noreset");<br>
                </example><br>
        </section><br>
<br>
+       <section id="dialog.f.dlg_remote_profile"><br>
+               <title><br>
+               <function moreinfo="none">dlg_remote_profile(cmd, profile, value, uid, expires)</function><br>
+               </title><br>
+               <para><br>
+                       Manage remote profile via config file. A remote profile item is considered when<br>
+                       the dialog is not managed by this server instance. The notification to add/remove<br>
+                       can be received via SIP or a RPC command, the operation can be then triggered<br>
+                       from configuration file. This should allow counting active dialogs in a profile<br>
+                       that are managed by multiple SIP server instances.<br>
+               </para><br>
+               <para>Meaning of the parameters is as follows:</para><br>
+               <itemizedlist><br>
+               <listitem><br>
+                       <para><br>
+                               <emphasis>cmd</emphasis> - the operations to do: add - add an item in<br>
+                               profile; rm - remove an item from profile<br>
+                       </para><br>
+               </listitem><br>
+               <listitem><br>
+                       <para><br>
+                               <emphasis>profile</emphasis> - name of profile<br>
+                       </para><br>
+               </listitem><br>
+               <listitem><br>
+                       <para><br>
+                               <emphasis>value</emphasis> - value for profile (if no value is needed<br>
+                               for that profile, use an empty string.<br>
+                       </para><br>
+               </listitem><br>
+               <listitem><br>
+                       <para><br>
+                               <emphasis>expires</emphasis> - absolute time (unix timestamp) when this<br>
+                               profile item should be removed automatically (time based),<br>
+                               if still in the profile<br>
+                       </para><br>
+               </listitem><br>
+               </itemizedlist><br>
+               <para><br>
+               This function can be used from ANY_ROUTE.<br>
+               </para><br>
+               <example><br>
+               <title><function>dlg_remote_profile</function> usage</title><br>
+               <programlisting format="linespecific"><br>
+...<br>
+$var(exp) = 3600 + $Ts;<br>
+dlg_remote_profile("add", "caller", "test", "$sruid", "$var(exp)");<br>
+...<br>
+</programlisting><br>
+               </example><br>
+       </section><br>
        </section><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>
</div></div>

<br>
<font face="Helvetica, Arial, sans-serif"><font size="2"><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
            <br>
            Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
            <br>
            <font color="gray">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
                office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font>