[asterisk-users] Assigning an extension to a roaming phone
Carlos Chavez
cursor at telecomabmex.com
Tue Feb 22 10:28:13 CST 2011
On Fri, 2011-02-18 at 12:36 +0100, Axelle wrote:
> 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 think you are confusing extensions with SIP usernames. In order to
dial anything on your system you already need to know the "name" of the
SIP phone (unless you are not doing authentication which is a bad idea).
That way you can use Dial(SIP/sipphone). If you want to assign an an
extension to this sipphone you need to save the username to your
database to a key maybe like roam/123. That way when you lookup
roam/123 from the database you get the username of the phone and insert
that into your dial command.
--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez Prats
Director de Tecnología
+52-55-91169161 ext 2001
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110222/bd13f59c/attachment.pgp>
More information about the asterisk-users
mailing list