On Mon, Feb 21, 2011 at 11:33 AM, Danny Nicholas <[email protected]> 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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to