kalidev
21/03/2011, 16h21
Bonjour,
Cela fait plusieurs jours que je suis bloqué dans la configuration d'asterisk.
Les appels sortant fonctionne très bien avec mes 2 lignes ovh mais au cours d'un appel entrant sur l'une ou l'autre de mes lignes je n'ai pour seul réponse: "la personne au poste xx n'est pas disponible".
Mon serveur asterisk (1.6.2.9) est derrière une bbox (port 5060 et 10000 à 15000 rediriger).
Voila ma configuration :
sip.conf
[general]
context=forfait-ovh
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
register => 003353554xxxx:MDP@sip.ovh.net:5060/003353554xxxx
register => 003353554yyyy:MDP@sip.ovh.net:5060/003353554yyyy
[kalidev1]
type=friend
auth=md5
username=kalidev1
md5secret=034093055c683d1f9aee6e49682b04fe
callerid="Kalidev 1" <003353554xxxx>
host=dynamic
context=appel-sortant
language=fr
insecure=port
nat=no
canreinvite=no
dtmfmode=auto
video=no
restrictcid=no
amaflags=default
[kalidev2]
type=friend
auth=md5
username=kalidev2
md5secret=da61f0014fa319d2ffaebc8472e008a1
callerid="Kalidev 2" <003353554yyyy>
host=dynamic
context=appel-sortant2
language=fr
insecure=port
nat=no
canreinvite=no
dtmfmode=auto
video=no
restrictcid=no
amaflags=default
[forfait-ovh]
type=peer
host=sip.ovh.net
fromuser=003353554xxxx
fromdomain=sip.ovh.net
context=ovh-sip
language=fr
insecure=port,invite
username=003353554xxxx
secret=MDP
nat=yes
canreinvite=no
dtmfmode=auto
video=no
restrictcid=no
amaflags=default
qualify=yes
[forfait-ovh2]
type=peer
host=sip.ovh.net
fromuser=003353554yyyy
fromdomain=sip.ovh.net
context=ovh-sip
language=fr
insecure=port,invite
username=003353554yyyy
secret=MDP
nat=yes
canreinvite=no
dtmfmode=auto
video=no
restrictcid=no
amaflags=default
qualify=yes
extention.conf
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
;[globals]
;CONSOLE=Console/dsp
;IAXINFO=guest
;TRUNK=Zap/g2
;TRUNKMSD=1
[ovh-sip] ; nom du plan
exten => s,1,Answer()
exten => s,n,Dial(SIP/100)
exten => s,n,Hangup
exten => s,i,Hangup
exten => 0033535541286,1,Dial(SIP/kalidev1)
exten => 0033535541287,1,Dial(SIP/kalidev2)
[appel-sortant]
; Cette partie gere les appels sortants
exten => _X.,1,Dial(SIP/${EXTEN}@forfait-ovh) ; Sur cette ligne allons appeler en passant par la section [forfait-ovh] du fichier sip.conf
[appel-sortant2]
; Cette partie gere les appels sortants
exten => _X.,1,Dial(SIP/${EXTEN}@forfait-ovh2) ; Sur cette ligne allons appeler en passant par la section [forfait-ovh] du fichier sip.conf
le debug CLI :
<------------->
--- (11 headers 0 lines) ---
Scheduling destruction of SIP dialog '490cc126558d31942b8acc4d67b75e01@127.0.1.1' in 32000 ms (Method: REGISTER)
[Mar 21 15:25:22] NOTICE[7368]: chan_sip.c:18270 handle_response_register: Outbound Registration: Expiry for sip.ovh.net is 120 sec (Scheduling reregistration in 105 s)
Reliably Transmitting (NAT) to 91.121.129.17:5060:
OPTIONS sip:sip.ovh.net SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK6968a22d;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.1.10>;tag=as6bc0bd45
To: <sip:sip.ovh.net>
Contact: <sip:asterisk@192.168.1.10>
Call-ID: 49e3754a77bcf74b7d8280b527ced8f2@192.168.1.10
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.9-2
Date: Mon, 21 Mar 2011 14:25:46 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:91.121.129.17:5060 --->
SIP/2.0 501 Not Implemented
Allow: UPDATE,REFER,INFO
Call-ID: 49e3754a77bcf74b7d8280b527ced8f2@192.168.1.10
CSeq: 102 OPTIONS
From: "asterisk" <sip:asterisk@192.168.1.10>;tag=as6bc0bd45
Server: Cirpack/v4.42s (gw_sip)
To: <sip:sip.ovh.net>;tag=00-07978-5df31608-2a73d8780
Via: SIP/2.0/UDP 192.168.1.10:5060;received=87.90.83.115;rport=5060 ;branch=z9hG4bK6968a22d
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '49e3754a77bcf74b7d8280b527ced8f2@192.168.1.10' Method: OPTIONS
Reliably Transmitting (NAT) to 91.121.129.17:5060:
OPTIONS sip:sip.ovh.net SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK49f2c98f;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.1.10>;tag=as73a5ee28
To: <sip:sip.ovh.net>
Contact: <sip:asterisk@192.168.1.10>
Call-ID: 16b1e1145f9b677679e08e521b8a0fc4@192.168.1.10
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.9-2
Date: Mon, 21 Mar 2011 14:25:46 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:91.121.129.17:5060 --->
SIP/2.0 501 Not Implemented
Allow: UPDATE,REFER,INFO
Call-ID: 16b1e1145f9b677679e08e521b8a0fc4@192.168.1.10
CSeq: 102 OPTIONS
From: "asterisk" <sip:asterisk@192.168.1.10>;tag=as73a5ee28
Server: Cirpack/v4.42s (gw_sip)
To: <sip:sip.ovh.net>;tag=00-08082-5df31615-1828b0b05
Via: SIP/2.0/UDP 192.168.1.10:5060;received=87.90.83.115;rport=5060 ;branch=z9hG4bK49f2c98f
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '16b1e1145f9b677679e08e521b8a0fc4@192.168.1.10' Method: OPTIONS
<--- SIP read from UDP:192.168.1.20:5060 --->
REGISTER sip:192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.20:5060;branch=z9hG4bK9eba6430d94b91cb6d f745c95c5319f8;rport
From: "kalidev 2" <sip:kalidev2@192.168.1.10>;tag=250346009
To: "kalidev 2" <sip:kalidev2@192.168.1.10>
Call-ID: 1219423529@192_168_1_20
CSeq: 12906 REGISTER
Contact: <sip:kalidev2@192.168.1.20:5060>
Max-Forwards: 70
User-Agent: A580 IP021920000000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
Sending to 192.168.1.20 : 5060 (no NAT)
<--- Transmitting (NAT) to 192.168.1.20:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.20:5060;branch=z9hG4bK9eba6430d94b91cb6d f745c95c5319f8;received=192.168.1.20;rport=5060
From: "kalidev 2" <sip:kalidev2@192.168.1.10>;tag=250346009
To: "kalidev 2" <sip:kalidev2@192.168.1.10>;tag=as027ba0fa
Call-ID: 1219423529@192_168_1_20
CSeq: 12906 REGISTER
Server: Asterisk PBX 1.6.2.9-2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="3a208742"
Content-Length: 0
J'ai des erreurs que je ne comprends pas 401 et 501 mon problème pourrait'il venir de là ?
J'espère que vous aurez tous les éléments pour me sortir de se problème.
Merci de votre aide
Cordialement
Cela fait plusieurs jours que je suis bloqué dans la configuration d'asterisk.
Les appels sortant fonctionne très bien avec mes 2 lignes ovh mais au cours d'un appel entrant sur l'une ou l'autre de mes lignes je n'ai pour seul réponse: "la personne au poste xx n'est pas disponible".
Mon serveur asterisk (1.6.2.9) est derrière une bbox (port 5060 et 10000 à 15000 rediriger).
Voila ma configuration :
sip.conf
[general]
context=forfait-ovh
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
register => 003353554xxxx:MDP@sip.ovh.net:5060/003353554xxxx
register => 003353554yyyy:MDP@sip.ovh.net:5060/003353554yyyy
[kalidev1]
type=friend
auth=md5
username=kalidev1
md5secret=034093055c683d1f9aee6e49682b04fe
callerid="Kalidev 1" <003353554xxxx>
host=dynamic
context=appel-sortant
language=fr
insecure=port
nat=no
canreinvite=no
dtmfmode=auto
video=no
restrictcid=no
amaflags=default
[kalidev2]
type=friend
auth=md5
username=kalidev2
md5secret=da61f0014fa319d2ffaebc8472e008a1
callerid="Kalidev 2" <003353554yyyy>
host=dynamic
context=appel-sortant2
language=fr
insecure=port
nat=no
canreinvite=no
dtmfmode=auto
video=no
restrictcid=no
amaflags=default
[forfait-ovh]
type=peer
host=sip.ovh.net
fromuser=003353554xxxx
fromdomain=sip.ovh.net
context=ovh-sip
language=fr
insecure=port,invite
username=003353554xxxx
secret=MDP
nat=yes
canreinvite=no
dtmfmode=auto
video=no
restrictcid=no
amaflags=default
qualify=yes
[forfait-ovh2]
type=peer
host=sip.ovh.net
fromuser=003353554yyyy
fromdomain=sip.ovh.net
context=ovh-sip
language=fr
insecure=port,invite
username=003353554yyyy
secret=MDP
nat=yes
canreinvite=no
dtmfmode=auto
video=no
restrictcid=no
amaflags=default
qualify=yes
extention.conf
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
;[globals]
;CONSOLE=Console/dsp
;IAXINFO=guest
;TRUNK=Zap/g2
;TRUNKMSD=1
[ovh-sip] ; nom du plan
exten => s,1,Answer()
exten => s,n,Dial(SIP/100)
exten => s,n,Hangup
exten => s,i,Hangup
exten => 0033535541286,1,Dial(SIP/kalidev1)
exten => 0033535541287,1,Dial(SIP/kalidev2)
[appel-sortant]
; Cette partie gere les appels sortants
exten => _X.,1,Dial(SIP/${EXTEN}@forfait-ovh) ; Sur cette ligne allons appeler en passant par la section [forfait-ovh] du fichier sip.conf
[appel-sortant2]
; Cette partie gere les appels sortants
exten => _X.,1,Dial(SIP/${EXTEN}@forfait-ovh2) ; Sur cette ligne allons appeler en passant par la section [forfait-ovh] du fichier sip.conf
le debug CLI :
<------------->
--- (11 headers 0 lines) ---
Scheduling destruction of SIP dialog '490cc126558d31942b8acc4d67b75e01@127.0.1.1' in 32000 ms (Method: REGISTER)
[Mar 21 15:25:22] NOTICE[7368]: chan_sip.c:18270 handle_response_register: Outbound Registration: Expiry for sip.ovh.net is 120 sec (Scheduling reregistration in 105 s)
Reliably Transmitting (NAT) to 91.121.129.17:5060:
OPTIONS sip:sip.ovh.net SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK6968a22d;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.1.10>;tag=as6bc0bd45
To: <sip:sip.ovh.net>
Contact: <sip:asterisk@192.168.1.10>
Call-ID: 49e3754a77bcf74b7d8280b527ced8f2@192.168.1.10
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.9-2
Date: Mon, 21 Mar 2011 14:25:46 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:91.121.129.17:5060 --->
SIP/2.0 501 Not Implemented
Allow: UPDATE,REFER,INFO
Call-ID: 49e3754a77bcf74b7d8280b527ced8f2@192.168.1.10
CSeq: 102 OPTIONS
From: "asterisk" <sip:asterisk@192.168.1.10>;tag=as6bc0bd45
Server: Cirpack/v4.42s (gw_sip)
To: <sip:sip.ovh.net>;tag=00-07978-5df31608-2a73d8780
Via: SIP/2.0/UDP 192.168.1.10:5060;received=87.90.83.115;rport=5060 ;branch=z9hG4bK6968a22d
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '49e3754a77bcf74b7d8280b527ced8f2@192.168.1.10' Method: OPTIONS
Reliably Transmitting (NAT) to 91.121.129.17:5060:
OPTIONS sip:sip.ovh.net SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK49f2c98f;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.1.10>;tag=as73a5ee28
To: <sip:sip.ovh.net>
Contact: <sip:asterisk@192.168.1.10>
Call-ID: 16b1e1145f9b677679e08e521b8a0fc4@192.168.1.10
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.9-2
Date: Mon, 21 Mar 2011 14:25:46 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:91.121.129.17:5060 --->
SIP/2.0 501 Not Implemented
Allow: UPDATE,REFER,INFO
Call-ID: 16b1e1145f9b677679e08e521b8a0fc4@192.168.1.10
CSeq: 102 OPTIONS
From: "asterisk" <sip:asterisk@192.168.1.10>;tag=as73a5ee28
Server: Cirpack/v4.42s (gw_sip)
To: <sip:sip.ovh.net>;tag=00-08082-5df31615-1828b0b05
Via: SIP/2.0/UDP 192.168.1.10:5060;received=87.90.83.115;rport=5060 ;branch=z9hG4bK49f2c98f
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog '16b1e1145f9b677679e08e521b8a0fc4@192.168.1.10' Method: OPTIONS
<--- SIP read from UDP:192.168.1.20:5060 --->
REGISTER sip:192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.20:5060;branch=z9hG4bK9eba6430d94b91cb6d f745c95c5319f8;rport
From: "kalidev 2" <sip:kalidev2@192.168.1.10>;tag=250346009
To: "kalidev 2" <sip:kalidev2@192.168.1.10>
Call-ID: 1219423529@192_168_1_20
CSeq: 12906 REGISTER
Contact: <sip:kalidev2@192.168.1.20:5060>
Max-Forwards: 70
User-Agent: A580 IP021920000000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
Sending to 192.168.1.20 : 5060 (no NAT)
<--- Transmitting (NAT) to 192.168.1.20:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.20:5060;branch=z9hG4bK9eba6430d94b91cb6d f745c95c5319f8;received=192.168.1.20;rport=5060
From: "kalidev 2" <sip:kalidev2@192.168.1.10>;tag=250346009
To: "kalidev 2" <sip:kalidev2@192.168.1.10>;tag=as027ba0fa
Call-ID: 1219423529@192_168_1_20
CSeq: 12906 REGISTER
Server: Asterisk PBX 1.6.2.9-2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="3a208742"
Content-Length: 0
J'ai des erreurs que je ne comprends pas 401 et 501 mon problème pourrait'il venir de là ?
J'espère que vous aurez tous les éléments pour me sortir de se problème.
Merci de votre aide
Cordialement