[OpenSIPS-Users] opensips + call control
Nick
nick_chang at ezmobo.com
Tue Nov 15 10:57:20 CET 2011
Hello
It's my Server architecture.
_____________ __________
| | | |
| opensips | | Radius |
| RTPProxy | <-----> | CDRTool |
| CallControl | | rating |
| MySQL | | engine |
|____________| |_________|
CentOS 5.x Ubuntu
And Then, It's my opensips config for call control
if (is_avp_set("$avp(805)")) {
$avp(billing_party_domain) = $(avp(805){uri.domain});
} else {
$avp(billing_party_domain) = $fd;
}
# account only INVITEs
if (is_method("INVITE") && !has_totag() &&
is_domain_local("$avp(billing_party_domain)")) {
setflag(1); # do accounting
$avp(caller) = $fu;
create_dialog();
call_control();
switch ($retcode) {
case 2:
# Call with no limit
case 1:
# Call with a limit under callcontrol management
(either prepaid or postpaid)
case -1:
# Not enough credit (prepaid call)
xlog("L_INFO", "Call control: not enough credit for
prepaid call\n");
sl_send_reply("402", "Not enough credit");
exit;
case -2:
# Locked by call in progress (prepaid call)
xlog("L_INFO", "Call control: prepaid call locked
by another call in progress\n");
sl_send_reply("403", "Call locked by another call
in progress");
exit;
case -3:
# Duplicated callid
xlog("L_INFO", "Call control: Duplicated call id\n");
sl_send_reply("400", "Duplicated callid");
exit;
case -4:
# Call limit reached
xlog("L_INFO", "Call control: Call limit reached\n");
sl_send_reply("503", "Too many concurrent calls");
exit;
default:
# Internal error (message parsing, communication, ...)
xlog("L_INFO", "Call control: internal server
error\n");
sl_send_reply("500", "Internal server error");
exit;
}
But Now, I can't work.
In log, always display error.
call-control[8134]: User sip:0911111111 at 220.130.6.180 can make unlimited
concurrent calls
Nov 15 17:45:45 sfs-staging /usr/local/sbin/opensips[14404]:
INFO:core:buf_init: initializing...
Nov 15 17:45:45 sfs-staging /usr/local/sbin/opensips[14404]: Call
control: not enough credit for prepaid call
Nov 15 17:45:45 sfs-staging /usr/local/sbin/opensips[14404]:
WARNING:call_control:postprocess_request: dialog to trace controlled
call was not created. discarding callcontrol.
Nov 15 17:45:45 sfs-staging call-control[8134]: Call id
ZGEyYmU1MDlkY2M4YzY1ODVkMDhjYTg4ZTg4ZWQ3OGU. of 0911111111 at 220.130.6.180
to sip:0939723377 at 220.130.6.180 canceled by user
Can everyone give me a suggest?? Thank for your help.
Nick
More information about the Users
mailing list