[Asterisk-Users] [Fwd: Call forwarding]

Andy Brezinsky andy at mbrez.com
Wed May 4 13:47:02 MST 2005


One of our asterisk guys, Mike Bell, hacked this into our pbx by doing the 
following:

- Setup a file: /var/pbx/followme that is a tab delimited file with extension  
and forward_to in it. (Example: 1001	1414xxxxxxx)

- Change our default dial to an AGI script called dial.cgi
exten => _10XX,1,Agi(dial.agi,${EXTEN})
exten => _10XX,2,Hangup

- Write a perl script that checks for the extension in the /var/pbx/followme 
file and if it's there, dials that instead (checks to see if it should use a 
SIP or ZAP channel first)

-Add in hooks for *29 (remove) and *29{X*} (forward) to another number:

exten => *29,1,Answer
exten => *29,2,Agi(FollowMe.agi,${CALLERIDNUM})
exten => *29,3,Hangup

exten => _*29.,1,Answer
exten => _*29.,2,Agi(followMe.agi,${CALLERIDNUM},${EXTEN:3})
exten => _*29.,3,Hangup

- Write a followme.cgi script that is passed the callerid, and an optional 
offsite phone number.  If the offsite number is there, it is added/updated in 
the followme file, otherwise it's just deleted

Hope this helps

-- 
~Andy Brezinsky

On Wednesday 04 May 2005 11:36 am, Damian Funnell wrote:
> Any takers?  Sometimes the most basic questions yield the least replies,
> huh?
>
> Cheers,
> Damian.
>
> -------- Original Message --------
> Subject: 	Call forwarding
> Date: 	Wed, 04 May 2005 08:40:41 +1200
> From: 	Damian Funnell <damian.funnell at fff.co.nz>
> To: 	Asterisk Users Mailing List - Non-Commercial Discussion
> <asterisk-users at lists.digium.com>
> References: 	<4251B3AB.30608 at davidson.id.au>
> <011701c53a15$2aaecc30$0a00a8c0 at HOUSTON>
>
>
>
> Hi team,
>
> Basic question I know, but I can't seem to find any obvious information
> about this:
>
> Does anyone know if * natively supports call forwarding from a given
> extension (i.e. call forwarding without having to write a macro)?
>
> My user wants to be able to dial a code plus a phone number to start
> diverting all calls to the given extension to that number.  Call
> forwarding would then be disabled by dialling a code number again.
>
> I expected that * would support this type of feature natively, but can't
> find anything in the wiki.  If responding please let me know if we need
> to enable anything in features.conf as well.
>
> Thanks in advance,
> Damian.
>
> FFF Managed Technology Ltd
> 60 Cook St
> P.O. 6368 Wellesley St
> Auckland
> t +64 9 356 2911
> f +64 9 358 9070
> m +64 21 415 297
> w www.fff.co.nz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050504/8166388e/attachment.pgp


More information about the asterisk-users mailing list