PDA

Voir la version complète : Echec d'enregistrement telephone SIP



chab
18/11/2010, 12h33
Bonjour,

j'ai un probleme et je ne sais plus quoi faire, j'espere que vous pourrez m'aider :

J'ai un telephone SIP Siemens C470IP qui marche bien avec divers providers VoIP (OVH, Betamax...). Il marchait bien aussi avec ma machine de test sous ubuntu et en reseau local.

Le probleme est que maintenant le telephone ne se connecte plus sur le serveur dédié que j'ai (sous debian lenny / Asterisk 1.6.2.13). Par contre Ekiga se connecte sans probleme au meme compte sip...

Au niveau de la console asterisk (meme en tres verbeux), je n'ai rien d'affiché lorsque l'enregistrement echoue et le C470 me dit juste "Registration failed". Sans plus de logs difficile d'avancer :(

voici un extrait de mon sip.conf :


[general]
dtmfmode=auto
language=fr ; pour les messages lus par asterisk
disallow=all
allow=ulaw
allow=alaw
allow=speex

[siemens]
type=friend
context=interne
host=dynamic
secret=xxxxxxxx

Si vous avez une suggestion de test que je puisse faire parce que la j'ai pas d'idée...

ds3
18/11/2010, 13h48
Bonjour,
Le soft phone qui s'enregistre et pas le C470 avec le meme compte SIP client.
Pas de bla bla de la console ... même avec mode verbeux maximal ...

Adresse ip du C470 ? sip set debug ip XXX.XXX.XXX.XXX
ou un tcpdump tcpdump -s 0 -i ethX
... une idée rapide.

chab
18/11/2010, 14h07
Merci j'obtiens enfin quelque chose avec "sip set debug ip X.X.X.X"... Apres ca m'avance pas enormement pour le moment.
Je vais chercher de mon coté mais si quelque chose vous saute au yeux, voici les logs :



Debian-50-lenny-32-minimal*CLI> sip set debug ip 89.4.1xx.2xx
SIP Debugging Enabled for IP: 89.4.1xx.2xx
Debian-50-lenny-32-minimal*CLI>
Debian-50-lenny-32-minimal*CLI>
Debian-50-lenny-32-minimal*CLI>

<--- SIP read from UDP:89.4.1xx.2xx:61177 --->



<------------->

<--- SIP read from UDP:89.4.1xx.2xx:61177 --->
REGISTER sip:server.exemple.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5060;branch=z9hG4bK375a1a8b1ad99205b5 e56896d094e0f1;rport
From: "siemens" <sip:siemens@server.exemple.com>;tag=661213739
To: "siemens" <sip:siemens@server.exemple.com>
Call-ID: 994182810@192_168_0_50
CSeq: 1 REGISTER
Contact: <sip:siemens@192.168.0.50:5060>
Max-Forwards: 70
User-Agent: C470IP022230000000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---

<--- SIP read from UDP:89.4.1xx.2xx:61177 --->
REGISTER sip:server.exemple.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5060;branch=z9hG4bK375a1a8b1ad99205b5 e56896d094e0f1;rport
From: "siemens" <sip:siemens@server.exemple.com>;tag=661213739
To: "siemens" <sip:siemens@server.exemple.com>
Call-ID: 994182810@192_168_0_50
CSeq: 1 REGISTER
Contact: <sip:siemens@192.168.0.50:5060>
Max-Forwards: 70
User-Agent: C470IP022230000000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---
[Nov 18 13:03:30] NOTICE[17316]: chan_sip.c:11601 sip_reregister: -- Re-registration for 003397453xxxx@sip.ovh.net
> doing dnsmgr_lookup for 'sip.ovh.net'
> doing dnsmgr_lookup for 'sip.ovh.net'
[Nov 18 13:03:30] NOTICE[17316]: chan_sip.c:18334 handle_response_register: Outbound Registration: Expiry for sip.ovh.net is 120 sec (Scheduling reregistration in 105 s)

<--- SIP read from UDP:89.4.1xx.2xx:61177 --->
REGISTER sip:server.exemple.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5060;branch=z9hG4bK375a1a8b1ad99205b5 e56896d094e0f1;rport
From: "siemens" <sip:siemens@server.exemple.com>;tag=661213739
To: "siemens" <sip:siemens@server.exemple.com>
Call-ID: 994182810@192_168_0_50
CSeq: 1 REGISTER
Contact: <sip:siemens@192.168.0.50:5060>
Max-Forwards: 70
User-Agent: C470IP022230000000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---

<--- SIP read from UDP:89.4.1xx.2xx:61177 --->
REGISTER sip:server.exemple.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5060;branch=z9hG4bK375a1a8b1ad99205b5 e56896d094e0f1;rport
From: "siemens" <sip:siemens@server.exemple.com>;tag=661213739
To: "siemens" <sip:siemens@server.exemple.com>
Call-ID: 994182810@192_168_0_50
CSeq: 1 REGISTER
Contact: <sip:siemens@192.168.0.50:5060>
Max-Forwards: 70
User-Agent: C470IP022230000000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---

<--- SIP read from UDP:89.4.1xx.2xx:61177 --->
REGISTER sip:server.exemple.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5060;branch=z9hG4bK375a1a8b1ad99205b5 e56896d094e0f1;rport
From: "siemens" <sip:siemens@server.exemple.com>;tag=661213739
To: "siemens" <sip:siemens@server.exemple.com>
Call-ID: 994182810@192_168_0_50
CSeq: 1 REGISTER
Contact: <sip:siemens@192.168.0.50:5060>
Max-Forwards: 70
User-Agent: C470IP022230000000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---

<--- SIP read from UDP:89.4.1xx.2xx:61177 --->
REGISTER sip:server.exemple.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5060;branch=z9hG4bK375a1a8b1ad99205b5 e56896d094e0f1;rport
From: "siemens" <sip:siemens@server.exemple.com>;tag=661213739
To: "siemens" <sip:siemens@server.exemple.com>
Call-ID: 994182810@192_168_0_50
CSeq: 1 REGISTER
Contact: <sip:siemens@192.168.0.50:5060>
Max-Forwards: 70
User-Agent: C470IP022230000000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---

<--- SIP read from UDP:89.4.1xx.2xx:61177 --->
REGISTER sip:server.exemple.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5060;branch=z9hG4bK375a1a8b1ad99205b5 e56896d094e0f1;rport
From: "siemens" <sip:siemens@server.exemple.com>;tag=661213739
To: "siemens" <sip:siemens@server.exemple.com>
Call-ID: 994182810@192_168_0_50
CSeq: 1 REGISTER
Contact: <sip:siemens@192.168.0.50:5060>
Max-Forwards: 70
User-Agent: C470IP022230000000
Expires: 180
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---
Debian-50-lenny-32-minimal*CLI>

ds3
18/11/2010, 15h17
Tu as modifié quelques choses de ces INVITE's ?
Ou une info pertinente de /etc/hosts ?

chab
18/11/2010, 15h31
je suis un utilisateur debutant d'asterisk et je n'ai rien modifié de particulier, ni sur telephone ni sur asterisk.

mon /etc/host n'a rien de spécial :


# nameserver config
# IPv4
127.0.0.1 localhost
78.47.xxx.xxx Debian-50-lenny-32-minimal
#
# IPv6
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

petit parenthese sur le serveur dédié, c'est un VPS en allemagne chez hetner:
http://www.hetzner.de/en/hosting/produkte_vserver/vq7/
il ne coute que 8€ ttc par mois et depuis 15 jours il marche très bien, sauf pour asterisk :)

chab
18/11/2010, 15h54
etant débutant dans le domaine d'asterisk, je n'ai rien modifié de spécial...

rien de particulier non plus dans le /etc/hosts.

Pour info voici les logs lorsque je connecte ekiga avec le même compte (siemens) et depuis la même connection internet. On y voit clairement que asterisk repond gentillement a ekiga alors qu avec le telephone asterisk ne repond rien....



<--- SIP read from UDP:89.4.2xx.1xx:61772 --->
REGISTER sip:server.domain.com SIP/2.0
CSeq: 5 REGISTER
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bKd71ac623-c502-1910-9d9a-000f66cf7cc5;rport
User-Agent: Ekiga/3.2.7
From: <sip:siemens@server.domain.com>;tag=b1c8c523-c502-1910-9d9a-000f66cf7cc5
Call-ID: b1c8c523-c502-1910-9d99-000f66cf7cc5@cdi
To: <sip:siemens@server.domain.com>
Contact: <sip:siemens@89.4.2xx.1xx:61772>;q=1, <sip:siemens@89.4.2xx.1xx>;q=0.667, <sip:siemens@192.168.0.10>;q=0.334
llow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REF ER,MESSAGE,INFO,PING
Expires: 3600
Content-Length: 0
Max-Forwards: 70


<------------->
--- (12 headers 0 lines) ---
Sending to 89.4.2xx.1xx : 61772 (no NAT)

<--- Transmitting (no NAT) to 89.4.2xx.1xx:61772 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bKd71ac623-c502-1910-9d9a-000f66cf7cc5;received=89.4.2xx.1xx;rport=61772
From: <sip:siemens@server.domain.com>;tag=b1c8c523-c502-1910-9d9a-000f66cf7cc5
To: <sip:siemens@server.domain.com>;tag=as3384ec04
Call-ID: b1c8c523-c502-1910-9d99-000f66cf7cc5@cdi
CSeq: 5 REGISTER
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="78df32a9"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'b1c8c523-c502-1910-9d99-000f66cf7cc5@cdi' in 32000 ms (Method: REGISTER)

<--- SIP read from UDP:89.4.2xx.1xx:61772 --->
REGISTER sip:server.domain.com SIP/2.0
CSeq: 6 REGISTER
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bKdb2ec823-c502-1910-9d9a-000f66cf7cc5;rport
User-Agent: Ekiga/3.2.7
Authorization: Digest username="siemens", realm="asterisk", nonce="78df32a9", uri="sip:server.domain.com", algorithm=MD5, response="fec67185c669f9a966e67d5194284a93"
From: <sip:siemens@server.domain.com>;tag=b1c8c523-c502-1910-9d9a-000f66cf7cc5
Call-ID: b1c8c523-c502-1910-9d99-000f66cf7cc5@cdi
To: <sip:siemens@server.domain.com>
Contact: <sip:siemens@89.4.2xx.1xx:61772>;q=1, <sip:siemens@89.4.2xx.1xx>;q=0.667, <sip:siemens@192.168.0.10>;q=0.334
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REF ER,MESSAGE,INFO,PING
Expires: 3600
Content-Length: 0
Max-Forwards: 70


<------------->
--- (13 headers 0 lines) ---
Sending to 89.4.2xx.1xx : 61772 (no NAT)
-- Registered SIP 'siemens' at 89.4.2xx.1xx port 61772
> Saved useragent "Ekiga/3.2.7" for peer siemens

<--- Transmitting (no NAT) to 89.4.2xx.1xx:61772 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bKdb2ec823-c502-1910-9d9a-000f66cf7cc5;received=89.4.2xx.1xx;rport=61772
From: <sip:siemens@server.domain.com>;tag=b1c8c523-c502-1910-9d9a-000f66cf7cc5
To: <sip:siemens@server.domain.com>;tag=as3384ec04
Call-ID: b1c8c523-c502-1910-9d99-000f66cf7cc5@cdi
CSeq: 6 REGISTER
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Expires: 3600
Contact: <sip:siemens@89.4.2xx.1xx:61772>;expires=3600
Date: Thu, 18 Nov 2010 13:44:25 GMT
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'b1c8c523-c502-1910-9d99-000f66cf7cc5@cdi' in 32000 ms (Method: REGISTER)

<--- SIP read from UDP:89.4.2xx.1xx:61772 --->
SUBSCRIBE sip:siemens@server.domain.com SIP/2.0
CSeq: 2 SUBSCRIBE
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bK4ca0c823-c502-1910-9d9a-000f66cf7cc5;rport
User-Agent: Ekiga/3.2.7
From: <sip:siemens@server.domain.com>;tag=639cc823-c502-1910-9d9a-000f66cf7cc5
Call-ID: 7a98c823-c502-1910-9d9a-000f66cf7cc5@cdi
To: <sip:siemens@server.domain.com>
Contact: <sip:siemens@89.4.2xx.1xx:61772>
Accept: application/simple-message-summary
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REF ER,MESSAGE,INFO,PING
Expires: 3600
Event: message-summary
Content-Length: 0
Max-Forwards: 70


<------------->
--- (14 headers 0 lines) ---
Creating new subscription
Sending to 89.4.2xx.1xx : 61772 (no NAT)
list_route: hop: <sip:siemens@89.4.2xx.1xx:61772>
Found peer 'siemens' for 'siemens' from 89.4.2xx.1xx:61772

<--- Transmitting (no NAT) to 89.4.2xx.1xx:61772 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bK4ca0c823-c502-1910-9d9a-000f66cf7cc5;received=89.4.2xx.1xx;rport=61772
From: <sip:siemens@server.domain.com>;tag=639cc823-c502-1910-9d9a-000f66cf7cc5
To: <sip:siemens@server.domain.com>;tag=as0f9d2526
Call-ID: 7a98c823-c502-1910-9d9a-000f66cf7cc5@cdi
CSeq: 2 SUBSCRIBE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="33349611"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '7a98c823-c502-1910-9d9a-000f66cf7cc5@cdi' in 32000 ms (Method: SUBSCRIBE)

<--- SIP read from UDP:89.4.2xx.1xx:61772 --->
SUBSCRIBE sip:siemens@server.domain.com SIP/2.0
CSeq: 3 SUBSCRIBE
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bKbe11c923-c502-1910-9d9a-000f66cf7cc5;rport
User-Agent: Ekiga/3.2.7
Authorization: Digest username="siemens", realm="asterisk", nonce="33349611", uri="sip:siemens@server.domain.com", algorithm=MD5, response="4aa386369a65250b3c10a494a5b42da9"
From: <sip:siemens@server.domain.com>;tag=639cc823-c502-1910-9d9a-000f66cf7cc5
Call-ID: 7a98c823-c502-1910-9d9a-000f66cf7cc5@cdi
To: <sip:siemens@server.domain.com>
Contact: <sip:siemens@89.4.2xx.1xx:61772>
Accept: application/simple-message-summary
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REF ER,MESSAGE,INFO,PING
Expires: 3600
Event: message-summary
Content-Length: 0
Max-Forwards: 70


<------------->
--- (15 headers 0 lines) ---
Creating new subscription
Sending to 89.4.2xx.1xx : 61772 (no NAT)
Found peer 'siemens' for 'siemens' from 89.4.2xx.1xx:61772

<--- Transmitting (no NAT) to 89.4.2xx.1xx:61772 --->
SIP/2.0 404 Not found (no mailbox)
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bKbe11c923-c502-1910-9d9a-000f66cf7cc5;received=89.4.2xx.1xx;rport=61772
From: <sip:siemens@server.domain.com>;tag=639cc823-c502-1910-9d9a-000f66cf7cc5
To: <sip:siemens@server.domain.com>;tag=as0f9d2526
Call-ID: 7a98c823-c502-1910-9d9a-000f66cf7cc5@cdi
CSeq: 3 SUBSCRIBE
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


<------------>
[Nov 18 14:44:26] NOTICE[17316]: chan_sip.c:21518 handle_request_subscribe: Received SIP subscribe for peer without mailbox: siemens
Really destroying SIP dialog '7a98c823-c502-1910-9d9a-000f66cf7cc5@cdi' Method: SUBSCRIBE

<--- SIP read from UDP:89.4.2xx.1xx:61772 --->
PUBLISH sip:siemens@server.domain.com SIP/2.0
CSeq: 7 PUBLISH
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bK81c3c823-c502-1910-9d9a-000f66cf7cc5;rport
User-Agent: Ekiga/3.2.7
From: <sip:siemens@server.domain.com>;tag=afbbc823-c502-1910-9d9a-000f66cf7cc5
Call-ID: dcb3c823-c502-1910-9d9a-000f66cf7cc5@cdi
To: <sip:siemens@server.domain.com>
Contact: <sip:siemens@89.4.2xx.1xx:61772>
Expires: 500
Event: presence
Content-Type: application/pidf+xml
Content-Length: 346
Max-Forwards: 70

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="pres:siemens@server.domain.com">
<tuple id="sip:siemens@server.domain.com_on_cdi">
<note>online - I'm online using Ekiga</note>
<status>
<basic>open</basic>
</status>
<contact priority="1">siemens@server.domain.com</contact>
</tuple>
</presence>

<------------->
--- (13 headers 10 lines) ---

<--- Transmitting (no NAT) to 89.4.2xx.1xx:61772 --->
SIP/2.0 501 Method Not Implemented
Via: SIP/2.0/UDP 89.4.2xx.1xx:61772;branch=z9hG4bK81c3c823-c502-1910-9d9a-000f66cf7cc5;received=89.4.2xx.1xx;rport=61772
From: <sip:siemens@server.domain.com>;tag=afbbc823-c502-1910-9d9a-000f66cf7cc5
To: <sip:siemens@server.domain.com>;tag=as62cfd18d
Call-ID: dcb3c823-c502-1910-9d9a-000f66cf7cc5@cdi
CSeq: 7 PUBLISH
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


<------------>

<--- SIP read from UDP:89.4.2xx.1xx:61772 --->


<------------->
Debian-50-lenny-32-minimal*CLI>

chab
19/11/2010, 15h30
Ok en fait c'etait juste un probleme NAT... il suffisait donc de mettre un serveur stun dans la config du tel.

Comme on peut le voir dans les logs ci dessus, l'adresse de la requete envoyée par le telephone etait l'adresse locale (192.168.0.50) d'ou le probleme.
Ekiga quant à lui donne bien l'adresse publique dans l'invite...

Ce site explique tres bien tout cela avec des petits schemas et tout:
http://www.ordinoscope.net/index.php/Informatique/Softwares/Asterisk/Recettes/SIP_et_Nat