<div dir="ltr">Hi Daniel,<div>             I inspect the value of $hu .When I logging 
into kamailio server from SIPML client (SIP over WebSocket) it prints 
only"/" . Now  if I write the following inside event_route[xttp:request]
 as follows it gives parsing error.</div>
<div> <span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">  if($hu=~"/</span><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">") {</span></div><div style="font-size:13px;color:rgb(80,0,80);font-family:arial,sans-serif">

<br>        # handle webrtc</div><div style="font-size:13px;color:rgb(80,0,80);font-family:arial,sans-serif"><br></div><div style="font-size:13px;color:rgb(80,0,80);font-family:arial,sans-serif">    }</div><div style="font-size:13px;color:rgb(80,0,80);font-family:arial,sans-serif">

<br></div><div style="font-size:13px;color:rgb(80,0,80);font-family:arial,sans-serif"><span style="color:rgb(34,34,34)">    if(!($hu=~"^/</span><span style="color:rgb(34,34,34)">xcap</span><span style="color:rgb(34,34,34)">-root")) {</span><div style="color:rgb(34,34,34)">

<br>        # handle presence<br>    }</div><div>Please help</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 20, 2013 at 1:39 PM, Rupayan Dutta <span dir="ltr"><<a href="mailto:direct2rupayan@gmail.com" target="_blank">direct2rupayan@gmail.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">Dear Sir,<div>           In case of presence the condition which you mentioned works  (i.e <span style="font-size:13px;font-family:arial,sans-serif"> if($hu=~"^/</span><span style="font-size:13px;font-family:arial,sans-serif">xcap</span><span style="font-size:13px;font-family:arial,sans-serif">-root")  { }) but when i want to capture the authentication request from sipml5 client(SIP over websocket), the conditions does't match(e.g </span><span style="font-family:arial,sans-serif;font-size:13px">if($hu=~"^/webrtc") or </span><span style="font-family:arial,sans-serif;font-size:13px">if($hu=~"^/sip:" etc). When i tried described as follows  within XTTP request block  kamailio.cfg gives parsing error</span></div>
<div class="im">
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">  </span><span style="font-size:13px;font-family:arial,sans-serif">    if($hu=~"^/</span><span style="font-size:13px;font-family:arial,sans-serif">xcap</span><span style="font-size:13px;font-family:arial,sans-serif">-root") {</span></div>

<div style="font-family:arial,sans-serif;font-size:13px"><br>        # handle <span>xcap</span><br>    }</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">

<span style="color:rgb(34,34,34)">    if(!($hu=~"^/</span><span>xcap</span><span style="color:rgb(34,34,34)">-root")) {</span><div><br>        # handle <span>another</span><br>    }</div>
<div><br></div><div>where is the problem I can't solve. Pls give some ideas.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Rupayan dutta</div></font></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>

</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 1, 2013 at 2:25 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    the conditions in the example of previous email were negated, so
    they should be:<br>
    <br>
        if($hu=~"^/webrtc") {<br>
            # handle webrtc<br>
        }<br>
    <br>
        if($hu=~"^/xcap-root") {<div><br>
            # handle xcap<br>
        }<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    </div><div><div><div>On 8/1/13 10:54 AM, Daniel-Constantin
      Mierla wrote:<br>
    </div>
    <blockquote type="cite">
      
      Hello,<br>
      <br>
      one way is to use different base uri for each service and decide
      based on it, for example:<br>
      <br>
          if(! ($hu=~"^/webrtc")) {<br>
              # handle webrtc<br>
          }<br>
      <br>
          if(! ($hu=~"^/xcap-root")) {<br>
              # handle xcap<br>
          }<br>
      <br>
      Cheers,<br>
      Daniel<br>
      <br>
      <div>On 8/1/13 9:46 AM, Rupayan Dutta
        wrote:<br>
      </div>
      <blockquote type="cite">
        <div dir="ltr">Dear Sir,
          <div>          <span style="font-family:arial,sans-serif;font-size:13px">I have
              kamailio 4.0.2 installed with the websockets module and it
              is working fine.Now I want to enable presence with
              XCAP.How can I do that.I have gone through the steps
              defined in </span><a href="http://kb.asipto.com/kamailio:presence:k31-made-simple" target="_blank">http://kb.asipto.com/kamailio:presence:k31-made-simple</a>.
            But I am little bit confused because both websocket and XCAP
            route configuration is using <span>event_route</span><span>[</span><span>xhttp</span><span>:</span><span>request</span><span>].</span></div>
          <div><span><br>
            </span></div>
          <div><span>Pls

              help to modify kamailio.cfg file</span></div>
        </div>
        <br>
        <fieldset></fieldset>
        <br>
        <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
      </blockquote>
      <br>
      <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
</pre>
    </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
</pre>
  </div></div></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>