<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"><<a href="mailto:sr-users-request@lists.sip-router.org" target="_blank">sr-users-request@lists.sip-router.org</a>></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 'help' 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 "Re: Contents of sr-users digest..."<br>
<br>
<br>
Today'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 <<a href="mailto:guandulito.com@gmail.com">guandulito.com@gmail.com</a>><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>
<CAG0Kfxv6-TV4Ghep=<a href="mailto:Wj0BNVYXH0TLR6FW281fQA9WsOKGsK1Kw@mail.gmail.com">Wj0BNVYXH0TLR6FW281fQA9WsOKGsK1Kw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<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(" anrtes de strip >> el r-uri($ru)>($ru{s.substr,0,3})\n");<br>
<br>
<br>
$var(x) = $ru; #>> set varx as an string<br>
<br>
$var(y)=$(var(x){s.substr,4,3}); #>>>>strip the first 3 digits to find my<br>
route<br>
<br>
<br>
<br>
xlog("dsroute $var(y) my test ($ru)\n"); #check for variables loaded<br>
<br>
strip(3); # strip the prefix to route to destinatio<br>
<br>
xlog("despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el code<br>
($var(y)\n"); #check for loaded variables after strip<br>
<br>
<br>
ds_select_dst("$var(y)", "4");#>>carrer dynamic don'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: <script>:<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). >>> 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: <core><br>
[sr_module.c:1726]: Could not convert PV to int *<br>
<br>
<br>
#ds_select_dst("097", "4");#statically define works<br>
<br>
xlog("print el destination y el $var(y) ($du)>>($td)>>> ($ru)\n");<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: <<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>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 9 Apr 2013 03:43:50 +0300<br>
From: ???? ????? <<a href="mailto:oren.av.jnk@gmail.com">oren.av.jnk@gmail.com</a>><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>
<<a href="mailto:CAHgMfJNw5eZb8y6%2BOxSHf1FKxhzb7ZHvhEeOL32O70cE%2BzwNxA@mail.gmail.com">CAHgMfJNw5eZb8y6+OxSHf1FKxhzb7ZHvhEeOL32O70cE+zwNxA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<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>
"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."<br>
<br>
How can i acheve this ?<br>
<br>
thanks in advance...<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<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>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 09 Apr 2013 07:27:56 +0200<br>
From: Javi Gallart <<a href="mailto:jgallart@systemonenoc.com">jgallart@systemonenoc.com</a>><br>
Subject: Re: [SR-Users] Help with dispatcher module<br>
To: "Kamailio (SER) - Users Mailing List"<br>
<<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>><br>
Message-ID: <<a href="mailto:5163A6DC.9020501@systemonenoc.com">5163A6DC.9020501@systemonenoc.com</a>><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>
> thanks for all support from the forum before hand.<br>
> i am having an issue with my setup, i am trying to make the<br>
> dispatcher dynamic by asigning a value from a variable, that variable<br>
> is define on my dispatcher.lst but i am getting an error, if anyone<br>
> 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<br>
> that 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(" anrtes de strip >> el r-uri($ru)>($ru{s.substr,0,3})\n");<br>
><br>
><br>
> $var(x) = $ru; #>> set varx as an string<br>
><br>
> $var(y)=$(var(x){s.substr,4,3}); #>>>>strip the first 3 digits to find<br>
> my route<br>
><br>
><br>
><br>
> xlog("dsroute $var(y) my test ($ru)\n"); #check for variables loaded<br>
><br>
> strip(3); # strip the prefix to route to destinatio<br>
><br>
> xlog("despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el<br>
> code ($var(y)\n"); #check for loaded variables after strip<br>
><br>
><br>
> ds_select_dst("$var(y)", "4");#>>carrer dynamic don't work variable<br>
> is 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:<br>
> <script>: despues de strip time [Mon Apr 8 17:59:32 2013] method<br>
> (ACK) r-uri (sip:54.236.192.19) 2nd via el code (54). >>> i see a the<br>
> right code in the variable*<br>
> *##Apr 8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR:<br>
> <core> [sr_module.c:1726]: Could not convert PV to int *<br>
><br>
><br>
> #ds_select_dst("097", "4");#statically define works<br>
><br>
> xlog("print el destination y el $var(y) ($du)>>($td)>>> ($ru)\n");<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> <<a href="http://1.1.1.1:5060" target="_blank">http://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> <<a href="http://2.2.2.2:5060" target="_blank">http://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> <<a href="http://1.1.1.100:5060" target="_blank">http://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> <<a href="http://1.1.1.103:5060" target="_blank">http://1.1.1.103:5060</a>> ###route 103<br>
><br>
><br>
><br>
> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) - 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>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Tue, 09 Apr 2013 11:12:39 +0200<br>
From: Andrew Pogrebennyk <<a href="mailto:apogrebennyk@sipwise.com">apogrebennyk@sipwise.com</a>><br>
Subject: Re: [SR-Users] path uri problem<br>
To: "Kamailio (SER) - Users Mailing List"<br>
<<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>><br>
Message-ID: <<a href="mailto:5163DB87.9010209@sipwise.com">5163DB87.9010209@sipwise.com</a>><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>
> i escaped them, but it didn't help. path header now looks like:<br>
><br>
> Path: <sip:192.98.102.10;transport=tcp;lr;received='sip:192.98.102.10:58156%3Btransport%3Dtcp'>.<br>
><br>
> and i still get the same error:<br>
><br>
> 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'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 = "Path" 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 ";lr" for full<br>
compliance with [1].<br>
<br>
The rules for Route element are as follows:<br>
<br>
Route = "Route" 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'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'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's which follow<br>
the above rules.<br>
- the 'sip:192.98.102.10:58156;transport=tcp' 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 = "sip:" [ userinfo ] hostport<br>
uri-parameters [ headers ]<br>
uri-parameters = *( ";" uri-parameter)<br>
uri-parameter = transport-param / user-param / method-param<br>
/ ttl-param / maddr-param / lr-param / other-param<br>
other-param = pname [ "=" pvalue ]<br>
pvalue = 1*paramchar<br>
paramchar = param-unreserved / unreserved / escaped<br>
param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$"<br>
unreserved = alphanum / mark<br>
mark = "-" / "_" / "." / "!" / "~" / "*" / "'"<br>
/ "(" / ")"<br>
alphanum = ALPHA / DIGIT<br>
escaped = "%" 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 <<a href="mailto:phillman25@gmail.com">phillman25@gmail.com</a>><br>
Subject: [SR-Users] Diversion header authentication<br>
To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -<br>
Users Mailing List" <<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAEprJzJKK9Rwsuj1kcG6ZD-H1e0kP39rfD4sHhGe%2B8YW2EOsqg@mail.gmail.com">CAEprJzJKK9Rwsuj1kcG6ZD-H1e0kP39rfD4sHhGe+8YW2EOsqg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<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("From", "1")) {<br>
sl_send_reply("403", "NOT ALLOWED");<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: <<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>><br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Tue, 9 Apr 2013 12:59:19 +0300<br>
From: Juha Heinanen <<a href="mailto:jh@tutpro.com">jh@tutpro.com</a>><br>
Subject: Re: [SR-Users] path uri problem<br>
To: "Kamailio \(SER\) - Users Mailing List"<br>
<<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>><br>
Message-ID: <<a href="mailto:20835.58999.883721.697024@siika.tutpro.com">20835.58999.883721.697024@siika.tutpro.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Andrew Pogrebennyk writes:<br>
<br>
> I don'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 = "Path" HCOLON path-value *( COMMA path-value )<br>
><br>
> 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 <>s around this path header body:<br>
<br>
Path: <sip:192.98.102.10;transport=tcp;lr;received='sip:192.98.102.10:58156%3Btransport%3Dtcp'><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>