Summary:ASTERISK-01154: Roaming Extensions
Reporter:wsuff (wsuff)Labels:
Date Opened:2004-03-04 14:50:53.000-0600Date Closed:2011-06-07 14:05:02
Versions:Frequency of
Description:In reference to bug id ASTERISK-600102. I wrote some rather basic code to do simple roaming extensions


exten => s,1,DBget(caller=EXTEN/${ARG1})
exten => s,2,DBget(dnd=DND/${ARG1})
exten => s,3,Voicemail(u${ARG1})
exten => s,4,Hangup
exten => s,102,Macro(invalid)
exten => s,103,Dial(${caller},30,Tti)
exten => s,104,Voicemail(b${ARG1})
exten => s,105,Hangup

I modified all-exten to send 100-500 to that macro
exten => _[1-5]XX,1,Macro(stdexten,${EXTEN},${EXTEN})

Some Examples from my working DB
/EXTEN/10  : SIP/10
/EXTEN/101 : IAX2/wsuff
/EXTEN/500 : IAX2/wsuff

DND was modified to just use the exten # so it works for even roaming users
exten => s,1,DBget(dnd=DND/${ARG1})
exten => s,2,DBdel(DND/${ARG1})
exten => s,3,Playback(d)
exten => s,4,Playback(n)
exten => s,5,Playback(d)
exten => s,6,Wait(1)
exten => s,7,Playback(de-activated)
exten => s,8,Hangup
exten => s,102,DBput(DND/${ARG1}=YES)
exten => s,103,Playback(d)
exten => s,104,Playback(n)
exten => s,105,Playback(d)
exten => s,106,Wait(1)
exten => s,107,Playback(activated)
exten => s,108,Hangup

I had some problems using this w/ IAX softphones so I added an iax-invalid Not the cleanest but it works

exten => _X,1,Macro(invalid)
exten => _XX,1,Macro(invalid)
exten => _XXX,1,Macro(invalid)
exten => _XXXX,1,Macro(invalid)
exten => _XXXXX,1,Macro(invalid)
exten => _XXXXXX,1,Macro(invalid)
exten => _XXXXXXX,1,Macro(invalid)
exten => _XXXXXXXX,1,Macro(invalid)
exten => _XXXXXXXXX,1,Macro(invalid)
exten => _XXXXXXXXXX,1,Macro(invalid)
exten => _#X,1,Macro(invalid)
exten => _#XX,1,Macro(invalid)

Comments:By: Brian West (bkw918) 2004-04-16 18:02:43

Good idea.. join #asterisk-docs and submit it to them for inclusion in the examples section.