Ticket #2619 (new Feature Requests)

Opened 11 months ago

Last modified 4 months ago

Restrict Call Forward settings to current extension

Reported by: jgott Assigned to:
Priority: minor Milestone: 2.6
Component: Call Forward Version:
Keywords: Cc:
Confirmation: Confirmed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

Someone in the forum said to post this over here so it doesn't get lost. Forgive me if I'm doing this wrong.

I don't like the way that a user can set call forward information for other users on the system. A rogue user could redirect someone else's calls to his/her extension. I also didn't like having two access codes to enable and disable call forward data. To "fix" this I disabled all call forward feature codes except for *52, *72, and *90 and placed the following in my extensions_custom.conf. These contexts in _custom are caught first in the dialplan before the built-in call forward contexts. Dial the code once and you will be prompted for the extension to forward to. Dial the code again and the forward is deactivated.

[from-internal-custom]
include => custom-CALLFORWARD

[custom-CALLFORWARD]
;callforward-busy
exten => *90,1,Answer
exten => *90,n,Wait(1)
exten => *90,n,Macro(user-callerid,)
exten => *90,n,Playback(call-fwd-on-busy)
exten => *90,n,Set(CFEXTEN=${DB(CFB/${AMPUSER})})
exten => *90,n,GotoIf($["foo${CFEXTEN}"="foo"]?startread)
exten => *90,n,dbDel(CFB/${AMPUSER})
exten => *90,n,Playback(de-activated)
exten => *90,n,Macro(hangupcall,)
exten => *90,n(startread),Playback(ent-target-attendant)
exten => *90,n,Read(CFEXTEN,then-press-pound,,,,)
exten => *90,n,GotoIf($["foo${CFEXTEN}"="foo"]?startread)
exten => *90,n,Set(DB(CFB/${AMPUSER})=${CFEXTEN})
exten => *90,n,Playback(call-fwd-on-busy&for&extension)
exten => *90,n,SayDigits(${AMPUSER})
exten => *90,n,Playback(is-set-to)
exten => *90,n,SayDigits(${CFEXTEN})
exten => *90,n,Macro(hangupcall,)

;callforward-all
exten => *72,1,Answer
exten => *72,n,Wait(1)
exten => *72,n,Macro(user-callerid,)
exten => *72,n,Playback(call-fwd-unconditional)
exten => *72,n,Set(CFEXTEN=${DB(CF/${AMPUSER})})
exten => *72,n,GotoIf($["foo${CFEXTEN}"="foo"]?startread)
exten => *72,n,dbDel(CF/${AMPUSER})
exten => *72,n,Playback(de-activated)
exten => *72,n,Macro(hangupcall,)
exten => *72,n(startread),Playback(ent-target-attendant)
exten => *72,n,Read(CFEXTEN,then-press-pound,,,,)
exten => *72,n,GotoIf($["foo${CFEXTEN}"="foo"]?startread)
exten => *72,n,Set(DB(CF/${AMPUSER})=${CFEXTEN})
exten => *72,n,Playback(call-fwd-unconditional&for&extension)
exten => *72,n,SayDigits(${AMPUSER})
exten => *72,n,Playback(is-set-to)
exten => *72,n,SayDigits(${CFEXTEN})
exten => *72,n,Macro(hangupcall,)

;callforward-no-answer
exten => *52,1,Answer
exten => *52,n,Wait(1)
exten => *52,n,Macro(user-callerid,)
exten => *52,n,Playback(call-fwd-no-ans)
exten => *52,n,Set(CFEXTEN=${DB(CFU/${AMPUSER})})
exten => *52,n,GotoIf($["foo${CFEXTEN}"="foo"]?startread)
exten => *52,n,dbDel(CFU/${AMPUSER})
exten => *52,n,Playback(de-activated)
exten => *52,n,Macro(hangupcall,)
exten => *52,n(startread),Playback(ent-target-attendant)
exten => *52,n,Read(CFEXTEN,then-press-pound,,,,)
exten => *52,n,GotoIf($["foo${CFEXTEN}"="foo"]?startread)
exten => *52,n,Set(DB(CFU/${AMPUSER})=${CFEXTEN})
exten => *52,n,Playback(call-fwd-no-ans&for&extension)
exten => *52,n,SayDigits(${AMPUSER})
exten => *52,n,Playback(is-set-to)
exten => *52,n,SayDigits(${CFEXTEN})
exten => *52,n,Macro(hangupcall,)

Change History

01/12/08 08:47:07 changed by p_lindheimer

  • confirmation changed from Unreviewed to Confirmed.
  • version deleted.
  • milestone changed from Cut Line to 3.0.

will review in future milestone.

03/31/08 02:58:29 changed by Nick_Lewis

Consider using the revised call forwarding module posted under ticket 2762. While it does not restrict call forward settings to the current extension, one of the things it does do is separate call forwarding settings of other extensions into separate feature codes which can be individually disabled

The revision in ticket 2762 does not add anything to extensions_custom.conf but instead it replaces two freepbx files:
/var/www/html/admin/modules/callforward/functions.inc.php
/var/www/html/admin/modules/callforward/install.php

07/05/08 15:02:00 changed by lazytt

see also #2762

07/22/08 23:34:45 changed by p_lindheimer

  • owner changed.
  • component changed from Feature Code Admin to Call Forward.

07/24/08 20:50:03 changed by p_lindheimer

  • milestone changed from 2.5 to 3.0.
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads