[OpenSIPS-Users] Call Control not behaving
Douglas Lane
doug at wd.co.za
Mon Apr 19 16:32:29 CEST 2010
Hi Luci,
Hmm I should have checked that. Below is my routing logic for call
control (I loaded it into its own route block, and then my invite route
just calls this route block for processing after the proxy auth succeeds)
if(!isflagset(19))
{
call_control();
xlog("L_INFO", "Callcontrol returned code $retcode\n");
switch ($retcode)
{
case 2:
# Call with no limit
case 1:
# Call with a limit under callcontrol
management (either prepaid or postpaid)
break;
case -1:
xlog("L_INFO", "Call control: not
enough credit for prepaid call\n");
acc_aaa_request("402");
revert_uri();
prefix("u");
rewritehostport("1.2.3.5"); #
This is my asterisk box that says "I'm sorry you got no money left"
route(12); #basic route block to
have the call over to t_relay()
exit;
break;
case -2:
# Locked by call in progress (prepaid call)
xlog("L_INFO", "Call control: prepaid
call locked by another call in progress\n");
acc_aaa_request("403");
sl_send_reply("403", "Call locked by
another call in progress");
exit;
break;
default:
# Internal error (message parsing,
communication, ...)
xlog("L_INFO", "Call control: internal
server error\n");
acc_aaa_request("500");
sl_send_reply("500", "Internal server
error");
exit;
}
## mark checking done
setflag(19); # I set flag 19 to make sure I
don't go over this again
}
On 2010/04/19 4:19 PM, Luci Stanescu wrote:
> On 04/19/2010 10:11 AM, Douglas Lane wrote:
>
>> Hi Guys,
>>
> Hi Douglas,
>
>
>> Apr 19 09:50:02 sbc1 call-control[4358]: Call id
>> 6525f68f48fed0525fabf5583822f87f at domain.com of telefusion at domain.com to
>> sip:0739384404 at domain.com forbidden because credit is too low
>> Apr 19 09:50:02 sbc1 /opt/opensips/sbin/opensips[19378]: Callcontrol
>> returned code 18446744073709551615
>>
> That number is the largest 64bit signed integer. The call_control
> function returns -1 in case of no credit, so effectively the two numbers
> are equivalent (in binary). How are you using the return code of the
> call_control function?
>
>
More information about the Users
mailing list