Konfigurace Asterisku jako SIP klienta
Michal Brzek
hw na medoro.org
Pondělí Říjen 25 14:48:56 CEST 2010
Ahoj,
řešil jste někdo problém jak nastavit SW tel. ústřednou Asterisk jako
klienta? Potřebuji aby se moje firemní tel. ústředna připojila do
operátorovy ústředny poskytující externí volání přes SIP protokol.
Nedaří se mi nastavit, aby příchozí hovor do mojí ústředny byl
korektně nasměrován na interní číslo ve firmě.
Je to ve stavu, že se uživatel 1111 registruje v operátorově ústředně.
Pokud volám z operátorské ústředny na číslo 1111, tak mi informace o
volání dorazí na místní firemní ústřednu, která mě o volání informuje
pouze hláškou:
[Oct 25 09:12:39] WARNING[1404]: chan_sip.c:12673 check_auth: username
mismatch, have <1234>, digest has <1111>
[Oct 25 09:12:39] NOTICE[1404]: chan_sip.c:19961
handle_request_invite: Failed to authenticate device "2222" <sip:2222 na 10.20.0.25
>;tag=as0f8d79fb
A hovor nepřesměruje na číslo 9990.
Ukázka nastavení místní firemní ústředny.
sip.conf
[general]
allowoverlap=no
udpbindaddr=0.0.0.0
port=5060
dtmfmode=auto
tcpenable=no
tcpbindaddr=0.0.0.0srvlookup=yes
autocreatepeer=yes
trustrpid=yes
sendrpid=yes
register => 1111:1111 na 10.20.0.25/1234
[1234];
type=peer
fromuser=1111
fromdomain=dynamic
canreinvite=no
secret=1111
insecure=no
host=10.20.0.25
disallow=all
allow=alaw
qualify=yes
nat=no
[9990]
context=local
type=friend
secret=9990
username=9990
userid=TEST1 9990
host=dynamic
nat=yes
disallow=all
allow=alaw
[9991]
context=local
type=friend
secret=9991
username=9991
userid=TEST2 9991
host=dynamic
nat=yes
disallow=all
allow=alaw
extensions.conf
[general] ; Default context for incoming calls
; instead of the From: field.
allowoverlap=no ; Disable overlap dialing support.
(Default is yes)
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket
to (0.0.0.0 binds to all)
; Optionally add a port number,
192.168.1.1:5062 (default is port 5060)
port=5060
dtmfmode=auto
tcpenable=no ; Enable server for incoming TCP
connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to
(0.0.0.0 binds to all interfaces)
; Optionally add a port number,
192.168.1.1:5062 (default is port 5060)
srvlookup=yes ; Enable DNS SRV lookups on outbound
calls
; Note: Asterisk only uses the first
host
; in SRV records
; Disabling DNS SRV lookups disables the
; ability to place SIP calls based on
domain
; names to some other SIP users on the
Internet
; Specifying a port in a SIP peer
definition or
; when dialing outbound calls will
supress SRV
; lookups for that peer or call.
trustrpid=yes
sendrpid=yes
exten => _1234,1,Dial(SIP/9990)
exten => _9990,1,Dial(SIP/9990)
exten => _9991,1,Dial(SIP/9991)
S pozdravem Michal Brzek
Další informace o konferenci Hw-list