Extension Mobility

I’m looking into doing extension mobility on my asterisk server. I looked at this info:

voip-info.org/wiki/index.php … n+Mobility

It appears that extension mobility on Asterisk is, at this point, a hack using some of the call center capabilities.

I’m looking to have every phone have a primary extension for each person, but to allow that person to log into another phone using extension mobility. So their calls will temporarily ring on the phone the logged into, in addition to or instead of their primary extension.

Additionally, some of the users are in a different context by default. And I do not see a way to set the context of a mobility extension (as defined in agents.conf).

Is any of this possible at this point?

You could do this using some extensive dialplan trickery. I setup something similiar one time. Dialplan based call-forwarding, using astdb commands.

I’m afraid I no longer have the code to provide as an example, but it worked based on the internal caller ID settings.

For example, user A (ext 1001) walks to user B’s desk (ext 1002). User A decides to stay there for awhile and dials a special extension (leading to a context/macro). The macro reads the callerID (which is 1002) and stores this in a variable, then prompts the user to enter their normal extension (ext 1001). It then uses ASTDB commands to write an entry containing this data.

From this point, if you use a standard’ish macro-stdexten for voicemail handling etc, you can insert a GotoIf line based on the astdb entry status, if it’s empty, continue as normal. If there’s a value, instead of Dial()'ing 1001, Dial 1002 instead.

Hope that makes sense! You’re wanting to do the same thing I did, except instead of dialing a number using an outside zap channel, you want to ring an internal device instead. I’ll try and dig up the code I used to do this ages ago. It was pre-asterisk 1.0 I believe.

X

Oh Snap, I found it. This is some old school stuff, one of the very first things I wrote for asterisk dialplan wise. I doubt this stuff would even work if plugged in, but here ya go:

[call-forwarding]
exten => s,1,Playback(${SOUNDS}please-enter-your)
exten => s,2,Playback(${SOUNDS}extension)
exten => s,3,Read(CFWDEXTEN,,4)
exten => s,4,GotoIf($["${CFWDEXTEN}" = ""]?1:5)
exten => s,5,Authenticate(/etc/asterisk/pwdlist.conf)
exten => s,6,DBGet(temp=CFWD/${CFWDEXTEN})
exten => s,7,GotoIf($["${temp}" = ""]?8:108)
exten => s,8,Playback(${SOUNDS}call-forward)
exten => s,9,Playback(${SOUNDS}enter-phone-number10)
exten => s,10,Read(CFWDNUM,,10)
exten => s,11,Goto(call-forward-validate,s,1)
exten => s,107,Goto(s,8)
exten => s,108,Goto(call-forward-cancel,s,1)

[call-forward-validate]
exten => s,1,Background(${SOUNDS}you-entered)
exten => s,2,SayDigits(${CFWDNUM})
exten => s,3,Background(${SOUNDS}if-correct-press)
exten => s,4,SayDigits(1)
exten => s,5,Background(${SOUNDS}otherwise-press)
exten => s,6,SayDigits(2)
exten => 1,1,Goto(call-forward-validated,s,1)
exten => 2,1,Goto(call-forwarding,s,8)

[call-forward-validated]
exten => s,1,DBPut(CFWD/${CFWDEXTEN}=${CFWDNUM})
exten => s,2,Playback(${SOUNDS}call-forwarding)
exten => s,3,Playback(${SOUNDS}for)
exten => s,4,Playback(${SOUNDS}extension)
exten => s,5,SayDigits(${CFWDEXTEN})
exten => s,6,Playback(${SOUNDS}has-been-set-to)
exten => s,7,SayDigits(${CFWDNUM}})
exten => s,8,Playback(${SOUNDS}goodbye)
exten => s,9,Hangup

[call-forward-cancel]
exten => s,1,Background(${SOUNDS}call-forwarding)
exten => s,2,Background(${SOUNDS}is-currently)
exten => s,3,Background(${SOUNDS}enabled)
exten => s,4,Background(${SOUNDS}press-1)
exten => s,5,Background(vm-tocancel)
exten => 1,1,Goto(call-forward-delete,s,1)
exten => #,1,Goto(call-forward-delete,s,1)
exten => t,1,Goto(s,1)

[call-forward-delete]
exten => s,1,DBDel(CFWD/${CFWDEXTEN})
exten => s,2,Playback(${SOUNDS}call-fwd-cancelled)
exten => s,3,Playback(${SOUNDS}goodbye)
exten => s,4,Hangup

[macro-stdexten]
exten => s,1,Wait(1)
exten => s,2,GotoIf($[${CALLERIDNUM:0: 8} = (protecting the innocent)]?3:4)
exten => s,3,SetCIDNum(${CALLERIDNUM:6})
exten => s,4,DBGet(cfwd=CFWD/${ARG1})
exten => s,5,Dial(Zap/g1d/1${cfwd},20,t)
exten => s,6,Voicemail(u${ARG1})
exten => s,7,Wait(1)
exten => s,8,Hangup
exten => s,9,Dial(${ARG2},20,tr)
exten => s,10,Voicemail(u${ARG1})
exten => s,11,Wait(1)
exten => s,12,Hangup
exten => s,105,Goto(s,9)
exten => s,106,Voicemail(b${ARG1})
exten => s,107,Hangup
exten => s,110,Voicemail(b${ARG1})
exten => s,111,Wait(1)
exten => s,112,Hangup

Hope that gives you a clue!

X