[Asterisk-Users] divert if not here

Andrew Thompson asteriskuser at aktzero.com
Tue Oct 12 06:09:55 MST 2004


Dave Cotton wrote:
> On Tue, 2004-10-12 at 11:20 +0200, Altus Syman wrote:
> 
>>Good day all
>>We have a pbx system running sip and sipphone(Bughtone)
>>My question is.If a user is not at their desk,how do I tell it if a call 
>>comes in it should direct it to someone else
>>Do I need a different phone for this?The only other way is that they 
>>have to switch it off and in my dialplan on stem 2 I will have to say go 
>>to that user?
>>Please give advice on this
> 
> 
> You could set up something like:-
> 
> ;Call Forwarding
> ;
> ;on
> ;
> exten => ${CFIM_ON},1,DBput(CFIM/${CALLERIDNUM}=${EXTEN:4})
> exten => ${CFIM_ON},2,Playback(call-forwarding)
> exten => ${CFIM_ON},3,Playback(has-been-set-to)
> exten => ${CFIM_ON},4,Playback(extension)
> exten => ${CFIM_ON},5,SayDigits(${EXTEN:4})
> exten => ${CFIM_ON},6,Wait(2)
> exten => ${CFIM_ON},7,Hangup
> ;
> ;status
> ;
> exten => ${CFIM_STATUS},1,DBget(TEMP=CFIM/${CALLERIDNUM})
> exten => ${CFIM_STATUS},2,Playback(call-forwarding)
> exten => ${CFIM_STATUS},3,Playback(is-currently)
> exten => ${CFIM_STATUS},4,Playback(digits/2)
> exten => ${CFIM_STATUS},5,Playback(extension)
> exten => ${CFIM_STATUS},6,SayDigits(${TEMP})
> exten => ${CFIM_STATUS},7,Goto(105)
> exten => ${CFIM_STATUS},102,Playback(call-forwarding)
> exten => ${CFIM_STATUS},103,Playback(is-currently)
> exten => ${CFIM_STATUS},104,Playback(disabled)
> exten => ${CFIM_STATUS},105,Wait(2)
> exten => ${CFIM_STATUS},106,Hangup
> ;
> ;off
> ;
> exten => ${CFIM_OFF},1,DBdel(CFIM/${CALLERIDNUM})
> exten => ${CFIM_OFF},2,Playback(call-forwarding)
> exten => ${CFIM_OFF},3,Playback(has-been)
> exten => ${CFIM_OFF},4,Playback(disabled)
> exten => ${CFIM_OFF},5,Wait(2)
> exten => ${CFIM_OFF},6,Hangup
> ;
> and then check the status of CFIM for each call.
> 
>  

I just want to make sure I'm reading this right. You're using three 
variables here, CFIM_ON, CFIM_STATUS, and CFIM_OFF, right? So somewhere 
above this section of code, you've defined them like:

CFIM_STATUS=*10
CFIM_ON=*11
CFIM_OFF=*12

I didn't realize you could put variables in as the extensions.

This could be the beginning of some kind of "dial-plan modules" 
collection, where you post your macro or dial plan logic and show sample 
usage.

-- 
Andrew Thompson
http://aktzero.com/



More information about the asterisk-users mailing list