-----Original Message-----
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Axelle
Sent: Friday, February 18, 2011 5:36 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Assigning an extension to a roaming phone

Hi,
I'm trying to automatically have the dialplan assign an extension to a
roaming phone on my network.
I tried the following without success:

exten => 3001,1(readop),BackGround(beep)
exten => 3001,n,Read(digito,vm-youhave,3)
exten => 3001,n,SayDigits(${digito})
exten => 3001,n,Set(ROAM=${digito})
exten => 3001,n,Set(DB(roam/ext)=${digito})
exten => 3001,n,playback(vm-goodbye)
exten => 3001,n,hangup
exten => _4XXX,1,Set(ROAM=${DB(roam/ext)})
exten => _4XXX,n,dial(SIP/${ROAM})

The idea was that the roaming phone first dials 3001, sets a 3 digits
extension (eg 123) and then I supposed that 4123 would work. But it
does not.
I am unsure about the 2 Set lines.
Can anyone help?
Regards

I'm thinking that _4XXX is an "over-complication".  _4XXX means you could
dial any number from 4000 through 4999 inclusive and get the extension at
SIP/${ROAM}. I'd change the line 2 

- exten => _4XXX,n,Dial(SIP/${ROAM},30,,mKkTt)
Or 
- exten => 4123,1,Dial(SIP/${ROAM},30,,mKkTt)


--
_____________________________________________________________________
-- 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