| View previous topic :: View next topic |
| Author |
Message |
pronini
Joined: 21 Jun 2008 Posts: 24 Status: Offline
|
Posted: Wed Nov 25, 2009 17:31 Post subject: username != authname |
|
|
Добрый день.
Есть asterisk 1.6.0.17.
Есть несколько десятков сипов в sip.conf. Хочется сделать, чтобы клиенты, при авторизации на asterisk, использовали в качестве логина не номер сипа (callerid(num)), а какой-нибудь другой username. Каким параметром это задается?
Пример:
| Code: |
[office](!)
type=friend
host=dynamic
context=PBX
nat=yes
canreinvite=no
dtfmmode=rfc2833
callgroup=1
pickupgroup=1
disallow = all
allow = alaw
allow = ulaw
[201](office)
callerid = 201
secret = qwerty
mailbox = 201@PBX
|
Чтобы в качестве логина для SIP/201 использовался не 201, а какой-то другой authname.
Спасибо. |
|
| Back to top |
|
 |
jooohny
Joined: 18 Feb 2009 Posts: 120 Status: Offline
|
Posted: Wed Nov 25, 2009 18:09 Post subject: |
|
|
а
кто-то отменил? |
|
| Back to top |
|
 |
xelas
Joined: 05 Mar 2007 Posts: 251 Status: Offline
|
Posted: Thu Nov 26, 2009 08:04 Post subject: |
|
|
Да, отменил.
sip.conf.sample:
| Quote: |
;------- Naming devices ------------------------------------------------------
;
; When naming devices, make sure you understand how Asterisk matches calls
; that come in.
; 1. Asterisk checks the SIP From: address username and matches against
; names of devices with type=user
; The name is the text between square brackets [name]
; 2. Asterisk checks the From: addres and matches the list of devices
; with a type=peer
; 3. Asterisk checks the IP address (and port number) that the INVITE
; was sent from and matches against any devices with type=peer
;
; Don't mix extensions with the names of the devices. Devices need a unique
; name. The device name is *not* used as phone numbers. Phone numbers are
; anything you declare as an extension in the dialplan (extensions.conf).
;
; When setting up trunks, make sure there's no risk that any From: username
; (caller ID) will match any of your device names, because then Asterisk
; might match the wrong device.
;
; Note: The parameter "username" is not the username and in most cases is
; not needed at all. Check below. In later releases, it's renamed
; to "defaultuser" which is a better name, since it is used in
; combination with the "defaultip" setting. |
|
|
| Back to top |
|
 |
|
|
jooohny
Joined: 18 Feb 2009 Posts: 120 Status: Offline
|
Posted: Thu Nov 26, 2009 08:31 Post subject: |
|
|
тогда так
| Code: |
[blablauser]
callerid = 201
secret = qwerty
mailbox = 201@PBX
|
|
|
| Back to top |
|
 |
pronini
Joined: 21 Jun 2008 Posts: 24 Status: Offline
|
Posted: Thu Nov 26, 2009 11:28 Post subject: |
|
|
| Нет. Тогда становится SIP/blablauser. |
|
| Back to top |
|
 |
Lonely_Ghost
Joined: 15 Jan 2007 Posts: 200 Location: Украина, Киев Status: Offline
|
Posted: Thu Nov 26, 2009 11:37 Post subject: |
|
|
| xelas wrote: | Да, отменил.
|
Господа, читать разучились?
| Code: | | defaultuser=blablabla |
|
|
| Back to top |
|
 |
|
|
pronini
Joined: 21 Jun 2008 Posts: 24 Status: Offline
|
Posted: Thu Nov 26, 2009 11:56 Post subject: |
|
|
| Нет. defaultuser не помогает. username, authname - тоже. |
|
| Back to top |
|
 |
xelas
Joined: 05 Mar 2007 Posts: 251 Status: Offline
|
Posted: Thu Nov 26, 2009 13:12 Post subject: |
|
|
Вы плохо прочли выделенные мной моменты, повторю один из них еще раз:
; Don't mix extensions with the names of the devices. Devices need a unique
; name. The device name is *not* used as phone numbers. Phone numbers are
; anything you declare as an extension in the dialplan (extensions.conf). |
|
| Back to top |
|
 |
pronini
Joined: 21 Jun 2008 Posts: 24 Status: Offline
|
Posted: Thu Nov 26, 2009 14:09 Post subject: |
|
|
Я Вас понял. Спасибо.
Придется переписвать extensions.conf |
|
| Back to top |
|
 |
|
|