<p dir="ltr">Hi Kelvin, </p>
<p dir="ltr">this looks a lot like the classic dialog matching problem. Have you tried to use the example conf file that is provided with the module? Please try that as is, and copy the params of both dialog and cnxcc modparams to your script. </p>

<p dir="ltr">I will try to reply when i'm not touring around ;-). </p>
<p dir="ltr">Regards, <br>
Carlos </p>
<div class="gmail_quote">On Apr 8, 2014 9:18 PM, "Kelvin Chua" <<a href="mailto:kelchy@gmail.com">kelchy@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Wow rome! great choice carlos! enjoy your honeymoon! :)<div><br></div><div>here is what i did:</div><div><div><br></div><div>#!define FLD_CNXCC 5</div></div><div><div>modparam("cnxcc", "dlg_flag", FLD_CNXCC)</div>

</div><div>cnxcc_set_max_credit(1 , 196.9485 , 0.011000 , 6 , 6);</div><div><br></div><div><br></div><div>number_of_calls increments for every call and i never see max_amount going non-zero</div><div><div>client_id:6,number_of_calls:2,concurrent_calls:0,type:1,max_amount:0.000000,consumed_amount:0.000000;</div>

</div></div><div class="gmail_extra"><br clear="all"><div>Kelvin Chua</div>
<br><br><div class="gmail_quote">On Tue, Apr 8, 2014 at 5:19 AM, Daniel Grotti <span dir="ltr"><<a href="mailto:dgrotti@sipwise.com" target="_blank">dgrotti@sipwise.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Rome!<br>
Great choice! :)<br>
<br>
Daniel<br>
<div><br>
<br>
<br>
On 04/08/2014 10:31 AM, Carlos Ruiz Díaz wrote:<br>
> Hi Carsten,<br>
><br>
> that's right, I'm replying to this while I wait for a tour to the<br>
> Vatican City :-D ;-)<br>
><br>
> Cheers,<br>
><br>
><br>
> On Tue, Apr 8, 2014 at 3:27 AM, Carsten Bock <<a href="mailto:carsten@ng-voice.com" target="_blank">carsten@ng-voice.com</a><br>
</div><div>> <mailto:<a href="mailto:carsten@ng-voice.com" target="_blank">carsten@ng-voice.com</a>>> wrote:<br>
><br>
>     Hi Carlos,<br>
><br>
>     please remember: You're on your Honeymoon! :-)<br>
><br>
>     Enjoy Rome,<br>
>     Carsten<br>
><br>
>     2014-04-08 10:26 GMT+02:00 Carlos Ruiz Díaz<br>
</div>>     <<a href="mailto:carlos.ruizdiaz@gmail.com" target="_blank">carlos.ruizdiaz@gmail.com</a> <mailto:<a href="mailto:carlos.ruizdiaz@gmail.com" target="_blank">carlos.ruizdiaz@gmail.com</a>>>:<br>

<div>>     > Hi Kelvin,<br>
>     ><br>
>     > probably the dialog matching parameter is wrong, or something in the<br>
>     > parameter configuration of cnxcc.<br>
>     ><br>
>     > The value of max_amount is 0, because the call wasn't established<br>
>     or was<br>
>     > established and cnxcc couldn't detect it  (probably because of the dlg<br>
>     > matching, as I mentioned). It will retain this value for as long<br>
>     as the call<br>
>     > is in the "early" state.<br>
>     ><br>
>     > Check this example [1], it may help you.<br>
>     ><br>
>     > [1]<br>
>     ><br>
>     <a href="http://caruizdiaz.com/2014/04/04/cnxcc-prepaid-module-workshop-kamailio-world/" target="_blank">http://caruizdiaz.com/2014/04/04/cnxcc-prepaid-module-workshop-kamailio-world/</a><br>
>     ><br>
>     > Regards,<br>
>     ><br>
>     ><br>
>     ><br>
>     ><br>
>     > On Tue, Apr 8, 2014 at 3:04 AM, Kelvin Chua <<a href="mailto:kelchy@gmail.com" target="_blank">kelchy@gmail.com</a><br>
</div><div>>     <mailto:<a href="mailto:kelchy@gmail.com" target="_blank">kelchy@gmail.com</a>>> wrote:<br>
>     >><br>
>     >> i am trying to use cnxcc for the first time.<br>
>     >><br>
>     >> kamctl kamcmd cnxcc.active_clients<br>
>     >><br>
>     >><br>
>     >><br>
>     client_id:6,number_of_calls:1,concurrent_calls:0,type:1,max_amount:0.000000,consumed_amount:0.000000;<br>
>     >><br>
>     >> i don't think this is correct, seems like the dialog is not<br>
>     disengaging<br>
>     >> after i hang up.<br>
>     >> i created dialogs alongside cnxcc just to compare, all dialogs were<br>
>     >> disengaged.<br>
>     >> is this an expected behavior?<br>
>     >><br>
>     >> It's also weird that the max_amount is 0 while i checked that<br>
>     there is a<br>
>     >> value for credit being passed as an argument.<br>
>     >><br>
>     >><br>
>     >> Kelvin Chua<br>
>     >><br>
>     >> _______________________________________________<br>
>     >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users<br>
>     mailing list<br>
</div>>     >> <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a> <mailto:<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>><br>

<div>>     >> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>     >><br>
>     ><br>
>     ><br>
>     ><br>
>     > --<br>
>     > Carlos<br>
>     > <a href="http://caruizdiaz.com" target="_blank">http://caruizdiaz.com</a><br>
>     > <a href="http://ngvoice.com" target="_blank">http://ngvoice.com</a><br>
</div>>     > <a href="tel:%2B595981146623" value="+595981146623" target="_blank">+595981146623</a> <tel:%2B595981146623><br>
<div>>     ><br>
>     > _______________________________________________<br>
>     > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<br>
>     list<br>
</div>>     > <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a> <mailto:<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>><br>

<div>>     > <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>     ><br>
><br>
><br>
><br>
>     --<br>
>     Carsten Bock<br>
>     CEO (Geschäftsführer)<br>
><br>
>     ng-voice GmbH<br>
>     Schomburgstr. 80<br>
>     D-22767 Hamburg / Germany<br>
><br>
>     <a href="http://www.ng-voice.com" target="_blank">http://www.ng-voice.com</a><br>
</div>>     mailto:<a href="mailto:carsten@ng-voice.com" target="_blank">carsten@ng-voice.com</a> <mailto:<a href="mailto:carsten@ng-voice.com" target="_blank">carsten@ng-voice.com</a>><br>
><br>
>     Office <a href="tel:%2B49%2040%2034927219" value="+494034927219" target="_blank">+49 40 34927219</a> <tel:%2B49%2040%2034927219><br>
>     Fax <a href="tel:%2B49%2040%2034927220" value="+494034927220" target="_blank">+49 40 34927220</a> <tel:%2B49%2040%2034927220><br>
<div>><br>
>     Sitz der Gesellschaft: Hamburg<br>
>     Registergericht: Amtsgericht Hamburg, HRB 120189<br>
>     Geschäftsführer: Carsten Bock<br>
>     Ust-ID: DE279344284<br>
><br>
>     Hier finden Sie unsere handelsrechtlichen Pflichtangaben:<br>
>     <a href="http://www.ng-voice.com/imprint/" target="_blank">http://www.ng-voice.com/imprint/</a><br>
><br>
>     _______________________________________________<br>
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
</div>>     <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a> <mailto:<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>><br>

<div><div>>     <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Carlos<br>
> <a href="http://caruizdiaz.com" target="_blank">http://caruizdiaz.com</a><br>
> <a href="http://ngvoice.com" target="_blank">http://ngvoice.com</a><br>
> <a href="tel:%2B595981146623" value="+595981146623" target="_blank">+595981146623</a><br>
><br>
><br>
> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
> <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div>