[Freeswitch-dev] Implementing Forward-{All, Busy, NoAnswer}, ring policies and DND in FS
Hello, *Context*: --------- I want to implement the following in mod_skinny (FS-3048 and FS-3047) in a way shared with other endpoints modules: - call forwarding[cfw], - DND and ring policies *Call forwarding*: --------- There are three main kinds of forwarding: - forward all (immediately) - forward when line is busy - forward when no answer We should also store for each the state of the forwarding (enabled or not). I think a reasonable default here would be: - to forward "no answer" to voicemail (and enabled) - to forward busy to voicemail (but disabled) - to forward all to "" (and disabled) We also should define what a busy line is, especially on shared lines (perhaps define a busy threshold, defaulting to 1). Call forwarding should be implemented in dialplan, but endpoint modules should know when a call is forwarded (the bridge event is probably sufficient). *Ring policies and DND*: --------- A do-not-disturb flag can be set on an extension so that the phone doesn't ring (but the user still knows he/she is called). DND is a specific case of ring policies. I propose the following default ring policies: - on idle: ring, blink (toggled to blink with DND button) - on busy: blink only (also available: ring once) This should be implemented per endpoint module. *Proposal*: --------- I propose to use hashes to store the various data: <action application="hash" data="insert/${realm}/${extension}/${data}"/> Where ${realm} is one of: - ${domain_name}-forward-{all,busy,noanswer}-destination: a destination number - ${domain_name}-forward-{all,busy,noanswer}-status: true/false - ${domain_name}-busy-threshold: [0-9]+ - ${domain_name}-ring-on-idle: true/false/once - ${domain_name}-blink-on-idle: true/false - ${domain_name}-ring-on-busy: true/false/once - ${domain_name}-blink-on-busy: true/false The dialplan should be enhanced to manage forwarding. The endpoint modules should be enhanced to manage forwarding (notify that the call has been forwarded) and ring policies. Does this makes sense? How can we improve it? *Next steps*: --------- - proposal discussion - forward-* dialplan implementation (I need help here, I am not an dialplan expert) - mod_skinny forward-* implementation FS-3048 - mod_skinny ring policies implementation FS-3047 - other endpoints implementation Regards Mathieu [cfw]: http://en.wikipedia.org/wiki/Call_forwarding [dnd]: http://en.wikipedia.org/wiki/Do_Not_Disturb_%28telecommunications%29
Hi, Back on this topic. 2011/4/14 Mathieu Parent <math.parent@gmail.com>:
Hello,
*Context*: ---------
I want to implement the following in mod_skinny (FS-3048 and FS-3047) in a way shared with other endpoints modules: - call forwarding[cfw], - DND and ring policies
I will focus on cfw first: as Marc Olivier suggested, this is more common in SIP.
*Call forwarding*: --------- There are three main kinds of forwarding: - forward all (immediately) - forward when line is busy - forward when no answer
We should also store for each the state of the forwarding (enabled or not).
I think a reasonable default here would be: - to forward "no answer" to voicemail (and enabled) - to forward busy to voicemail (but disabled) - to forward all to "" (and disabled)
We also should define what a busy line is, especially on shared lines (perhaps define a busy threshold, defaulting to 1).
Call forwarding should be implemented in dialplan, but endpoint modules should know when a call is forwarded (the bridge event is probably sufficient).
(snip)
*Proposal*: ---------
I propose to use hashes to store the various data:
<action application="hash" data="insert/${realm}/${extension}/${data}"/>
Where ${realm} is one of: - ${domain_name}-forward-{all,busy,noanswer}-destination: a destination number - ${domain_name}-forward-{all,busy,noanswer}-status: true/false - ${domain_name}-busy-threshold: [0-9]+
(...)
The dialplan should be enhanced to manage forwarding. The endpoint modules should be enhanced to manage forwarding (notify that the call has been forwarded) and ring policies.
Does this makes sense? How can we improve it?
I have doubt about mod_hash because it doesn't propagate hashes on remote servers (it does for limits only). Should I use mod_db instead?
*Next steps*: --------- - proposal discussion <-- we are still here ;-) - forward-* dialplan implementation (I need help here, I am not an dialplan expert) - mod_skinny forward-* implementation FS-3048 - mod_skinny ring policies implementation FS-3047 - other endpoints implementation
Regards
Mathieu
[cfw]: http://en.wikipedia.org/wiki/Call_forwarding [dnd]: http://en.wikipedia.org/wiki/Do_Not_Disturb_%28telecommunications%29
-- Mathieu
On Tue, May 10, 2011 at 3:19 PM, Mathieu Parent <math.parent@gmail.com> wrote:
I have doubt about mod_hash because it doesn't propagate hashes on remote servers (it does for limits only). Should I use mod_db instead?
+1 -- -Rupa
2011/5/10 Rupa Schomaker <rupa@rupa.com>:
On Tue, May 10, 2011 at 3:19 PM, Mathieu Parent <math.parent@gmail.com> wrote:
I have doubt about mod_hash because it doesn't propagate hashes on remote servers (it does for limits only). Should I use mod_db instead?
+1
Thinking wider, what we need is an updatable directory. The directory is by default stored as readonly XML files. Mod_voicemail currently workaround this (IMO) by creating an SQL table to store vm password. Couldn't we provide a more generic handler ? Proposal: add a new xml_int binding: "directory_update". ------------- With mod_xml_curl, the POST request will look like this: [hostname] => testmachine [section] => directory_update [tag_name] => domain [key_name] => name [key_value] => domain1.awesomevoipdomain.faketld [key] => id [user] => 1004 [domain] => domain1.awesomevoipdomain.faketld [set-param-forward-all-destination] => 1234 [set-param-forward-all-status] => 1 (POST variables prefixed with "set-param-" or "set-variable-" modify the relevant XML attribute) The xml_int should return either: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="success" /> </section> </document> or <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="not found" /> </section> </document> A new function is needed: SWITCH_DECLARE(switch_status_t) switch_xml_update_user(const char *key, const char *user_name, const char *domain_name, switch_event_t *params) Where params is an event containing the set-* variables. As mod_xml_curl is not configured by default, we need something to update XML files: any idea? I will start to implement the suggested proposal. -- Mathieu
It is important to not violate scope. Do not let one problem define your path. The goal is not to make the default a certain way. The goal is to scale from static configs to dynamic as seamlessly as possible. On May 14, 2011 4:20 AM, "Mathieu Parent" <math.parent@gmail.com> wrote:
2011/5/10 Rupa Schomaker <rupa@rupa.com>:
On Tue, May 10, 2011 at 3:19 PM, Mathieu Parent <math.parent@gmail.com> wrote:
I have doubt about mod_hash because it doesn't propagate hashes on remote servers (it does for limits only). Should I use mod_db instead?
+1
Thinking wider, what we need is an updatable directory. The directory is by default stored as readonly XML files. Mod_voicemail currently workaround this (IMO) by creating an SQL table to store vm password. Couldn't we provide a more generic handler ?
Proposal: add a new xml_int binding: "directory_update". -------------
With mod_xml_curl, the POST request will look like this:
[hostname] => testmachine [section] => directory_update [tag_name] => domain [key_name] => name [key_value] => domain1.awesomevoipdomain.faketld [key] => id [user] => 1004 [domain] => domain1.awesomevoipdomain.faketld [set-param-forward-all-destination] => 1234 [set-param-forward-all-status] => 1
(POST variables prefixed with "set-param-" or "set-variable-" modify the relevant XML attribute)
The xml_int should return either: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="success" /> </section> </document> or <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="not found" /> </section> </document>
A new function is needed: SWITCH_DECLARE(switch_status_t) switch_xml_update_user(const char *key,
const char *user_name,
const char *domain_name,
switch_event_t *params)
Where params is an event containing the set-* variables.
As mod_xml_curl is not configured by default, we need something to update XML files: any idea?
I will start to implement the suggested proposal.
-- Mathieu
_______________________________________________ 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
participants (3)
-
Anthony Minessale
-
Mathieu Parent
-
Rupa Schomaker