From jgallart@systemonenoc.com Tue Aug 28 07:25:55 2012 From: Javi Gallart To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] DROUTING nub question Date: Tue, 28 Aug 2012 07:25:49 +0200 Message-ID: <503C565D.2000206@systemonenoc.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0545185160==" --===============0545185160== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi maybe this would work. You have a mask like "111111111111" (you choose=20 the max length and the content). From the mask you extract as many=20 digits as the length of your number with {s.substr,offset,length}, being=20 length $(rU{s.len}}. Then you prepend the result to you $rU. Hope it helps Javi On 08/28/2012 02:34 AM, Luis Fernando Urrea wrote: > I see there is a transformation to return the string value of an=20 > integer but I can't seem to find the opposite one. > > {s.int } > Return integer value of a string-represented number > > On Mon, Aug 27, 2012 at 6:22 PM, Luis Fernando Urrea=20 > > wrote: > > Thanks Daniel, > > That got me started, however, it seems that the return value > from $(rU{s.len}) is actually an integer and therefore could not > be concatenated to $rU string ? > > 4(18194) ERROR: pv [pv_core.c:1798]: str value required to set > R-URI user > 14(18194) ERROR: [lvalue.c:354]: setting pvar failed > 14(18194) ERROR: [lvalue.c:407]: assignment failed at pos: > (906,8-906,25) > 14(18194) ERROR: *** cfgtrace: > c=3D[/usr/local/etc/kamailio/kamailio.cfg] l=3D907 a=3D26 n=3Dxlog > 14(18194) ERROR: