<div dir="ltr">Hi
<div>I have a kamailio server that sends calls to FS, calls then get routed to a VOIP provider. This works just fine, but calls dont get billed and it seems billing is not initialized for the calls at hand </div><div><br>
</div><div>Below is the output for the FS console for such a call :</div><div><br></div><div><div>freeswitch@fs-100-151> 2012-04-10 13:52:16.102555 [NOTICE] switch_channel.c:926 New Channel sofia/internal/support1@Kamailio.IP [e41ebdb3-eac2-4104-bad2-ed802bb8e26f]</div>
<div>2012-04-10 13:52:16.102555 [INFO] mod_dialplan_xml.c:485 Processing support1 <support1>->0091111111 in context public</div><div>2012-04-10 13:52:16.102555 [NOTICE] switch_ivr.c:1717 Transfer sofia/internal/support1@kamailio.ip to XML[009611111111@default]</div>
<div>2012-04-10 13:52:16.102555 [INFO] mod_dialplan_xml.c:485 Processing support1 <support1>->009611111111 in context default</div><div>2012-04-10 13:52:16.122486 [NOTICE] switch_channel.c:926 New Channel sofia/external/85719611111111 [92118bd1-cddd-4854-b303-2525212961f6]</div>
<div>2012-04-10 13:52:17.503477 [NOTICE] sofia_glue.c:4040 Pre-Answer sofia/external/85719611111111!</div><div>2012-04-10 13:52:17.503477 [INFO] switch_ivr_originate.c:3215 Sending early media</div><div>2012-04-10 13:52:17.503477 [NOTICE] mod_sofia.c:2585 Pre-Answer sofia/internal/support1@kamailio.ip!</div>
<div>2012-04-10 13:52:17.863305 [INFO] switch_rtp.c:3207 Auto Changing port from ip1:56854 to ip2:56854</div><div>2012-04-10 13:52:20.143135 [NOTICE] sofia.c:6214 Channel [sofia/external/12349611111111] has been answered</div>
<div>2012-04-10 13:52:20.163119 [NOTICE] switch_ivr_bridge.c:417 Channel [sofia/internal/support1@Kamailio.IP] has been answered</div></div><div><br></div><div>I did check the active calls and checked billing status it says not initialized for call, see :</div>
<div><br></div><div><div>freeswitch@fs-100-151> nibblebill e41ebdb3-eac2-4104-bad2-ed802bb8e26f check</div><div><br></div><div><br></div><div>2012-04-10 13:53:44.602951 [INFO] mod_nibblebill.c:759 Can't check - channel is not initialized for billing!</div>
</div><div><br></div><div>Unloading and loading mod_nibblebill occurs without any errors, see :</div><div><br></div><div><div>freeswitch@fs-100-151> unload mod_nibblebill</div><div><br></div><div>+OK</div><div><br></div>
<div>2012-04-10 13:57:05.043193 [NOTICE] switch_loadable_module.c:910 Deleting Application 'nibblebill'</div><div>2012-04-10 13:57:05.043193 [NOTICE] switch_loadable_module.c:963 Deleting API Function 'nibblebill'</div>
<div>2012-04-10 13:57:05.043193 [CONSOLE] switch_loadable_module.c:1784 Stopping: mod_nibblebill</div><div>2012-04-10 13:57:05.043193 [NOTICE] switch_event.c:1935 Event Binding deleted for mod_nibblebill:SESSION_HEARTBEAT</div>
<div>2012-04-10 13:57:05.043193 [CONSOLE] switch_loadable_module.c:1804 mod_nibblebill unloaded.</div><div>freeswitch@fs-100-151> load mod_nibblebill</div><div>2012-04-10 13:57:09.462673 [INFO] mod_nibblebill.c:228 Connected ODBC DSN: <a href="http://bandwidth.com">bandwidth.com</a></div>
<div>2012-04-10 13:57:09.462673 [CONSOLE] switch_loadable_module.c:1318 Successfully Loaded [mod_nibblebill]</div><div>2012-04-10 13:57:09.462673 [NOTICE] switch_loadable_module.c:254 Adding Application 'nibblebill'</div>
<div>2012-04-10 13:57:09.462673 [NOTICE] switch_loadable_module.c:298 Adding API Function 'nibblebill'</div><div><br></div><div>+OK Reloading XML</div><div>+OK</div><div><br></div><div>freeswitch@fs-100-151> 2012-04-10 13:57:09.462673 [INFO] mod_enum.c:812 ENUM Reloaded</div>
<div>2012-04-10 13:57:09.462673 [INFO] switch_time.c:1128 Timezone reloaded 530 definitions</div></div><div><br></div><div>My dialplan includes the following :</div><div><br></div><div><div><include></div><div> <extension name="Dial Out to Custom GW"></div>
<div> <condition field="destination_number" expression="(\d{10})$"></div><div> <action application="set" data="nibble_account=${accountcode}"/></div>
<div> <action application="set" data="nibble_rate=0.30"/></div><div> <action application="bridge" data="sofia/gateway/custom/1234$1"/></div>
<div> </condition></div><div> </extension></div><div></include></div></div><div><br></div><div>Thanks</div><div><br></div><div><br></div></div>