yes i do call the call_control function on the first invite.<br><br><br>Here is the piece ot code<br>#-------------------------Dialog Params---------------------------<br>modparam(&quot;dialog&quot;, &quot;db_url&quot;, &quot;mysql://opensips:opensipsrw@localhost/opensips&quot;)<br>
modparam(&quot;dialog&quot;, &quot;db_mode&quot;, 1)<br>modparam(&quot;dialog&quot;, &quot;dlg_flag&quot;, 5)<br><br>#---------------Call Control---------------------<br>modparam(&quot;call_control&quot;, &quot;disable&quot;, 0)<br>
modparam(&quot;call_control&quot;, &quot;signaling_ip_avp&quot;, &quot;$avp(s:signaling_ip)&quot;)<br><br>route{<br>    #^M<br>    # -- 1 -- Request Validation ^M<br>    #^M<br>    if (!mf_process_maxfwd_header(&quot;10&quot;)) {^M<br>
        sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);^M<br>        exit;^M<br>    };^M<br>    if (msg:len &gt;=  2048 ) {^M<br>        sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);^M<br>        exit;^M<br>
    };^M<br>    #^M<br>    # -- 2 -- Routing Preprocessing^M<br>    #^M<br>    ## Record-route all except Register^M<br>    ## Mark packets with nat=yes^M<br>    ## This mark will be used to identify the request in the loose   ^M<br>
    ## route section^M<br>    if(!is_method(&quot;REGISTER&quot;)){^M<br>        if(nat_uac_test(&quot;19&quot;)){^M<br>            record_route(&quot;;nat=yes&quot;);^M<br>        } else {^M<br>            record_route();^M<br>
        };^M<br>    };^M<br><br>    ##Loose_route packets^M<br>    if (has_totag()) {^M<br>        #sequential request withing a dialog should^M<br>        # take the path determined by record-routing^M<br>        if (loose_route()) {^M<br>
#---------------------------RADIUS LOGING----------------------------------------#<br>                if(method==&quot;BYE&quot;) {<br>        #               #Account BYE transactions<br>                        log(1,&quot;\nFLAG IS SET TO 2\n&quot;);<br>
                        setflag(1);<br>                        ## for free radius logging<br>                        setflag(3);<br>                        setflag(20);     # For sip trace;<br>                };<br><br>#------------------------END OF RADIUS LOGING------------------------------------#<br>
<br><br>            #Check authentication of re-invites^M<br>            if(method==&quot;INVITE&quot; &amp;&amp; (!allow_trusted())) { ^M<br>                if (!proxy_authorize(&quot;&quot;,&quot;subscriber&quot;)) {^M<br>
                   proxy_challenge(&quot;&quot;,&quot;1&quot;);^M<br>                   exit;^M<br>                } else if (!check_from()) {^M<br>                   sl_send_reply(&quot;403&quot;, &quot;Forbidden, use From=ID&quot;);^M<br>
                   exit;^M<br>                };^M<br>            };^M<br>            if(method==&quot;BYE&quot; || method==&quot;CANCEL&quot;) {^M<br>                 unforce_rtp_proxy();<br>                 #end_media_session();^M<br>
            };^M<br>            ##Detect requests in the dialog behind NA, flag with 6^M<br>            if(nat_uac_test(&quot;19&quot;) || search(&quot;^Route:.*;nat=yes&quot;)){^M<br>                append_hf(&quot;P-hint: LR|fixcontact,setflag6\r\n&quot;);^M<br>
                fix_contact();^M<br>                setbflag(6);^M<br>            };^M<br>            route(1);^M<br>        } else {^M<br>            sl_send_reply(&quot;404&quot;,&quot;Not here&quot;);^M<br>        }^M<br>
        exit;^M<br>    }^M<br>    #CANCEL processing^M<br>    if (is_method(&quot;CANCEL&quot;)) {^M<br>        if (t_check_trans()) {^M<br>            unforce_rtp_proxy();<br>            #end_media_session(); ^M<br>            t_relay();^M<br>
        };   ^M<br>            exit;^M<br>      }^M<br>    t_check_trans();^M<br>    # ^M<br>    # -- 3 -- Determine Request Target^M<br>    #^M<br>    if (method==&quot;REGISTER&quot;) {^M<br>    log(1,&quot;--------REGISTER LOOP IN MAIN ROUTE\n&quot;);^M<br>
        route(2);^M<br>    } else {^M<br>         if ((method==&quot;INVITE&quot; &amp;&amp; !has_totag())) {<br>                setflag(5);<br>                # you need to call this function at the first INVITE<br>                $var(retcode) = call_control();<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_rad_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_rad_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>
                        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_rad_request(&quot;500&quot;);<br>
                       sl_send_reply(&quot;500&quot;, &quot;Internal server error&quot;);<br>                       exit;<br>                }      <br>         }<br>        route(3);^M<br>    };^M<br>}<br><br><br>But how can i change the permissions for mi_connector. Please mention if i have to add or modify anything in the code<br>
<br><div class="gmail_quote">On Thu, Apr 2, 2009 at 12:28 PM, Dan Pascu <span dir="ltr">&lt;<a href="mailto:dan@ag-projects.com">dan@ag-projects.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Thursday 02 April 2009, ASHWINI NAIDU wrote:<br>
&gt; hi all,<br>
&gt;    I have installed opensips-1.5 with cdrtool-6.7.5 and call controller<br>
&gt; working with it. when a prepaid call is made the real time call cut-off<br>
&gt; doesn&#39;t happen when the balance tends to nil or low. i get the<br>
&gt; following warning on opensips<br>
&gt;<br>
&gt; *WARNING:call_control:postprocess_request: dialog to trace controlled<br>
&gt; call was not created. discarding callcontrol.*<br>
&gt;<br>
&gt; The following errors w.r.t call controller<br>
&gt;<br>
&gt; *Mar 30 15:01:08 debian call-control[6468]: error: failed to end<br>
&gt; dialog: OpenSIPS command did timeout<br>
&gt;<br>
&gt; Mar 30 15:02:13 debian call-control[6468]: error: failed to end dialog:<br>
</div>&gt; :dlg_end_dlg:*<br>
<br>
The opensips unix datagram mi interface is not available or you do not<br>
have the rights to use it.<br>
<div class="im"><br>
&gt;<br>
&gt; can any one help me out with this problem. How i can create a dialog.<br>
<br>
</div>The dialog is created automatically for you by t_relay(), if you loaded<br>
the dialog module and configured it.<br>
Do you call call_control() on the 1st INVITE (and only then)?<br>
<br>
--<br>
<font color="#888888">Dan<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Thanking You,<br>Ashwini BR Naidu<br>