CAll controller Issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CAll controller Issue

ASHWINI NAIDU
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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CAll controller Issue

Dan Pascu

On 7 Oct 2009, at 14:22, ASHWINI NAIDU wrote:

> 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

The diverter_avp if set will indicate who is the billing party. Maybe  
that account is postpaid.

--
Dan




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