Hi,<br><br><br><div class="gmail_quote">2009/12/1 Ilya Pichugin <span dir="ltr"><<a href="mailto:i.pichugin@ptl.ru">i.pichugin@ptl.ru</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I found my mistake - it was necessary to tune my e164_class.<br>
And now debiting is OK.. but!<br>
<br>
Why function call_control() always return 1 retcode, even there is<br>
balance <=0 (No credit)?<br>
<br>
I cannot understand..<br>
<br>
<br>
Syslog:<br>
Dec 1 14:47:32 cdrtool call-control[7107]: Call id MDY2YjZlZTc0YzA4OTUwMjhlNTNmY2IwOGRlZmRhMzU. of 3097998@a.x.y to sip:3364000@a.x.y forbidden because credit is too low<br>
<br>
Dec 1 15:06:16 cdrtool /usr/local/opensips16/sbin/opensips[9386]: Call has limit and is under callcontrol management RETCODE is 1<br>
<br></blockquote><div><br>You think it isn't correct with a negative balance?<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
OpenSIPS code is:<br>
<br>
<br>
if (method=="INVITE" && nat_uac_test("2"))<br>
{<br>
xlog("L_INFO", "record route section | INVITE & nat test: M=$rm<br>
RURI=$ru F=$fU T=$tu IP=$si\n");<br>
call_control();<br>
xlog("CALL_CONTROL");<br>
switch ($retcode) {<br>
case 2:<br>
xlog("Call with no limit RETCODE is $retcode ");<br>
case 1:<br>
xlog("Call has limit and is under callcontrol management RETCODE is $retcode \n");<br>
break;<br>
case -1:<br>
xlog("Not enough credit (prepaid call) RETCODE is $retcode ");<br>
sl_send_reply("402", "Not enough credit");<br>
exit;<br>
break;<br>
case -2:<br>
xlog("Locked by another call in progress (prepaid call)");<br>
sl_send_reply("403", "Call locked by another call in progress");<br>
exit;<br>
break;<br>
<div><div></div><div class="h5"><br>
<br>
<br>
> Hi All!<br>
<br>
> I've installed subject applications. I'm trying to test prepaid calls<br>
> but it's no successful<br>
<br>
> Why does rating engine always return 'postpaid not limited'?<br>
<br>
mysql>> select * from prepaid;<br>
> +----+-------------+-------------------------+----------+---------------------+-----------------+-----------------+<br>
> | id | reseller_id | account | balance |<br>
> change_date | active_sessions | session_counter |<br>
> +----+-------------+-------------------------+----------+---------------------+-----------------+-----------------+<br>
> | 1 | 0 | 3097998@a.x.y | -32.6667 |<br>
> 2009-11-27 18:01:43 | null | 0 |<br>
<br>
<br>
> I tried to force debit balance (telnet ip 9024), but call_control() on<br>
> each INVITE returnes '+1' and in syslog I see 'postpaid not limited'<br>
<br>
> And if I call MaxSessionTime, rating engine returne 'none'<br>
<br>
> Nov 30 12:07:25 cdrtool call-control[2230]: Call id<br>
> MDRjZmQ2ZGI5MDFlYzJiMmIyNDgwNjI5Y2FmMTk2YTc. of 3097998@a.x.y to sip:3364000@a.x.y is postpaid not<br>
> limited<br>
<br>
> I have enabled quota-based accounts but it does not work ;-(<br>
<br>
mysql>> select id,datasource,account,domain,quota,blocked,calls,duration,cost,traffic,change_date from quota_usage;<br>
> +----+-----------------+-------------------------+-----------------+-------+---------+-------+----------+----------+---------+---------------------+<br>
> | id | datasource | account | domain<br>
> | quota | blocked | calls | duration | cost | traffic | change_date |<br>
> +----+-----------------+-------------------------+-----------------+-------+---------+-------+----------+----------+---------+---------------------+<br>
> | 4 | opensips_radius | 3097998@a.x.y | a.x.y<br>
> | 10 | 1 | 23 | 91 | 658.3667 | 0 | 2009-11-30 12:49:53 |<br>
> +----+-----------------+-------------------------+-----------------+-------+---------+-------+----------+----------+---------+---------------------+<br>
> 2 rows in set (0.00 sec)<br>
<br>
> Where is my mistake?<br>
<br>
> I hope for your help<br>
<br>
<br>
> ---------------<br>
<br>
> Ilya Pichugin<br>
<br>
<br>
<br>
</div></div>---------------<br>
<div><div></div><div class="h5"><br>
Ilya Pichugin<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>
</div></div></blockquote></div><br>