[asterisk-users] How to list used extensions + assign extension toa roaming phone

Danny Nicholas danny at debsinc.com
Wed Dec 22 15:46:47 UTC 2010


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Axelle
Sent: Wednesday, December 22, 2010 9:15 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] How to list used extensions + assign extension toa
roaming phone

Hi list,

I have searched through asterisk command lines but haven't found how to do
this:

- can I list the phones (callerid or IMSIs?) currently registered ?
If I do "dialplan show" that lists the configuration I loaded, e.g
[ Context 'sip-local' created by 'pbx_config' ]
  '2102' =>         1. Macro(dialSIP|IMSI1)         [pbx_config]
  '2103' =>         1. Macro(dialSIP|IMSI2)         [pbx_config]
  '2104' =>         1. Macro(dialSIP|IMSI3)         [pbx_config]
but it does not tell me who is actually registered or using the
network, maybe only 2102.

- is it possible to assign a given number/range of numbers (extension)
to a phone which roams into my network (open registration)?

Thanks
Axelle

For question 1, I think "sip show peers" is what you want.  For question 2,
here are two ways to do it.

#1 dial "fixed" number using 2000-2999
Exten => 2xxx,1,dial(SIP/foo)

#2 assign number using 3001, then dial it with 2000-2999
exten => 3001,1(readop),BackGround(beep)
exten => 3001,n,Read(digito,assignroam,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 => 2xxx,1,Set(ROAM=${DB(roam/ext)})
exten => 2xxx,n,dial(SIP/${ROAM})






More information about the asterisk-users mailing list