Asterisk Forum Forum Index Asterisk Forum
The Asterisk Open Source PBX - Russian Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RulesRules   UsergroupsUsergroups   LinksLinks   RegisterRegister 
 EmailEmail   ProfileProfile   Log in to check your private messages   Log inLog in 

Asterisk-1.4.36-rc1 
Asterisk-Addons-1.4.11 
Libpri-1.4.12-beta2 
Dahdi-Linux-2.4.0 
Dahdi-Tools-2.4.0 

username != authname

 
   Asterisk Forum Forum Index -> Newbies/FAQ Forum
View previous topic :: View next topic  
Author Message
pronini



Joined: 21 Jun 2008
Posts: 24

Status: Offline

PostPosted: Wed Nov 25, 2009 17:31    Post subject: username != authname Reply with quote

Добрый день.

Есть 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
View user's profile Send private message
jooohny



Joined: 18 Feb 2009
Posts: 120

Status: Offline

PostPosted: Wed Nov 25, 2009 18:09    Post subject: Reply with quote

а
Code:

username=imiausera


кто-то отменил?
Back to top
View user's profile Send private message
xelas



Joined: 05 Mar 2007
Posts: 251

Status: Offline

PostPosted: Thu Nov 26, 2009 08:04    Post subject: Reply with quote

Да, отменил.

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
View user's profile Send private message
jooohny



Joined: 18 Feb 2009
Posts: 120

Status: Offline

PostPosted: Thu Nov 26, 2009 08:31    Post subject: Reply with quote

тогда так
Code:

[blablauser]
callerid = 201
secret = qwerty
mailbox = 201@PBX
Back to top
View user's profile Send private message
pronini



Joined: 21 Jun 2008
Posts: 24

Status: Offline

PostPosted: Thu Nov 26, 2009 11:28    Post subject: Reply with quote

Нет. Тогда становится SIP/blablauser.
Back to top
View user's profile Send private message
Lonely_Ghost



Joined: 15 Jan 2007
Posts: 200
Location: Украина, Киев

Status: Offline

PostPosted: Thu Nov 26, 2009 11:37    Post subject: Reply with quote

xelas wrote:
Да, отменил.


Господа, читать разучились?

Code:
defaultuser=blablabla
Back to top
View user's profile Send private message
pronini



Joined: 21 Jun 2008
Posts: 24

Status: Offline

PostPosted: Thu Nov 26, 2009 11:56    Post subject: Reply with quote

Нет. defaultuser не помогает. username, authname - тоже.
Back to top
View user's profile Send private message
xelas



Joined: 05 Mar 2007
Posts: 251

Status: Offline

PostPosted: Thu Nov 26, 2009 13:12    Post subject: Reply with quote

Вы плохо прочли выделенные мной моменты, повторю один из них еще раз:

; 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
View user's profile Send private message
pronini



Joined: 21 Jun 2008
Posts: 24

Status: Offline

PostPosted: Thu Nov 26, 2009 14:09    Post subject: Reply with quote

Я Вас понял. Спасибо.
Придется переписвать extensions.conf
Back to top
View user's profile Send private message
Asterisk Forum Forum Index -> Newbies/FAQ Forum Reply to topic
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum