From aftnix@gmail.com Sat May 26 16:40:03 2012 From: Aft nix To: sr-users@lists.kamailio.org Subject: [SR-Users] Creating RURI ($ru) from Contact ($ct) Date: Sat, 26 May 2012 20:39:57 +0600 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2068953960==" --===============2068953960== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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: