I ran one more test and this is the final results:<br><br>Sep 22 08:15:13 sips /usr/local/sbin/opensips[52643]: ERROR:dialplan:rule_translate: the string 4085557777 matched the match_exp ^([2-9][0-9]{2}[2-9][0-9]{6}) but not the subst_exp ^([2-9][0-9]{2}[2-9][0-9]{6})(.+)!<br>
Sep 22 08:15:13 sips /usr/local/sbin/opensips[52643]: ERROR:dialplan:translate: could not build the output<br>Sep 22 08:15:13 sips /usr/local/sbin/opensips[52643]: ERROR:core:do_assign: no value in right expression<br>Sep 22 08:15:13 sips /usr/local/sbin/opensips[52643]: ERROR:core:do_assign: error at line: 432<br>
<br>Line 432 is: $rU = $avp(s:carto_did); <br><br>Then we get:<br><br>Sep 22 08:17:48 sips /usr/local/sbin/opensips[52643]: ERROR:core:do_assign: error at line: 299<br>Sep 22 08:17:48 sips /usr/local/sbin/opensips[52643]: ERROR:dialplan:dp_get_svalue: no PV or NULL or non-STR val found (error in scripts)<br>
Sep 22 08:17:48 sips /usr/local/sbin/opensips[52643]: ERROR:dialplan:dp_translate_f: invalid param 2<br><br>Line 299: $avp(s:aninpa)=$(avp(s:newfrom_did){s.substr,0,3});<br><br>At this point the switch is still taking on new calls, we get those errors some more times, then we core dump<br>
<br>Here is the gdb output:<br>(gdb) print result<br>$1 = (str *) 0x7fffffffe170<br>(gdb) print result->len<br>$2 = 0<br>(gdb) print result->s<br>$3 = 0x801fe3f00 "5679990000"<br>(gdb) print match<br>$4 = {begin = 0x802f7e0a8 "5679990000", len = -43123475}<br>
<br>Core file is 2GB but you can download via HTTP if that will help.<br><br>Thanks and let me know what ever else I can do.<br><br><br><br><br>Dialplan rules are:<br><br>dpid pr match_op match_exp match_len subst_exp repl_exp<br>
200 40 1 ^([2-9][0-9]{2}[2-9][0-9]{6}) 0 ^([2-9][0-9]{2}[2-9][0-9]{6}) \1 <br>200 50 1 ^1([2-9][0-9]{2}[2-9][0-9]{6}) 0 ^1([2-9][0-9]{2}[2-9][0-9]{6})(.+) \1 <br>
<br><div class="gmail_quote">On Tue, Sep 22, 2009 at 7:51 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></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>
there couple of options:<br>
1) we try remove debugging<br>
2) give me access to the core file so that I can investigate it<br>
3) send the the DB content and the input for the dp_translate() to<br>
try to reproduce it<br>
<br>
so, let's try 1)<br>
please print in gdb the following values: result , result->len,<br>
result->s, match.<br>
<br>
Thanks and regards,<br>
<div class="im">Bogdan<br>
<br>
Ron McCarthy wrote:<br>
> Hi,<br>
><br>
</div><div><div></div><div class="h5">> Just updated and ran a test and now it's core dumping with no errors<br>
> in syslog, a backtrace shows:<br>
><br>
> #0 0x0000000801ed9e41 in rule_translate (msg=0x775c88, string={s =<br>
> 0x8029e4e99 "6025504004", len = 10}, rule=Variable "rule" is not<br>
> available.<br>
> ) at dp_repl.c:192<br>
> #1 0x0000000801edb124 in translate (msg=0x775c88, input={s =<br>
> 0x8029e4e99 "6025504004", len = 10}, output=0x7fffffffd570,<br>
> idp=Variable "idp" is not available.<br>
> ) at dp_repl.c:346<br>
> #2 0x0000000801ed2472 in dp_translate_f (msg=0x775c88, str1=Variable<br>
> "str1" is not available.<br>
> ) at dialplan.c:368<br>
> #3 0x000000000040dbb1 in do_action (a=0x6dfb90, msg=0x775c88) at<br>
> action.c:962<br>
> #4 0x000000000040c6a7 in run_action_list (a=Variable "a" is not<br>
> available.<br>
> ) at action.c:139<br>
> #5 0x000000000040fb8e in do_action (a=0x6e3d10, msg=0x775c88) at<br>
> action.c:706<br>
> #6 0x000000000040c6a7 in run_action_list (a=Variable "a" is not<br>
> available.<br>
> ) at action.c:139<br>
> #7 0x000000000040eebe in do_action (a=0x6d4d08, msg=0x775c88) at<br>
> action.c:119<br>
> #8 0x000000000040c6a7 in run_action_list (a=Variable "a" is not<br>
> available.<br>
> ) at action.c:139<br>
> #9 0x000000000040fb8e in do_action (a=0x6d4f48, msg=0x775c88) at<br>
> action.c:706<br>
> #10 0x000000000040c6a7 in run_action_list (a=Variable "a" is not<br>
> available.<br>
> ) at action.c:139<br>
> #11 0x000000000040fb8e in do_action (a=0x6d6f90, msg=0x775c88) at<br>
> action.c:706<br>
> #12 0x000000000040c6a7 in run_action_list (a=Variable "a" is not<br>
> available.<br>
> ) at action.c:139<br>
> #13 0x0000000000410d29 in run_top_route (a=0x6bd588, msg=0x775c88) at<br>
> action.c:119<br>
> #14 0x0000000000455d6b in receive_msg (<br>
> buf=0x65dd80 "INVITE <a href="http://sip:1234568888@192.168.1.100:5060" target="_blank">sip:1234568888@192.168.1.100:5060</a><br>
</div></div>> <<a href="http://sip:1234568888@192.168.1.100:5060" target="_blank">http://sip:1234568888@192.168.1.100:5060</a>> SIP/2.0\r\nVia: SIP/2.0/UDP<br>
<div class="im">> 192.168.1.100:5061;branch=z9hG4bK-33820-611-0\r\nFrom: sipp<br>
> <<a href="http://sip:1234569999@192.168.1.100:5060" target="_blank">sip:1234569999@192.168.1.100:5060</a><br>
</div>> <<a href="http://sip:1234569999@192.168.1.100:5060" target="_blank">http://sip:1234569999@192.168.1.100:5060</a>>>;tag=33820SIPpTag00611\r\nTo:<br>
<div class="im">> sut <sip:12345"..., len=555, rcv_info=0x7fffffffea70) at receive.c:162<br>
> #15 0x0000000000499f3e in udp_rcv_loop () at udp_server.c:490<br>
> #16 0x0000000000428a2a in main (argc=7, argv=Variable "argv" is not<br>
> available.<br>
> ) at main.c:818<br>
><br>
> That was about 800 calls into it at 10 CPS.<br>
><br>
> What else can I try?<br>
><br>
> Thanks<br>
><br>
><br>
> On Tue, Sep 22, 2009 at 5:26 AM, Bogdan-Andrei Iancu<br>
</div><div class="im">> <<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>>> wrote:<br>
><br>
> Hi Ron,<br>
><br>
> If you update from SVN trunk, this should be fixed. Please let me know<br>
> if it works for you or not.<br>
><br>
> Regards,<br>
> Bogdan<br>
><br>
><br>
> Ron McCarthy wrote:<br>
> > Hi,<br>
> ><br>
> > dp_translate("200", "$avp(s:from_did)/$avp(s:newfrom_did)");<br>
> ><br>
> > We call that after the INVITE and allow_trusted, etc. It gets<br>
> called 4<br>
> > times total, twice to normalize the $fU and $fU vars then two more<br>
> > times to change the values if needed, (adds a 1, +1, etc).<br>
> ><br>
> > Thanks<br>
> ><br>
> ><br>
> > On Fri, Sep 18, 2009 at 1:24 AM, Bogdan-Andrei Iancu<br>
> > <<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>><br>
</div>> <mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>>>><br>
<div><div></div><div class="h5">> wrote:<br>
> ><br>
> > Hi Ron,<br>
> ><br>
> > Hoe do you call the dp_translate function from the script?<br>
> ><br>
> > Regards,<br>
> > Bogdan<br>
> ><br>
> > Ron McCarthy wrote:<br>
> > > Hi list,<br>
> > ><br>
> > > Ive done quite a bit of troubleshooting and ive found the<br>
> switch<br>
> > runs<br>
> > > clean with not using dp_translate, but when we do the<br>
> errors appear.<br>
> > ><br>
> > > After a few thousand calls we start getting: (no errors<br>
> before this)<br>
> > ><br>
> > > Sep 18 00:09:13 sips /usr/local/sbin/opensips[68260]:<br>
> > > ERROR:dialplan:dp_get_svalue: no AVP or SCRIPTVAR found (error<br>
> > in scripts)<br>
> > > Sep 18 00:09:13 sips /usr/local/sbin/opensips[68260]:<br>
> > > ERROR:dialplan:dp_translate_f: invalid param 2<br>
> > > Sep 18 00:09:13 sips /usr/local/sbin/opensips[68260]:<br>
> > > ERROR:core:do_assign: no value in right expression<br>
> > > Sep 18 00:09:13 sips /usr/local/sbin/opensips[68260]:<br>
> > > ERROR:core:do_assign: error at line: 298<br>
> > ><br>
> > > Backtrace shows:<br>
> > > #0 0x0000000801ff0211 in rule_translate (msg=0x6fe600,<br>
> string={s =<br>
> > > 0x80282a9c3 "1234569999", len = 10}, rule=Variable "rule"<br>
> is not<br>
> > > available.<br>
> > > ) at dp_repl.c:192<br>
> > > 192 memcpy(result->s + result->len, match.begin, match.len);<br>
> > > (gdb)<br>
> > ><br>
> > > Were using sipP to test this, im setting the source and<br>
> dest number<br>
> > > manually with a AVP var then having dp_translate run on<br>
> it, its<br>
> > taking<br>
> > > a 10 digit number and turning it into 11 digits, we have<br>
> about 45<br>
> > > rules loaded into the database for the dialplan, with this<br>
> > particular<br>
> > > dialplan ID their is 2 rules total, we call dp_translate a<br>
> total<br>
> > of 4<br>
> > > times for each new call.<br>
> > ><br>
> > > vmstat is basically all 0's when dp_translate disabled,<br>
> when enabled<br>
> > > it looks like:<br>
> > ><br>
> > > 0 9 0 2891M 2574M 1484 0 0 0 3737 0 0 0<br>
> 2744 29807<br>
> > > 11711 13 15 72<br>
> > > 1 7 0 2899M 2569M 1493 0 0 0 1983 0 0 0<br>
> 2678 39221<br>
> > > 11355 13 11 76<br>
> > > 0 8 0 2891M 2568M 1119 0 0 0 2821 0 0 0<br>
> 2360 28331<br>
> > > 10401 13 15 72<br>
> > > 0 8 0 2901M 2565M 1477 0 0 0 2086 0 0 0<br>
> 2226 39722<br>
> > > 9430 11 15 74<br>
> > > 1 8 0 2893M 2560M 1250 0 0 0 1993 0 0 0<br>
> 2912 23983<br>
> > > 12123 11 15 74<br>
> > > 4 6 0 2901M 2551M 1557 0 0 0 2035 0 0 0<br>
> 3075 38446<br>
> > > 13035 12 18 70<br>
> > > 0 9 0 2893M 2548M 1103 0 0 0 1877 0 0 0<br>
> 2772 26050<br>
> > > 11474 12 12 76<br>
> > > 0 8 0 2901M 2539M 1434 0 0 0 743 0 0 0<br>
> 3289 34833<br>
> > > 13759 8 17 75<br>
> > > 0 9 0 2893M 2534M 943 0 0 0 1533 0 0 0<br>
> 3372 23843<br>
> > > 14379 8 24 68<br>
> > > 2 7 0 2901M 2528M 1252 0 0 0 1207 0 0 0<br>
> 2762 39615<br>
> > > 11275 12 13 75<br>
> > > 0 8 0 2902M 2521M 1134 0 0 0 703 0 0 0<br>
> 3364 18464<br>
> > > 14069 6 18 76<br>
> > > 0 8 0 2901M 2514M 1670 0 0 0 1737 0 0 0<br>
> 3771 17832<br>
> > > 17211 1 16 82<br>
> > > 0 8 0 2902M 2508M 1212 0 0 0 803 0 0 0<br>
> 3141 5263<br>
> > > 13990 1 14 85<br>
> > > 0 8 0 2901M 2499M 1542 0 0 0 1241 0 0 0<br>
> 3720 17120<br>
> > > 16641 1 17 82<br>
> > > 0 7 0 2902M 2497M 1260 0 0 0 2027 0 0 0<br>
> 2561 6328<br>
> > > 11863 1 14 85<br>
> > > 0 7 0 2901M 2499M 1979 0 0 0 3653 0 0 0<br>
> 2442 19121<br>
> > > 11724 3 13 85<br>
> > > 1 8 0 2902M 2498M 1387 0 0 0 3062 0 0 0<br>
> 2183 6172<br>
> > > 10662 0 13 87<br>
> > ><br>
> > ><br>
> > > We have ran this at 5CPS and the switch will run fine for<br>
> several<br>
> > > thousand calls, then at 60+ CPS and runs for several thousand<br>
> > calls as<br>
> > > well, so it appears to be a memory issue to me as when the<br>
> total<br>
> > > number of processed calls goes up is when it dies on us.<br>
> > ><br>
> > > Let me know what else I can do to test/debug on my side to<br>
> help<br>
> > with this.<br>
> > ><br>
> > > Thanks<br>
> > ><br>
> ><br>
> ------------------------------------------------------------------------<br>
> > ><br>
> > > _______________________________________________<br>
> > > Users mailing list<br>
> > > <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
</div></div>> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>>><br>
<div class="im">> > > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
> > ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Users mailing list<br>
> > <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
</div>> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>>><br>
<div><div></div><div class="h5">> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
> ><br>
> ><br>
> ><br>
> ------------------------------------------------------------------------<br>
> ><br>
> > _______________________________________________<br>
> > Users mailing list<br>
> > <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">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>
> ><br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">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>
><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">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>
><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">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>
</div></div></blockquote></div><br>