I also tested on two other newer versions of SVN to, same issue.<br><br>If this mattes, this is on FreeBSD 7.2 64 bit.<br><br>Thanks<br><br><div class="gmail_quote">On Fri, Sep 18, 2009 at 7:06 AM, Ron McCarthy <span dir="ltr">&lt;<a href="mailto:ronmccar@gmail.com">ronmccar@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
 dp_translate(&quot;200&quot;, &quot;$avp(s:from_did)/$avp(s:newfrom_did)&quot;);<br>
<br>
We call that after the INVITE and allow_trusted, etc. It gets called 4 times total, twice to normalize the $fU and $fU vars then two more times to change the values if needed, (adds a 1, +1, etc).<br><br>Thanks<div><div>
</div><div class="h5"><br><br><br>
<div class="gmail_quote">On Fri, Sep 18, 2009 at 1:24 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi Ron,<br>
<br>
Hoe do you call the dp_translate function from the script?<br>
<br>
Regards,<br>
Bogdan<br>
<div><div></div><div><br>
Ron McCarthy wrote:<br>
&gt; Hi list,<br>
&gt;<br>
&gt; Ive done quite a bit of troubleshooting and ive found the switch runs<br>
&gt; clean with not using dp_translate, but when we do the errors appear.<br>
&gt;<br>
&gt; After a few thousand calls we start getting: (no errors before this)<br>
&gt;<br>
&gt; Sep 18 00:09:13 sips /usr/local/sbin/opensips[68260]:<br>
&gt; ERROR:dialplan:dp_get_svalue: no AVP or SCRIPTVAR found (error in scripts)<br>
&gt; Sep 18 00:09:13 sips /usr/local/sbin/opensips[68260]:<br>
&gt; ERROR:dialplan:dp_translate_f: invalid param 2<br>
&gt; Sep 18 00:09:13 sips /usr/local/sbin/opensips[68260]:<br>
&gt; ERROR:core:do_assign: no value in right expression<br>
&gt; Sep 18 00:09:13 sips /usr/local/sbin/opensips[68260]:<br>
&gt; ERROR:core:do_assign: error at line: 298<br>
&gt;<br>
&gt; Backtrace shows:<br>
&gt; #0  0x0000000801ff0211 in rule_translate (msg=0x6fe600, string={s =<br>
&gt; 0x80282a9c3 &quot;1234569999&quot;, len = 10}, rule=Variable &quot;rule&quot; is not<br>
&gt; available.<br>
&gt; ) at dp_repl.c:192<br>
&gt; 192 memcpy(result-&gt;s + result-&gt;len, match.begin, match.len);<br>
&gt; (gdb)<br>
&gt;<br>
&gt; Were using sipP to test this, im setting the source and dest number<br>
&gt; manually with a AVP var then having dp_translate run on it, its taking<br>
&gt; a 10 digit number and turning it into 11 digits, we have about 45<br>
&gt; rules loaded into the database for the dialplan, with this particular<br>
&gt; dialplan ID their is 2 rules total, we call dp_translate a total of 4<br>
&gt; times for each new call.<br>
&gt;<br>
&gt; vmstat is basically all 0&#39;s when dp_translate disabled, when enabled<br>
&gt; it looks like:<br>
&gt;<br>
&gt; 0 9 0   2891M  2574M  1484   0   0   0  3737   0   0   0 2744 29807<br>
&gt; 11711 13 15 72<br>
&gt;  1 7 0   2899M  2569M  1493   0   0   0  1983   0   0   0 2678 39221<br>
&gt; 11355 13 11 76<br>
&gt;  0 8 0   2891M  2568M  1119   0   0   0  2821   0   0   0 2360 28331<br>
&gt; 10401 13 15 72<br>
&gt;  0 8 0   2901M  2565M  1477   0   0   0  2086   0   0   0 2226 39722<br>
&gt; 9430 11 15 74<br>
&gt;  1 8 0   2893M  2560M  1250   0   0   0  1993   0   0   0 2912 23983<br>
&gt; 12123 11 15 74<br>
&gt;  4 6 0   2901M  2551M  1557   0   0   0  2035   0   0   0 3075 38446<br>
&gt; 13035 12 18 70<br>
&gt;  0 9 0   2893M  2548M  1103   0   0   0  1877   0   0   0 2772 26050<br>
&gt; 11474 12 12 76<br>
&gt;  0 8 0   2901M  2539M  1434   0   0   0   743   0   0   0 3289 34833<br>
&gt; 13759  8 17 75<br>
&gt;  0 9 0   2893M  2534M   943   0   0   0  1533   0   0   0 3372 23843<br>
&gt; 14379  8 24 68<br>
&gt;  2 7 0   2901M  2528M  1252   0   0   0  1207   0   0   0 2762 39615<br>
&gt; 11275 12 13 75<br>
&gt;  0 8 0   2902M  2521M  1134   0   0   0   703   0   0   0 3364 18464<br>
&gt; 14069  6 18 76<br>
&gt;  0 8 0   2901M  2514M  1670   0   0   0  1737   0   0   0 3771 17832<br>
&gt; 17211  1 16 82<br>
&gt;  0 8 0   2902M  2508M  1212   0   0   0   803   0   0   0 3141 5263<br>
&gt; 13990  1 14 85<br>
&gt;  0 8 0   2901M  2499M  1542   0   0   0  1241   0   0   0 3720 17120<br>
&gt; 16641  1 17 82<br>
&gt;  0 7 0   2902M  2497M  1260   0   0   0  2027   0   0   0 2561 6328<br>
&gt; 11863  1 14 85<br>
&gt;  0 7 0   2901M  2499M  1979   0   0   0  3653   0   0   0 2442 19121<br>
&gt; 11724  3 13 85<br>
&gt;  1 8 0   2902M  2498M  1387   0   0   0  3062   0   0   0 2183 6172<br>
&gt; 10662  0 13 87<br>
&gt;<br>
&gt;<br>
&gt; We have ran this at 5CPS and the switch will run fine for several<br>
&gt; thousand calls, then at 60+ CPS and runs for several thousand calls as<br>
&gt; well, so it appears to be a memory issue to me as when the total<br>
&gt; number of processed calls goes up is when it dies on us.<br>
&gt;<br>
&gt; Let me know what else I can do to test/debug on my side to help with this.<br>
&gt;<br>
&gt; Thanks<br>
</div></div>&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br>