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==&quot;INVITE&quot; &amp;&amp; !has_totag())) {<br>if ( is_avp_set(&quot;$avp(s:from_alias)&quot;)) {<br>                    uac_replace_from(&quot;$fU&quot;,&quot;$avp(s:from_alias)&quot;);<br>            $avp(s:billing_party)=$avp(s:from_alias);<br>
                    $avp(i:805)=$(avp(s:from_alias){uri.user})+&quot;@&quot;+$(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(&quot;L_INFO&quot;,&quot;\n 1. ***************** RETURN CODE=$var(retcode)&quot;);<br>                xlog(&quot;L_INFO&quot;,&quot;\n 2. ***************** RETURN CODE=$var(retcode)&quot;);<br>                xlog(&quot;L_INFO&quot;,&quot;\n 3. ***************** RETURN CODE=$var(retcode)&quot;);<br>
                xlog(&quot;L_INFO&quot;,&quot;\n The call is From: $fu *************To:$tu******************************** Contact: $ct*************UA=[$ua]\n&quot;);<br><br>                switch ($var(retcode)){<br><br>
                case -1:<br>                       # Not enough credit (prepaid call)<br>                       xlog(&quot;L_INFO&quot;, &quot;Call control: not enough credit for prepaid call\n&quot;);<br>                       acc_aaa_request(&quot;402&quot;);<br>
                       sl_send_reply(&quot;402&quot;, &quot;Not enough credit&quot;);<br>                       exit;<br>                       break;<br>                case -2:<br>                       # Locked by call in progress (prepaid call)<br>
                       xlog(&quot;L_INFO&quot;, &quot;Call control: prepaid call locked by another call in progress\n&quot;);<br>                       acc_aaa_request(&quot;403&quot;);<br>                       sl_send_reply(&quot;403&quot;, &quot;Call locked by another call in progress&quot;);<br>
                       exit;<br>                       break;<br><br>                case 1:<br>                       # Call with a limit under callcontrol management (either prepaid or postpaid)<br>                        xlog(&quot;L_INFO&quot;, &quot;Call control: Inside 1 for pre paid\n&quot;);<br>
                        break;<br><br>                case 2:<br>                        xlog(&quot;L_INFO&quot;, &quot;Call control: Inside 2 for post paid\n&quot;);<br>                       # Call with no limit<br>                        break;<br>
<br>               default:<br>                       # Internal error (message parsing, communication, ...)<br>                       xlog(&quot;L_INFO&quot;, &quot;Call control: internal server error\n&quot;);<br>                       acc_aaa_request(&quot;500&quot;);<br>
                       sl_send_reply(&quot;500&quot;, &quot;Internal server error&quot;);<br>                       exit;<br>              }<br><br>}<br><br><br>-- <br>Thanking You,<br>Ashwini BR Naidu<br>