[SR-Users] sr-users Digest, Vol 95, Issue 33

julian arsanches guandulito.com at gmail.com
Tue Apr 9 15:57:17 CEST 2013


thank you int transformation worked for the dispatcher module now i can
define gw dynamically.
much appretiate your sugestion.


On Tue, Apr 9, 2013 at 5:59 AM, <sr-users-request at lists.sip-router.org>wrote:

> Send sr-users mailing list submissions to
>         sr-users at lists.sip-router.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> or, via email, send a message with subject or body 'help' to
>         sr-users-request at lists.sip-router.org
>
> You can reach the person managing the list at
>         sr-users-owner at lists.sip-router.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sr-users digest..."
>
>
> Today's Topics:
>
>    1. Help with dispatcher module (julian arsanches)
>    2. how to configure presence module with websocket (???? ?????)
>    3. Re: Help with dispatcher module (Javi Gallart)
>    4. Re: path uri problem (Andrew Pogrebennyk)
>    5. Diversion header authentication (phillman25)
>    6. Re: path uri problem (Juha Heinanen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 8 Apr 2013 18:17:36 -0400
> From: julian arsanches <guandulito.com at gmail.com>
> Subject: [SR-Users] Help with dispatcher module
> To: sr-users at lists.sip-router.org
> Message-ID:
>         <CAG0Kfxv6-TV4Ghep=
> Wj0BNVYXH0TLR6FW281fQA9WsOKGsK1Kw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> thanks for all support from the forum before hand.
> i am having an issue with  my setup, i am trying to make the dispatcher
> dynamic by asigning a value from a variable, that variable is define on my
> dispatcher.lst but i am getting an error, if anyone can help thanks.
>
> my config on the relay route
> first i strip the prefix from my dial string, and set variable y with that
> code, then i strip it and dial it. but it does not work.
> again thanks if anyone can helpme.
>
>
>
> xlog(" anrtes de strip  >> el r-uri($ru)>($ru{s.substr,0,3})\n");
>
>
> $var(x) = $ru;  #>> set varx as an string
>
> $var(y)=$(var(x){s.substr,4,3}); #>>>>strip the first 3 digits to find my
> route
>
>
>
> xlog("dsroute $var(y) my test ($ru)\n"); #check for variables loaded
>
> strip(3); # strip the prefix to  route to destinatio
>
> xlog("despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el code
> ($var(y)\n"); #check for loaded variables after strip
>
>
> ds_select_dst("$var(y)", "4");#>>carrer dynamic don't  work variable is
> load propperly but  i get the following error
> *
> *
> *##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: <script>:
> despues de strip time [Mon Apr  8 17:59:32 2013] method (ACK) r-uri
> (sip:54.236.192.19) 2nd via el code (54). >>> i see a the right code in the
> variable*
> *##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: <core>
> [sr_module.c:1726]: Could not convert PV to int  *
>
>
> #ds_select_dst("097", "4");#statically define works
>
> xlog("print el destination y el $var(y) ($du)>>($td)>>> ($ru)\n");
>
>        if (!t_relay_to_udp()) {
>
> sl_reply_error();
> };
>
>
>         exit;
> }
>
>
>
> dispatcher.lst
>
> #lineformat
> #setit(integer)destination(sipuri)flags(integer,optional)
>
>
> #Asterisks
>
> 007 sip:1.1.1.1:5060    ##route 1
> 024 sip:2.2.2.2:5060  ##route 2
> 100 sip:1.1.1.100:5060  ##route 100
> 103 sip:1.1.1.103:5060  ###route 103
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.sip-router.org/pipermail/sr-users/attachments/20130408/10bb96a1/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 9 Apr 2013 03:43:50 +0300
> From: ???? ????? <oren.av.jnk at gmail.com>
> Subject: [SR-Users] how to configure presence module with websocket
> To: sr-users at lists.sip-router.org
> Message-ID:
>         <
> CAHgMfJNw5eZb8y6+OxSHf1FKxhzb7ZHvhEeOL32O70cE+zwNxA at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> hello. I am tring to SUBSCRIBE for presence status of a user on my kamailio
> server using the  sipMl5 (over websockets) but kamailio failes. (more
> exactly the handle_subscribe failes.)
>  I was told previusly by peter dunkly that it is not a bug, just a
> configuration problem. I am quoting his answer:
>
> "This is a configuration problem not a bug in the software.
>
> SUBSCRIBEs are dialog forming requests and NOTIFYs (in this scenario) are
> in-dialog requests.  As such you need to use force_rport(),
> add_contact_alias(), and handle_ruri_alias() with presence dialogs in the
> same way you do with media session dialogs."
>
> How can i acheve this ?
>
> thanks in advance...
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.sip-router.org/pipermail/sr-users/attachments/20130409/51f952b4/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 09 Apr 2013 07:27:56 +0200
> From: Javi Gallart <jgallart at systemonenoc.com>
> Subject: Re: [SR-Users] Help with dispatcher module
> To: "Kamailio (SER) - Users Mailing List"
>         <sr-users at lists.sip-router.org>
> Message-ID: <5163A6DC.9020501 at systemonenoc.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello
>
> you may try to cast $var(y) to int using this transformation:
> http://www.kamailio.org/wiki/cookbooks/4.0.x/transformations#sint
>
> Regards
>
> Javi
> On 04/09/2013 12:17 AM, julian arsanches wrote:
> > thanks for all support from the forum before hand.
> > i am having an issue with  my setup, i am trying to make the
> > dispatcher dynamic by asigning a value from a variable, that variable
> > is define on my dispatcher.lst but i am getting an error, if anyone
> > can help thanks.
> >
> > my config on the relay route
> > first i strip the prefix from my dial string, and set variable y with
> > that code, then i strip it and dial it. but it does not work.
> > again thanks if anyone can helpme.
> >
> >
> >
> > xlog(" anrtes de strip  >> el r-uri($ru)>($ru{s.substr,0,3})\n");
> >
> >
> > $var(x) = $ru;  #>> set varx as an string
> >
> > $var(y)=$(var(x){s.substr,4,3}); #>>>>strip the first 3 digits to find
> > my route
> >
> >
> >
> > xlog("dsroute $var(y) my test ($ru)\n"); #check for variables loaded
> >
> > strip(3); # strip the prefix to  route to destinatio
> >
> > xlog("despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el
> > code ($var(y)\n"); #check for loaded variables after strip
> >
> >
> > ds_select_dst("$var(y)", "4");#>>carrer dynamic don't  work variable
> > is load propperly but  i get the following error
> > *
> > *
> > *##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR:
> > <script>: despues de strip time [Mon Apr  8 17:59:32 2013] method
> > (ACK) r-uri (sip:54.236.192.19) 2nd via el code (54). >>> i see a the
> > right code in the variable*
> > *##Apr  8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR:
> > <core> [sr_module.c:1726]: Could not convert PV to int *
> >
> >
> > #ds_select_dst("097", "4");#statically define works
> >
> > xlog("print el destination y el $var(y) ($du)>>($td)>>> ($ru)\n");
> >
> >        if (!t_relay_to_udp()) {
> >
> > sl_reply_error();
> > };
> >
> >
> >         exit;
> > }
> >
> >
> >
> > dispatcher.lst
> >
> > #lineformat
> > #setit(integer)destination(sipuri)flags(integer,optional)
> >
> >
> > #Asterisks
> >
> > 007 sip:1.1.1.1:5060 <http://1.1.1.1:5060>    ##route 1
> > 024 sip:2.2.2.2:5060 <http://2.2.2.2:5060>  ##route 2
> > 100 sip:1.1.1.100:5060 <http://1.1.1.100:5060>  ##route 100
> > 103 sip:1.1.1.103:5060 <http://1.1.1.103:5060>  ###route 103
> >
> >
> >
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users at lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 09 Apr 2013 11:12:39 +0200
> From: Andrew Pogrebennyk <apogrebennyk at sipwise.com>
> Subject: Re: [SR-Users] path uri problem
> To: "Kamailio (SER) - Users Mailing List"
>         <sr-users at lists.sip-router.org>
> Message-ID: <5163DB87.9010209 at sipwise.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Juha,
>
> On 04/07/2013 01:51 PM, Juha Heinanen wrote:
> > i escaped them, but it didn't help.  path header now looks like:
> >
> > Path:
> <sip:192.98.102.10;transport=tcp;lr;received='sip:192.98.102.10:58156
> %3Btransport%3Dtcp'>.
> >
> > and i still get the same error:
> >
> > Apr  7 14:49:47 wheezy1 /usr/sbin/sip-proxy[8709]: ERROR: registrar
> [save.c:887]: Failed to parse Path: URI
>
> I don't see why you think that ; and = should be escaped.
>
> rfc3327 chapter 4 says:
>
>    The syntax for Path is defined as follows:
>
>    Path = "Path" HCOLON path-value *( COMMA path-value )
>
>    path-value = name-addr *( SEMI rr-param )
>
>    Note that the Path header field values conform to the syntax of a
>    Route element as defined in [1].  As suggested therein, such values
>    MUST include the loose-routing indicator parameter ";lr" for full
>    compliance with [1].
>
> The rules for Route element are as follows:
>
> Route        =  "Route" HCOLON route-param *(COMMA route-param)
> route-param  =  name-addr *( SEMI rr-param )
> name-addr      =  [ display-name ] LAQUOT addr-spec RAQUOT
> addr-spec      =  SIP-URI / SIPS-URI / absoluteURI
>
> rr-param      =  generic-param
> generic-param  =  token [ EQUAL gen-value ]
> gen-value      =  token / host / quoted-string
>
> Why would someone want to escape semicolor (SEMI) which separated either
> Route or URI parameters?
>
> Also EQUAL used in pname=pvalue does not need escaping.
>
> We've already had a closer look at add_path_received() here at sipwise
> when we found double quotes in Route param value to be invalid and
> changed them to single ones. We have not observed the error in save()
> you have posted in kamailio 3.3.. Moreover, the ibc's Ragel-SIP-Parser
> suggests that the Path header above is correct :)
>
> So, from my PoV:
> - the ;transport=tcp;lr;received=... part are route-param's which follow
> the above rules.
> - the 'sip:192.98.102.10:58156;transport=tcp' part contains URI
> parameters. It is still fine according to definition of Path/Route
> element above - and agrees with the definition of other-param too:
>
> SIP-URI = "sip:" [ userinfo ] hostport
>  uri-parameters [ headers ]
> uri-parameters = *( ";" uri-parameter)
> uri-parameter = transport-param / user-param / method-param
>  / ttl-param / maddr-param / lr-param / other-param
> other-param = pname [ "=" pvalue ]
> pvalue = 1*paramchar
> paramchar = param-unreserved / unreserved / escaped
> param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$"
> unreserved = alphanum / mark
> mark = "-" / "_" / "." / "!" / "~" / "*" / "'"
>  / "(" / ")"
> alphanum = ALPHA / DIGIT
> escaped = "%" HEXDIG HEXDIG
>
> Do you also have the save() problem in 3.3?
>
> Andrew
>
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 9 Apr 2013 12:12:49 +0300
> From: phillman25 <phillman25 at gmail.com>
> Subject: [SR-Users] Diversion header authentication
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
>         Users   Mailing List" <sr-users at lists.sip-router.org>
> Message-ID:
>         <
> CAEprJzJKK9Rwsuj1kcG6ZD-H1e0kP39rfD4sHhGe+8YW2EOsqg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear List
>
> I am currently using the group module to authenticate inbound calls using
> the From header using the below code:
>
>          if (!is_user_in("From", "1")) {
>          sl_send_reply("403", "NOT ALLOWED");
>          exit;
>          };
>          };
>
> I want to now authenticate the Diversion header, when the call is diverted,
> the same way as above using the group module how could i proceed with this?
>
> thanking you in advance
> Phillip
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.sip-router.org/pipermail/sr-users/attachments/20130409/eff09fc9/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 6
> Date: Tue, 9 Apr 2013 12:59:19 +0300
> From: Juha Heinanen <jh at tutpro.com>
> Subject: Re: [SR-Users] path uri problem
> To: "Kamailio \(SER\) - Users Mailing List"
>         <sr-users at lists.sip-router.org>
> Message-ID: <20835.58999.883721.697024 at siika.tutpro.com>
> Content-Type: text/plain; charset=us-ascii
>
> Andrew Pogrebennyk writes:
>
> > I don't see why you think that ; and = should be escaped.
> >
> > rfc3327 chapter 4 says:
> >
> >    The syntax for Path is defined as follows:
> >
> >    Path = "Path" HCOLON path-value *( COMMA path-value )
> >
> >    path-value = name-addr *( SEMI rr-param )
>
> because path-value starts with name-addr and my interpretation is that
> since there are <>s around this path header body:
>
> Path: <sip:192.98.102.10;transport=tcp;lr;received='sip:192.98.102.10:58156
> %3Btransport%3Dtcp'>
>
> solely consists of name-addr and does not include any rr-params.  sip
> uri included in name-addr in turn cannot have ; and = in its param
> values.
>
> it turned out that save error had nothing to do with syntax of path
> header, but was due to a bug that i fixed.
>
> -- juha
>
>
>
> ------------------------------
>
> _______________________________________________
> sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> End of sr-users Digest, Vol 95, Issue 33
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130409/f0394b77/attachment-0001.htm>


More information about the sr-users mailing list