[asterisk-users] Assigning an extension to a roaming phone
Warren Selby
wcselby at selbytech.com
Thu Feb 24 11:57:32 CST 2011
On Thu, Feb 24, 2011 at 7:31 AM, Axelle <aafortinet at gmail.com> wrote:
> Hi Danny,
>
Try this code, it uses the SIPCHANINFO function to get the peername of the
device that's attempting to create the roaming extension, instead of the
callerid. Basically, you need to store some kind of contact info for the
roaming phone for it to be any use at all. If you don't have a peername for
the phone, you could try SIPCHANINFO(peerip) instead.
[roaming-ext]
;Create a new roaming extension
exten => 3001,1(readop),Verbose(Create roaming extension)
exten => 3001,n,Read(digito,beep,3)
exten => 3001,n,Playback(you-entered)
exten => 3001,n,SayDigits(${digito})
exten => 3001,n,Verbose(Setting roaming extension 4${digito} to call
${SIPCHANINFO(peername)})
exten => 3001,n,Set(DB(roam/${digito})=${SIPCHANINFO(peername)})
exten => 3001,n,Playback(vm-goodbye)
exten => 3001,n,Hangup()
;Dial a roaming extension
exten => _4XXX,1,Verbose(Calling roaming extension ${EXTEN})
exten => _4XXX,n,Set(ROAMEXT=${DB(roam/${EXTEN:1})})
exten => _4XXX,n,Dial(SIP/${ROAMEXT},30)
--
Thanks,
--Warren Selby, dCAP
http://www.selbytech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110224/afa0cc07/attachment.htm>
More information about the asterisk-users
mailing list