There probably is not a way. File a Jira as a feature Req for it.... On Feb 24, 2013 1:43 AM, "Alex Massover" <alex@jajah.com> wrote:
Hi,****
** **
After some research it looks like mod_sofia sends outgoing INVITE also from on_init hook and endpoint's hooks always happen before other modules hooks (core's behavior).****
** **
I see one way to take control over channel before it sends INVITE is to change states in mod_sofia. Could someone point me to more elegant solution, that doesn't require changing mod_sofia?****
I read on wiki that it's possible to add custom states, can it help somehow?****
** **
BR, Alex.****
** **
*From:* freeswitch-dev-bounces@lists.freeswitch.org [mailto: freeswitch-dev-bounces@lists.freeswitch.org] *On Behalf Of *Alex Massover *Sent:* Thursday, February 21, 2013 12:15 PM *To:* freeswitch-dev@lists.freeswitch.org *Subject:* [Freeswitch-dev] on_init hook and outgoing channels****
** **
Hello,****
** **
We have services that manage calls via ESL and want to write a custom authorization and billing module.****
** **
The idea is to catch any call received by FreeSwitch before service gets control on ESL for incoming call and on_init hook works for us.****
** **
But for outgoing channels (created by 'route' or 'originate' commands over ESL) on_init hook doesn't work. Well the channel hits the hook but already after outgoing INVITE being sent, although channel state goes from CS_NEW->CS_INIT->CS_ROUTING correctly. And I want to authorize the channel before it goes out.****
** **
Is that a normal behavior or I completely miss something? Is there other way to block an outgoing channel after it's created but before it goes out from a custom module?****
** **
--****
Best Regards,****
Alex Massover****
** **
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org