[asterisk-users] Assigning an extension to a roaming phone

Warren Selby wcselby at selbytech.com
Mon Feb 21 12:37:06 CST 2011


On Mon, Feb 21, 2011 at 11:33 AM, Danny Nicholas <danny at debsinc.com> wrote:

>
> [Feb 21 17:53:06] WARNING[26195]: chan_sip.c:2921 create_addr: No such
> host:
> 001
> [Feb 21 17:53:06] WARNING[26195]: app_dial.c:1202 dial_exec_full:
> Unable to create channel of type 'SIP' (cause 3 - No route to
> destination)
>

Your dialplan needs to be similar to the following (this is off the top of
my head, so you may need to adjust for typos or whatever):

[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
${CALLERID(num)})
exten => 3001,n,Set(DB(roam/${digito})=${CALLERID(num)})
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)

Then you need to include the [roaming-ext] context in whatever context your
phones dial from.  The basic idea behind this is that you need to store the
extension where your roamer is currently sitting in your DB, which you were
doing.  By adding the ${CALLERID(num)} to the database, you give it an idea
of where the calls should go.  Now, this means your ${CALLERID(num)}
variable needs to match your SIP endpoint's name, of course, but if these
don't currently match, I'm pretty sure there is a variable you can use to
achieve the same effect.


-- 
Thanks,
--Warren Selby, dCAP
http://www.selbytech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110221/38f1701d/attachment.htm>


More information about the asterisk-users mailing list