[Freeswitch-dev] Implementing Forward-{All, Busy, NoAnswer}, ring policies and DND in FS

Mathieu Parent math.parent at gmail.com
Thu Apr 14 16:57:48 MSD 2011



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.


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



[cfw]: http://en.wikipedia.org/wiki/Call_forwarding
[dnd]: http://en.wikipedia.org/wiki/Do_Not_Disturb_%28telecommunications%29

More information about the FreeSWITCH-dev mailing list