<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
The sript compatibility was set to kamailio strict mode, throwing
error if $xy was not a pv. You can fetch latest master and should
work like if no pv found as $xy, then is set as avp.<br>
<br>
Even if with your version, adding #!SER as first line should make it
work with $fd.did...<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 1/24/13 10:58 AM, Daniel-Constantin
Mierla wrote:<br>
</div>
<blockquote cite="mid:510105D1.2090008@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Philippe,<br>
<br>
<div class="moz-cite-prefix">On 1/23/13 11:54 PM, Philippe Sultan
wrote:<br>
</div>
<blockquote
cite="mid:CACtw84ELOJSjxuG2Ytm_60bsopdwGaZnpAGObuxXbm-v+rUSWQ@mail.gmail.com"
type="cite">Hey Daniel,<br>
<br>
Thanks a lot for your help.<br>
<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> 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>
</div>
</blockquote>
<div><br>
I don't have #!SER<br>
</div>
</div>
</blockquote>
<br>
it should not be needed for this case, if $xyz is not found as pv,
it is considered avp.<br>
<br>
<blockquote
cite="mid:CACtw84ELOJSjxuG2Ytm_60bsopdwGaZnpAGObuxXbm-v+rUSWQ@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> 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)</div>
</blockquote>
<div><br>
I loaded pv, and modified the script accordingly. No syntax
errors anymore, but avps are not populated from the data
stored in the db. Maybe a problem with lookup_domain?<br>
</div>
</div>
</blockquote>
<br>
the modules_s/domain was only renamed to uid_domain to avoid
conflict with the other domain module. No other recent changes to
my knowledge. Can you try to put IF around it and see if returns
true or false? Can you check the sql queries in the server to see
if they are returning something?<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:CACtw84ELOJSjxuG2Ytm_60bsopdwGaZnpAGObuxXbm-v+rUSWQ@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div> <br>
Here's the excerpt of the script (I replaced the selects
with '@' by '$sel()', and added a dump_attrs()) :<br>
xlog("L_INFO", "from.uri.host :
$sel(from.uri.host)\n");<br>
xlog("L_INFO", "ruri.host : $sel(ruri.host)\n");<br>
<br>
lookup_domain("$fd", "$sel(from.uri.host)");<br>
lookup_domain("$td", "$sel(ruri.host)");<br>
<br>
xlog("L_INFO", "fd : $avp(fd.did)\n");<br>
<br>
dump_attrs();<br>
<br>
if (strempty($avp(fd.did)) &&
strempty($avp(td.did))) {<br>
# Neither the calling nor the called domain
is local<br>
# This is a relaying attempt which should be
forbidden<br>
sl_reply("403", "Relaying Forbidden");<br>
drop;<br>
}<br>
<br>
And as a result :<br>
0(22008) INFO: <script>: from.uri.host :
ext.test.r3load.voip<br>
0(22008) INFO: <script>: ruri.host :
ext.test.r3load.voip<br>
0(22008) INFO: <script>: fd : <null><br>
0(22008) INFO: avp [avp.c:573]: class=GLOBAL<br>
0(22008) INFO: avp [avp.c:575]: INFO: No AVP present<br>
0(22008) INFO: avp [avp.c:583]: track=FROM class=DOMAIN<br>
0(22008) INFO: avp [avp.c:585]: INFO: No AVP present<br>
0(22008) INFO: avp [avp.c:593]: track=TO class=DOMAIN<br>
0(22008) INFO: avp [avp.c:595]: INFO: No AVP present<br>
0(22008) INFO: avp [avp.c:603]: track=FROM class=USER<br>
0(22008) INFO: avp [avp.c:605]: INFO: No AVP present<br>
0(22008) INFO: avp [avp.c:613]: track=TO class=USER<br>
0(22008) INFO: avp [avp.c:615]: INFO: No AVP present<br>
0(22008) INFO: avp [avp.c:623]: track=FROM class=URI<br>
0(22008) INFO: avp [avp.c:625]: INFO: No AVP present<br>
0(22008) INFO: avp [avp.c:633]: track=TO class=URI<br>
0(22008) INFO: avp [avp.c:635]: INFO: No AVP present<br>
<br>
In the db :<br>
+----+----------------------+----------------------+-------+<br>
| id | did | domain | flags |<br>
+----+----------------------+----------------------+-------+<br>
| 1 | ext.test.r3load.voip | ext.test.r3load.voip | 0 |
<br>
+----+----------------------+----------------------+-------+<br>
<br>
Thanks again!<br>
<br>
Philippe<br>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" 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 moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" 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 moz-do-not-send="true" class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</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>