[OpenSIPS-Users] (is_avp_set("$avp(805)")) what does this mean??

Nick nick_chang at ezmobo.com
Wed Nov 16 09:45:06 CET 2011


Hello

         if (is_avp_set("$avp(805)")) {
                 $avp(billing_party_domain) = $(avp(805){uri.domain});
         } else {
                 $avp(billing_party_domain) = $fd;
         }

What does this mean?? Why is 805??  why is billing_party_domain??  I saw 
callcontrol document. But I don't know this mean??
Please tell me why?? Thanks.

         # 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();
                 xlog("callcontrol returned code is $retcode\r\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:
                     # 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;
break;
                 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;
break;
                 case -3:
                     # Duplicated callid
                     xlog("L_INFO", "Call control: Duplicated call id\n");
                     sl_send_reply("400", "Duplicated callid");
                     exit;
break;
                 case -4:
                     # Call limit reached
                     xlog("L_INFO", "Call control: Call limit reached\n");
                     sl_send_reply("503", "Too many concurrent calls");
                     exit;
break;
                 default:
                     # Internal error (message parsing, communication, ...)
                     xlog("L_INFO", "Call control: internal server 
error\n");
                     sl_send_reply("500", "Internal server error");
                     exit;

And Then, I always get retcdoe is 1.
How can i do?? Call control is work. Thanks

Nick



More information about the Users mailing list