From aftnix@gmail.com Sun May 27 00:46:57 2012 From: Aft nix To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Creating RURI ($ru) from Contact ($ct) Date: Sun, 27 May 2012 04:46:51 +0600 Message-ID: In-Reply-To: <4FC151DB.8090005@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1420581853==" --===============1420581853== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Sun, May 27, 2012 at 3:57 AM, Vitaliy Aleksandrov wrote: > On 05/26/2012 05:39 PM, Aft nix wrote: > > Hi, > > I'm trying to create a ruri from contact header like following : > > In request route I've saved contact header in a hashtable using htable > module. > request_route{ > > --------------------- > --------------------- > #!ifdef WITH_HASH > if (is_method("INVITE") && !has_totag()){ > xdbg ("Contact [$ct] with Callid [$ci]"); > $sht(a=>$ci) = $ct; > } > #!endif > > ---------------- > } > > And in route[WITHINDLG] > > route[WITHINDLG] { > > --------------------------- > --------------------------- > #!ifdef WITH_HASH > xdbg ("ruri [$ru]"); > if ($sht(a=>$ci) != $ru){ > $ru = ($sht(a=>$ci)); > xdbg ("rewriting ruri to [$ru]"); > } > #!endif > > But it log shows that its unable to parse the uri : > > [4039]: DEBUG: [parser/parse_uri.c:1277]: parse_uri: bad uri, > state 0 parsed: < (4) / <> (29) > : DEBUG: [parser/parse_uri.c:1327]: ERROR: parse_sip_msg_uri: > bad uri <> > [4039]: ERROR: pv [pv_core.c:232]: failed to parse the R-URI > [4039]: DEBUG: