<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Philippe,<br>
    <br>
    do you have #!SER as first line? This part should be the same ... if
    pv not found, then it should be considered avp. I will try to see
    what is the issue.<br>
    <br>
    Anyhow, for the moment, if not working, load pv and then try:<br>
    - $fd and $td must stay as parameters for lookup_domain()<br>
    - for strempty() try to use $avp(fd.did) and $avp(td.did)<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 1/23/13 5:01 PM, Philippe Sultan
      wrote:<br>
    </div>
    <blockquote
cite="mid:CACtw84F2YA4pY3Xz02qLQe4qy_6qkqwXph=MEhe1COyM9fFDFw@mail.gmail.com"
      type="cite">Hi,<br>
      <br>
      According to docs of "uid_domain.so", $fd and $td are attribute
      groups which are set when calling the lookup_domain function, to
      retrieve domain attributes stored in an DB ($fd.did or $td.did) :<br>
      lookup_domain("$fd", "@from.uri.host");<br>
      lookup_domain("$td", "@ruri.host");<br>
      <br>
      if (strempty($fd.did) &amp;&amp; strempty($td.did)) { <br>
      &nbsp; # Neither the calling nor the called domain is local<br>
      &nbsp; # This is a relaying attempt which should be forbidden<br>
      &nbsp; sl_reply("403", "Relaying Forbidden"); drop;<br>
      }<br>
      <br>
      But then, starting Kamailio fails with a configuration file error
      :<br>
      &nbsp;0(2098) ERROR: &lt;core&gt; [pvapi.c:761]: error searching pvar
      "fd"<br>
      &nbsp;0(2098) ERROR: &lt;core&gt; [pvapi.c:965]: wrong char [d/100] in
      [$fd] at [2 (0)]<br>
      &nbsp;0(2098) : &lt;core&gt; [cfg.y:3567]: parse error in config file
      /usr/local/etc/kamailio/kamailio.cfg, line 332, column 15-17:
      unknown script pseudo variable $fd<br>
      ERROR: bad config file (1 errors)<br>
      <br>
      Line 332 is :<br>
      if (strempty($fd.did) &amp;&amp; strempty($td.did)) {<br>
      <br>
      I thought I could start Kamailio without "pv.so" (and use selects
      instead), but the error still shows up, as it is reported by the
      core pvapi.c file.<br>
      <br>
      So I'm kind of stuck, and asking help from the community to fix
      this problem :D<br>
      <br>
      Philippe<br>
      <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>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<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>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
  </body>
</html>