[OpenSIPS-Users] CAll controller Issue
    ASHWINI NAIDU 
    ashwini.naidu at gmail.com
       
    Wed Oct  7 13:22:41 CEST 2009
    
    
  
Hi all,
    I am using call controller-2.0.3 .
Problem 1: If i place the *call_control( )*  function after setting
diverter_avp the call controller *takes all the accounts as postpaid*. what
is the reason for this behavior
Problem 2: Same kind of code behave differently on 2 different opensips
servers i.e the behavior of call-controller.
*Below i have given extract of the code*.*All accounts are taken are
postpaid*
if ((method=="INVITE" && !has_totag())) {
if ( is_avp_set("$avp(s:from_alias)")) {
                    uac_replace_from("$fU","$avp(s:from_alias)");
            $avp(s:billing_party)=$avp(s:from_alias);
$avp(i:805)=$(avp(s:from_alias){uri.user})+"@"+$(avp(s:from_alias){uri.domain});
         }
        setflag(1);
        setflag(3);
        setflag(20);
        route(20); *//call-controller route*
};
route[20] {
#------------------------------------------------------------------------------------------------------
                # Call control function at the first INVITE
                $var(retcode) = call_control();
                xlog("L_INFO","\n 1. ***************** RETURN
CODE=$var(retcode)");
                xlog("L_INFO","\n 2. ***************** RETURN
CODE=$var(retcode)");
                xlog("L_INFO","\n 3. ***************** RETURN
CODE=$var(retcode)");
                xlog("L_INFO","\n The call is From: $fu
*************To:$tu******************************** Contact:
$ct*************UA=[$ua]\n");
                switch ($var(retcode)){
                case -1:
                       # Not enough credit (prepaid call)
                       xlog("L_INFO", "Call control: not enough credit for
prepaid call\n");
                       acc_aaa_request("402");
                       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");
                       acc_aaa_request("403");
                       sl_send_reply("403", "Call locked by another call in
progress");
                       exit;
                       break;
                case 1:
                       # Call with a limit under callcontrol management
(either prepaid or postpaid)
                        xlog("L_INFO", "Call control: Inside 1 for pre
paid\n");
                        break;
                case 2:
                        xlog("L_INFO", "Call control: Inside 2 for post
paid\n");
                       # Call with no limit
                        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;
              }
}
-- 
Thanking You,
Ashwini BR Naidu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20091007/e9b5fac5/attachment.htm 
    
    
More information about the Users
mailing list