<div dir="ltr">thank you int transformation worked for the dispatcher module now i can define gw dynamically.<div style>much appretiate your sugestion.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 9, 2013 at 5:59 AM,  <span dir="ltr">&lt;<a href="mailto:sr-users-request@lists.sip-router.org" target="_blank">sr-users-request@lists.sip-router.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send sr-users mailing list submissions to<br>
        <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:sr-users-request@lists.sip-router.org">sr-users-request@lists.sip-router.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:sr-users-owner@lists.sip-router.org">sr-users-owner@lists.sip-router.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of sr-users digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Help with dispatcher module (julian arsanches)<br>
   2. how to configure presence module with websocket (???? ?????)<br>
   3. Re: Help with dispatcher module (Javi Gallart)<br>
   4. Re: path uri problem (Andrew Pogrebennyk)<br>
   5. Diversion header authentication (phillman25)<br>
   6. Re: path uri problem (Juha Heinanen)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 8 Apr 2013 18:17:36 -0400<br>
From: julian arsanches &lt;<a href="mailto:guandulito.com@gmail.com">guandulito.com@gmail.com</a>&gt;<br>
Subject: [SR-Users] Help with dispatcher module<br>
To: <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
Message-ID:<br>
        &lt;CAG0Kfxv6-TV4Ghep=<a href="mailto:Wj0BNVYXH0TLR6FW281fQA9WsOKGsK1Kw@mail.gmail.com">Wj0BNVYXH0TLR6FW281fQA9WsOKGsK1Kw@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
thanks for all support from the forum before hand.<br>
i am having an issue with  my setup, i am trying to make the dispatcher<br>
dynamic by asigning a value from a variable, that variable is define on my<br>
dispatcher.lst but i am getting an error, if anyone can help thanks.<br>
<br>
my config on the relay route<br>
first i strip the prefix from my dial string, and set variable y with that<br>
code, then i strip it and dial it. but it does not work.<br>
again thanks if anyone can helpme.<br>
<br>
<br>
<br>
xlog(&quot; anrtes de strip  &gt;&gt; el r-uri($ru)&gt;($ru{s.substr,0,3})\n&quot;);<br>
<br>
<br>
$var(x) = $ru;  #&gt;&gt; set varx as an string<br>
<br>
$var(y)=$(var(x){s.substr,4,3}); #&gt;&gt;&gt;&gt;strip the first 3 digits to find my<br>
route<br>
<br>
<br>
<br>
xlog(&quot;dsroute $var(y) my test ($ru)\n&quot;); #check for variables loaded<br>
<br>
strip(3); # strip the prefix to  route to destinatio<br>
<br>
xlog(&quot;despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el code<br>
($var(y)\n&quot;); #check for loaded variables after strip<br>
<br>
<br>
ds_select_dst(&quot;$var(y)&quot;, &quot;4&quot;);#&gt;&gt;carrer dynamic don&#39;t  work variable is<br>
load propperly but  i get the following error<br>
*<br>
*<br>
*##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: &lt;script&gt;:<br>
despues de strip time [Mon Apr  8 17:59:32 2013] method (ACK) r-uri<br>
(sip:54.236.192.19) 2nd via el code (54). &gt;&gt;&gt; i see a the right code in the<br>
variable*<br>
*##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: &lt;core&gt;<br>
[sr_module.c:1726]: Could not convert PV to int  *<br>
<br>
<br>
#ds_select_dst(&quot;097&quot;, &quot;4&quot;);#statically define works<br>
<br>
xlog(&quot;print el destination y el $var(y) ($du)&gt;&gt;($td)&gt;&gt;&gt; ($ru)\n&quot;);<br>
<br>
       if (!t_relay_to_udp()) {<br>
<br>
sl_reply_error();<br>
};<br>
<br>
<br>
        exit;<br>
}<br>
<br>
<br>
<br>
dispatcher.lst<br>
<br>
#lineformat<br>
#setit(integer)destination(sipuri)flags(integer,optional)<br>
<br>
<br>
#Asterisks<br>
<br>
007 sip:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a>    ##route 1<br>
024 sip:<a href="http://2.2.2.2:5060" target="_blank">2.2.2.2:5060</a>  ##route 2<br>
100 sip:<a href="http://1.1.1.100:5060" target="_blank">1.1.1.100:5060</a>  ##route 100<br>
103 sip:<a href="http://1.1.1.103:5060" target="_blank">1.1.1.103:5060</a>  ###route 103<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://lists.sip-router.org/pipermail/sr-users/attachments/20130408/10bb96a1/attachment-0001.htm" target="_blank">http://lists.sip-router.org/pipermail/sr-users/attachments/20130408/10bb96a1/attachment-0001.htm</a>&gt;<br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 9 Apr 2013 03:43:50 +0300<br>
From: ???? ????? &lt;<a href="mailto:oren.av.jnk@gmail.com">oren.av.jnk@gmail.com</a>&gt;<br>
Subject: [SR-Users] how to configure presence module with websocket<br>
To: <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
Message-ID:<br>
        &lt;<a href="mailto:CAHgMfJNw5eZb8y6%2BOxSHf1FKxhzb7ZHvhEeOL32O70cE%2BzwNxA@mail.gmail.com">CAHgMfJNw5eZb8y6+OxSHf1FKxhzb7ZHvhEeOL32O70cE+zwNxA@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
hello. I am tring to SUBSCRIBE for presence status of a user on my kamailio<br>
server using the  sipMl5 (over websockets) but kamailio failes. (more<br>
exactly the handle_subscribe failes.)<br>
 I was told previusly by peter dunkly that it is not a bug, just a<br>
configuration problem. I am quoting his answer:<br>
<br>
&quot;This is a configuration problem not a bug in the software.<br>
<br>
SUBSCRIBEs are dialog forming requests and NOTIFYs (in this scenario) are<br>
in-dialog requests.  As such you need to use force_rport(),<br>
add_contact_alias(), and handle_ruri_alias() with presence dialogs in the<br>
same way you do with media session dialogs.&quot;<br>
<br>
How can i acheve this ?<br>
<br>
thanks in advance...<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://lists.sip-router.org/pipermail/sr-users/attachments/20130409/51f952b4/attachment-0001.htm" target="_blank">http://lists.sip-router.org/pipermail/sr-users/attachments/20130409/51f952b4/attachment-0001.htm</a>&gt;<br>

<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 09 Apr 2013 07:27:56 +0200<br>
From: Javi Gallart &lt;<a href="mailto:jgallart@systemonenoc.com">jgallart@systemonenoc.com</a>&gt;<br>
Subject: Re: [SR-Users] Help with dispatcher module<br>
To: &quot;Kamailio (SER) - Users Mailing List&quot;<br>
        &lt;<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:5163A6DC.9020501@systemonenoc.com">5163A6DC.9020501@systemonenoc.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
Hello<br>
<br>
you may try to cast $var(y) to int using this transformation:<br>
<a href="http://www.kamailio.org/wiki/cookbooks/4.0.x/transformations#sint" target="_blank">http://www.kamailio.org/wiki/cookbooks/4.0.x/transformations#sint</a><br>
<br>
Regards<br>
<br>
Javi<br>
On 04/09/2013 12:17 AM, julian arsanches wrote:<br>
&gt; thanks for all support from the forum before hand.<br>
&gt; i am having an issue with  my setup, i am trying to make the<br>
&gt; dispatcher dynamic by asigning a value from a variable, that variable<br>
&gt; is define on my dispatcher.lst but i am getting an error, if anyone<br>
&gt; can help thanks.<br>
&gt;<br>
&gt; my config on the relay route<br>
&gt; first i strip the prefix from my dial string, and set variable y with<br>
&gt; that code, then i strip it and dial it. but it does not work.<br>
&gt; again thanks if anyone can helpme.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; xlog(&quot; anrtes de strip  &gt;&gt; el r-uri($ru)&gt;($ru{s.substr,0,3})\n&quot;);<br>
&gt;<br>
&gt;<br>
&gt; $var(x) = $ru;  #&gt;&gt; set varx as an string<br>
&gt;<br>
&gt; $var(y)=$(var(x){s.substr,4,3}); #&gt;&gt;&gt;&gt;strip the first 3 digits to find<br>
&gt; my route<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; xlog(&quot;dsroute $var(y) my test ($ru)\n&quot;); #check for variables loaded<br>
&gt;<br>
&gt; strip(3); # strip the prefix to  route to destinatio<br>
&gt;<br>
&gt; xlog(&quot;despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el<br>
&gt; code ($var(y)\n&quot;); #check for loaded variables after strip<br>
&gt;<br>
&gt;<br>
&gt; ds_select_dst(&quot;$var(y)&quot;, &quot;4&quot;);#&gt;&gt;carrer dynamic don&#39;t  work variable<br>
&gt; is load propperly but  i get the following error<br>
&gt; *<br>
&gt; *<br>
&gt; *##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR:<br>
&gt; &lt;script&gt;: despues de strip time [Mon Apr  8 17:59:32 2013] method<br>
&gt; (ACK) r-uri (sip:54.236.192.19) 2nd via el code (54). &gt;&gt;&gt; i see a the<br>
&gt; right code in the variable*<br>
&gt; *##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR:<br>
&gt; &lt;core&gt; [sr_module.c:1726]: Could not convert PV to int *<br>
&gt;<br>
&gt;<br>
&gt; #ds_select_dst(&quot;097&quot;, &quot;4&quot;);#statically define works<br>
&gt;<br>
&gt; xlog(&quot;print el destination y el $var(y) ($du)&gt;&gt;($td)&gt;&gt;&gt; ($ru)\n&quot;);<br>
&gt;<br>
&gt;        if (!t_relay_to_udp()) {<br>
&gt;<br>
&gt; sl_reply_error();<br>
&gt; };<br>
&gt;<br>
&gt;<br>
&gt;         exit;<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; dispatcher.lst<br>
&gt;<br>
&gt; #lineformat<br>
&gt; #setit(integer)destination(sipuri)flags(integer,optional)<br>
&gt;<br>
&gt;<br>
&gt; #Asterisks<br>
&gt;<br>
&gt; 007 sip:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a> &lt;<a href="http://1.1.1.1:5060" target="_blank">http://1.1.1.1:5060</a>&gt;    ##route 1<br>
&gt; 024 sip:<a href="http://2.2.2.2:5060" target="_blank">2.2.2.2:5060</a> &lt;<a href="http://2.2.2.2:5060" target="_blank">http://2.2.2.2:5060</a>&gt;  ##route 2<br>
&gt; 100 sip:<a href="http://1.1.1.100:5060" target="_blank">1.1.1.100:5060</a> &lt;<a href="http://1.1.1.100:5060" target="_blank">http://1.1.1.100:5060</a>&gt;  ##route 100<br>
&gt; 103 sip:<a href="http://1.1.1.103:5060" target="_blank">1.1.1.103:5060</a> &lt;<a href="http://1.1.1.103:5060" target="_blank">http://1.1.1.103:5060</a>&gt;  ###route 103<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Tue, 09 Apr 2013 11:12:39 +0200<br>
From: Andrew Pogrebennyk &lt;<a href="mailto:apogrebennyk@sipwise.com">apogrebennyk@sipwise.com</a>&gt;<br>
Subject: Re: [SR-Users] path uri problem<br>
To: &quot;Kamailio (SER) - Users Mailing List&quot;<br>
        &lt;<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:5163DB87.9010209@sipwise.com">5163DB87.9010209@sipwise.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Hi Juha,<br>
<br>
On 04/07/2013 01:51 PM, Juha Heinanen wrote:<br>
&gt; i escaped them, but it didn&#39;t help.  path header now looks like:<br>
&gt;<br>
&gt; Path: &lt;sip:192.98.102.10;transport=tcp;lr;received=&#39;sip:192.98.102.10:58156%3Btransport%3Dtcp&#39;&gt;.<br>
&gt;<br>
&gt; and i still get the same error:<br>
&gt;<br>
&gt; Apr  7 14:49:47 wheezy1 /usr/sbin/sip-proxy[8709]: ERROR: registrar [save.c:887]: Failed to parse Path: URI<br>
<br>
I don&#39;t see why you think that ; and = should be escaped.<br>
<br>
rfc3327 chapter 4 says:<br>
<br>
   The syntax for Path is defined as follows:<br>
<br>
   Path = &quot;Path&quot; HCOLON path-value *( COMMA path-value )<br>
<br>
   path-value = name-addr *( SEMI rr-param )<br>
<br>
   Note that the Path header field values conform to the syntax of a<br>
   Route element as defined in [1].  As suggested therein, such values<br>
   MUST include the loose-routing indicator parameter &quot;;lr&quot; for full<br>
   compliance with [1].<br>
<br>
The rules for Route element are as follows:<br>
<br>
Route        =  &quot;Route&quot; HCOLON route-param *(COMMA route-param)<br>
route-param  =  name-addr *( SEMI rr-param )<br>
name-addr      =  [ display-name ] LAQUOT addr-spec RAQUOT<br>
addr-spec      =  SIP-URI / SIPS-URI / absoluteURI<br>
<br>
rr-param      =  generic-param<br>
generic-param  =  token [ EQUAL gen-value ]<br>
gen-value      =  token / host / quoted-string<br>
<br>
Why would someone want to escape semicolor (SEMI) which separated either<br>
Route or URI parameters?<br>
<br>
Also EQUAL used in pname=pvalue does not need escaping.<br>
<br>
We&#39;ve already had a closer look at add_path_received() here at sipwise<br>
when we found double quotes in Route param value to be invalid and<br>
changed them to single ones. We have not observed the error in save()<br>
you have posted in kamailio 3.3.. Moreover, the ibc&#39;s Ragel-SIP-Parser<br>
suggests that the Path header above is correct :)<br>
<br>
So, from my PoV:<br>
- the ;transport=tcp;lr;received=... part are route-param&#39;s which follow<br>
the above rules.<br>
- the &#39;sip:192.98.102.10:58156;transport=tcp&#39; part contains URI<br>
parameters. It is still fine according to definition of Path/Route<br>
element above - and agrees with the definition of other-param too:<br>
<br>
SIP-URI = &quot;sip:&quot; [ userinfo ] hostport<br>
 uri-parameters [ headers ]<br>
uri-parameters = *( &quot;;&quot; uri-parameter)<br>
uri-parameter = transport-param / user-param / method-param<br>
 / ttl-param / maddr-param / lr-param / other-param<br>
other-param = pname [ &quot;=&quot; pvalue ]<br>
pvalue = 1*paramchar<br>
paramchar = param-unreserved / unreserved / escaped<br>
param-unreserved = &quot;[&quot; / &quot;]&quot; / &quot;/&quot; / &quot;:&quot; / &quot;&amp;&quot; / &quot;+&quot; / &quot;$&quot;<br>
unreserved = alphanum / mark<br>
mark = &quot;-&quot; / &quot;_&quot; / &quot;.&quot; / &quot;!&quot; / &quot;~&quot; / &quot;*&quot; / &quot;&#39;&quot;<br>
 / &quot;(&quot; / &quot;)&quot;<br>
alphanum = ALPHA / DIGIT<br>
escaped = &quot;%&quot; HEXDIG HEXDIG<br>
<br>
Do you also have the save() problem in 3.3?<br>
<br>
Andrew<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Tue, 9 Apr 2013 12:12:49 +0300<br>
From: phillman25 &lt;<a href="mailto:phillman25@gmail.com">phillman25@gmail.com</a>&gt;<br>
Subject: [SR-Users] Diversion header authentication<br>
To: &quot;SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -<br>
        Users   Mailing List&quot; &lt;<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:CAEprJzJKK9Rwsuj1kcG6ZD-H1e0kP39rfD4sHhGe%2B8YW2EOsqg@mail.gmail.com">CAEprJzJKK9Rwsuj1kcG6ZD-H1e0kP39rfD4sHhGe+8YW2EOsqg@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Dear List<br>
<br>
I am currently using the group module to authenticate inbound calls using<br>
the From header using the below code:<br>
<br>
         if (!is_user_in(&quot;From&quot;, &quot;1&quot;)) {<br>
         sl_send_reply(&quot;403&quot;, &quot;NOT ALLOWED&quot;);<br>
         exit;<br>
         };<br>
         };<br>
<br>
I want to now authenticate the Diversion header, when the call is diverted,<br>
the same way as above using the group module how could i proceed with this?<br>
<br>
thanking you in advance<br>
Phillip<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://lists.sip-router.org/pipermail/sr-users/attachments/20130409/eff09fc9/attachment-0001.htm" target="_blank">http://lists.sip-router.org/pipermail/sr-users/attachments/20130409/eff09fc9/attachment-0001.htm</a>&gt;<br>

<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Tue, 9 Apr 2013 12:59:19 +0300<br>
From: Juha Heinanen &lt;<a href="mailto:jh@tutpro.com">jh@tutpro.com</a>&gt;<br>
Subject: Re: [SR-Users] path uri problem<br>
To: &quot;Kamailio \(SER\) - Users Mailing List&quot;<br>
        &lt;<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:20835.58999.883721.697024@siika.tutpro.com">20835.58999.883721.697024@siika.tutpro.com</a>&gt;<br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Andrew Pogrebennyk writes:<br>
<br>
&gt; I don&#39;t see why you think that ; and = should be escaped.<br>
&gt;<br>
&gt; rfc3327 chapter 4 says:<br>
&gt;<br>
&gt;    The syntax for Path is defined as follows:<br>
&gt;<br>
&gt;    Path = &quot;Path&quot; HCOLON path-value *( COMMA path-value )<br>
&gt;<br>
&gt;    path-value = name-addr *( SEMI rr-param )<br>
<br>
because path-value starts with name-addr and my interpretation is that<br>
since there are &lt;&gt;s around this path header body:<br>
<br>
Path: &lt;sip:192.98.102.10;transport=tcp;lr;received=&#39;sip:192.98.102.10:58156%3Btransport%3Dtcp&#39;&gt;<br>
<br>
solely consists of name-addr and does not include any rr-params.  sip<br>
uri included in name-addr in turn cannot have ; and = in its param<br>
values.<br>
<br>
it turned out that save error had nothing to do with syntax of path<br>
header, but was due to a bug that i fixed.<br>
<br>
-- juha<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
End of sr-users Digest, Vol 95, Issue 33<br>
****************************************<br>
</blockquote></div><br></div>