<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/12/14 17:27, Marc Soda wrote:<br>
</div>
<blockquote
cite="mid:CAFBTUUZ0GRC2H4WfWNvvCVPhVev9zCOfmEC_2qyXQmpSPrJYRQ@mail.gmail.com"
type="cite">
<div dir="ltr">Finally! This seems to have done it:
<div><br>
xlog("L_NOTICE", "$sel(contact.uri.user)");<br>
</div>
</div>
</blockquote>
<br>
This is probably one of the best options, for the records, the
alternative can be {tobody.user} transformation:<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.kamailio.org/wiki/cookbooks/4.2.x/transformations#tobodyuser">http://www.kamailio.org/wiki/cookbooks/4.2.x/transformations#tobodyuser</a><br>
<br>
Contact header format is more than an URI, this uri transformation
fails.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:CAFBTUUZ0GRC2H4WfWNvvCVPhVev9zCOfmEC_2qyXQmpSPrJYRQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Sorry for the noob question.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Dec 8, 2014 at 11:14 AM, Marc
Soda <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:msoda@coredial.com" target="_blank">msoda@coredial.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>Can someone recommend a way to extract the user
part of a Contact header URI?<br>
</div>
<div><br>
</div>
<div>Right now I'm just trying to pass it to xlog(). I
have tried:</div>
<div><br>
</div>
<div>- <span>xlog(</span><span>"L_NOTICE"</span><span>,
</span><span>"$(ct{uri.user})"</span><span>);</span></div>
<div><span>This gives me an empty string.</span></div>
<div><span><br>
</span></div>
<div><span>- </span><span>xlog(</span><span>"L_NOTICE"</span><span>,
@contact.uri.user);</span></div>
<div><span>This gives me an error starting Kamailio: "</span>function
xlog: parameter 2 is not constant". Note, I can't
seem to get any select working, for example, @ruri
gives me the same error.</div>
<div><br>
</div>
<div>Any suggestions?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Marc</div>
<div><br>
</div>
</div>
</blockquote>
</div>
<br>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>