<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&gt; 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 &lt;support1&gt;-&gt;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 &lt;support1&gt;-&gt;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&gt; 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&#39;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&gt; 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 &#39;nibblebill&#39;</div><div>2012-04-10 13:57:05.043193 [NOTICE] switch_loadable_module.c:963 Deleting API Function &#39;nibblebill&#39;</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&gt; 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 &#39;nibblebill&#39;</div>

<div>2012-04-10 13:57:09.462673 [NOTICE] switch_loadable_module.c:298 Adding API Function &#39;nibblebill&#39;</div><div><br></div><div>+OK Reloading XML</div><div>+OK</div><div><br></div><div>freeswitch@fs-100-151&gt; 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>&lt;include&gt;</div><div>        &lt;extension name=&quot;Dial Out to Custom GW&quot;&gt;</div>

<div>                &lt;condition field=&quot;destination_number&quot; expression=&quot;(\d{10})$&quot;&gt;</div><div>                        &lt;action application=&quot;set&quot; data=&quot;nibble_account=${accountcode}&quot;/&gt;</div>

<div>                        &lt;action application=&quot;set&quot; data=&quot;nibble_rate=0.30&quot;/&gt;</div><div>                        &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/custom/1234$1&quot;/&gt;</div>

<div>                &lt;/condition&gt;</div><div>        &lt;/extension&gt;</div><div>&lt;/include&gt;</div></div><div><br></div><div>Thanks</div><div><br></div><div><br></div></div>