[Freeswitch-dev] on_init hook and outgoing channels
alex at jajah.com
Sun Feb 24 10:12:57 MSK 2013
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?
From: freeswitch-dev-bounces at lists.freeswitch.org [mailto:freeswitch-dev-bounces at lists.freeswitch.org] On Behalf Of Alex Massover
Sent: Thursday, February 21, 2013 12:15 PM
To: freeswitch-dev at lists.freeswitch.org
Subject: [Freeswitch-dev] on_init hook and outgoing channels
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?
-------------- next part --------------
An HTML attachment was scrubbed...
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev