Hi all,<br><br>    I am using call controller-2.0.3 . <br><br>Problem 1: If i place the <b>call_control( )</b>  function after setting diverter_avp the call controller <b>takes all the accounts as postpaid</b>. what is the reason for this behavior<br>
Problem 2: Same kind of code behave differently on 2 different opensips servers i.e the behavior of call-controller.<br><br clear="all"><b>Below i have given extract of the code</b>.<b>All accounts are taken are postpaid</b><br>
<br>if ((method=="INVITE" && !has_totag())) {<br>if ( is_avp_set("$avp(s:from_alias)")) {<br>                    uac_replace_from("$fU","$avp(s:from_alias)");<br>            $avp(s:billing_party)=$avp(s:from_alias);<br>
                    $avp(i:805)=$(avp(s:from_alias){uri.user})+"@"+$(avp(s:from_alias){uri.domain});<br>         } <br>        <br>        setflag(1);<br>        setflag(3);<br>        setflag(20);<br>        route(20); <b>//call-controller route</b> <br>
};<br><br><br><br>route[20] {<br>                #------------------------------------------------------------------------------------------------------<br>                # Call control function at the first INVITE<br>                $var(retcode) = call_control();<br>
                xlog("L_INFO","\n 1. ***************** RETURN CODE=$var(retcode)");<br>                xlog("L_INFO","\n 2. ***************** RETURN CODE=$var(retcode)");<br>                xlog("L_INFO","\n 3. ***************** RETURN CODE=$var(retcode)");<br>
                xlog("L_INFO","\n The call is From: $fu *************To:$tu******************************** Contact: $ct*************UA=[$ua]\n");<br><br>                switch ($var(retcode)){<br><br>
                case -1:<br>                       # Not enough credit (prepaid call)<br>                       xlog("L_INFO", "Call control: not enough credit for prepaid call\n");<br>                       acc_aaa_request("402");<br>
                       sl_send_reply("402", "Not enough credit");<br>                       exit;<br>                       break;<br>                case -2:<br>                       # Locked by call in progress (prepaid call)<br>
                       xlog("L_INFO", "Call control: prepaid call locked by another call in progress\n");<br>                       acc_aaa_request("403");<br>                       sl_send_reply("403", "Call locked by another call in progress");<br>
                       exit;<br>                       break;<br><br>                case 1:<br>                       # Call with a limit under callcontrol management (either prepaid or postpaid)<br>                        xlog("L_INFO", "Call control: Inside 1 for pre paid\n");<br>
                        break;<br><br>                case 2:<br>                        xlog("L_INFO", "Call control: Inside 2 for post paid\n");<br>                       # Call with no limit<br>                        break;<br>
<br>               default:<br>                       # Internal error (message parsing, communication, ...)<br>                       xlog("L_INFO", "Call control: internal server error\n");<br>                       acc_aaa_request("500");<br>
                       sl_send_reply("500", "Internal server error");<br>                       exit;<br>              }<br><br>}<br><br><br>-- <br>Thanking You,<br>Ashwini BR Naidu<br>