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:[email protected] 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 [email protected] to sip:[email protected] canceled by user

Can everyone give me a suggest?? Thank for your help.
Nick

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to