PDA

Voir la version complète : Registration failed



Pascal
22/11/2013, 16h42
Bonjour,

après avoir installé avec succès un Asterisk sur mon réseau local pour me faire la main, je tente de passer en configuration 'cloud'.
Mais ça se complique car je n'arrive pas à faire fonctionner le simple REGISTER de mon softphone X-Lite:
NOTICE[15212]: chan_sip.c:27952 handle_request_register: Registration from '<sip:8677@37.a.b.c>' failed for '78.x.y.z:64614' - Wrong password

Voici ma configuration (j'ai masqué une partie des IP):

Le serveur Asterisk (11.6.0) est installé sur un vps ovh avec une adresse IP publique 37.a.b.c ; par commodité j'utilise freepbx en GUI (2.11.0.11)
Côté client, j'utilise X-Lite depuis mon réseau domestique (en 192.168.0.0), l'adresse publique de ma freebox est 78.x.y.z

J'ai configuré un device portant le numéro 8677, et je tente d'établir la connexion (REGISTER) depuis X-LITE.

Côté Asterisk, la configuration est la suivante (sip_additional.conf):


[8677]
deny=0.0.0.0/0.0.0.0
secret=**********
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
icesupport=no
encryption=no
callgroup=
pickupgroup=
dial=SIP/8677
mailbox=8677@device
permit=0.0.0.0/0.0.0.0
callerid=(X-Lite) <8677>
callcounter=yes
faxdetect=no
cc_monitor_policy=generic


X-Lite est ainsi configuré:


User ID: 8677
Domain : 37.a.b.c
Password : **********


X-Lite n'arrive pas pas effectuer le REGISTER car il reçoit un rejet SIP 403 Forbidden, la trace SIP sur Asterisk est celle ci :


<--- SIP read from UDP:78.x.y.z:64614 --->
REGISTER sip:37.a.b.c SIP/2.0
Via: SIP/2.0/UDP 192.168.0.33:64614;branch=z9hG4bK-d8754z-ca09f276d927db2c-1---d
8754z-;rport
Max-Forwards: 70
Contact: <sip:8677@192.168.0.33:64614;rinstance=8974f2d5183e 42c3>
To: <sip:8677@37.a.b.c>
From: <sip:8677@37.a.b.c>;tag=21ff7e3c
Call-ID: NWE3Y2IyMjYzNGY2NjdiZTVhY2I1MTZlYWNkZGRiZjE
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INF
O
User-Agent: X-Lite release 4.5.4 stamp 70866
Authorization: Digest username="8677",realm="asterisk",nonce="65a07bf4",uri="sip
:37.a.b.c",response="e845214bad730a28ed9dea8f176cf9f5",algorithm=MD5
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to 78.x.y.z:64614 (NAT)

<--- Transmitting (NAT) to 78.x.y.z:64614 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.0.33:64614;branch=z9hG4bK-d8754z-ca09f276d927db2c-1---d
8754z-;received=78.x.y.z;rport=64614
From: <sip:8677@37.a.b.c>;tag=21ff7e3c
To: <sip:8677@37.a.b.c>;tag=as79edb136
Call-ID: NWE3Y2IyMjYzNGY2NjdiZTVhY2I1MTZlYWNkZGRiZjE
CSeq: 2 REGISTER
Server: Asterisk PBX 11.6.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS
H
Supported: replaces, timer
Content-Length: 0


<------------>
[Nov 22 12:12:54] NOTICE[15212]: chan_sip.c:27952 handle_request_register: Regis
tration from '<sip:8677@37.a.b.c>' failed for '78.x.y.z:64614' - Wrong
password


Après de très longues heures de recherche et d'essais divers, je n'ai pas encore trouvé mon erreur :-(
Peut-être l'adresse contact en 192.168.0.33 ?
Quelqu'un saurait-il me mettre sur la bonne piste svp ?

Merci,
Pascal

jean
22/11/2013, 17h06
le parametrage du client n'est pas bon: tu ne dois pas avoir

REGISTER sip:37.a.b.c SIP/2.0

mais

REGISTER sip:8677@37.a.b.c SIP/2.0

je n'utilise pas xlite, mais tu rentres surement l'@ du serveur dans le mauvais champ

Pascal
22/11/2013, 17h44
Hélas, ce n'est peut-être pas la bonne piste. J'utilise habituellement X-Lite sur mon Asterisk local, et dans ce cas-là ça fonctionne bien avec la trace suivante : (le numéro de device est 2002 en local, et le serveur Asterisk est en 192.168.0.51)



<--- SIP read from UDP:192.168.0.33:14624 --->
REGISTER sip:192.168.0.51 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.33:14624;branch=z9hG4bK-d8754z-0d0ac3267333d23f-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:2002@192.168.0.33:14624;rinstance=4a0921ef7934 f44a>
To: <sip:2002@192.168.0.51>
From: <sip:2002@192.168.0.51>;tag=1546dc73
Call-ID: YTViYmJiOGEyYzFmN2ViMWYxY2VmMWZjN2U1OWM1MTU
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite release 4.5.4 stamp 70866
Authorization: Digest username="2002",realm="asterisk",nonce="308fbcb1",uri="sip:192.168.0.51",res
ponse="508c398c5f18ed587b511d05a69abf6b",algorithm=MD5
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
Sending to 192.168.0.33:14624 (NAT)
-- Registered SIP '2002' at 192.168.0.33:14624
Reliably Transmitting (no NAT) to 192.168.0.33:14624:
OPTIONS sip:2002@192.168.0.33:14624;rinstance=4a0921ef7934 f44a SIP/2.0
Via: SIP/2.0/UDP 192.168.0.51:5060;branch=z9hG4bK0aaf24fd
Max-Forwards: 70
From: "Unknown" <sip:Unknown@192.168.0.51>;tag=as7eb79b79
To: <sip:2002@192.168.0.33:14624;rinstance=4a0921ef7934 f44a>
Contact: <sip:Unknown@192.168.0.51:5060>
Call-ID: 18e983fb10eae50862b43667612c3054@192.168.0.51:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.11.0(11.5.1)
Date: Fri, 22 Nov 2013 15:34:27 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---

<--- Transmitting (NAT) to 192.168.0.33:14624 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.33:14624;branch=z9hG4bK-d8754z-0d0ac3267333d23f-1---d8754z-;received=19
2.168.0.33;rport=14624
From: <sip:2002@192.168.0.51>;tag=1546dc73
To: <sip:2002@192.168.0.51>;tag=as54e2068f
Call-ID: YTViYmJiOGEyYzFmN2ViMWYxY2VmMWZjN2U1OWM1MTU
CSeq: 2 REGISTER
Server: FPBX-2.11.0(11.5.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Expires: 3600
Contact: <sip:2002@192.168.0.33:14624;rinstance=4a0921ef7934 f44a>;expires=3600
Date: Fri, 22 Nov 2013 15:34:27 GMT
Content-Length: 0


Par ailleurs, j'utilise couramment un autre client (CSipSimple) avec plusieurs trunks différents, mais je rencontre exactement le même exactement le même problème quand je tente le register sur cet Asterisk 37.a.b.c :-(

Par acquis de conscience, j'ai tout de même tenté de mettre 8677@37.a.b.c (au lieu de 8677) dans le User ID du client X-Lite, sans plus de succès...

therebel23
22/11/2013, 20h22
Peux tu essayer d'enlever les directives deny et allow pour voir ?

Pascal
23/11/2013, 09h20
Bonjour, même problème après suppression des directives deny/permit