Voir la version complète : [RESOLU] [IPPI] Appel entrant
Bonjour,
Je tente depuis plusieurs jours de configurer IPPI dans Asterisk. Les appels sortants fonctionnent très bien, par contre je n'ai jamais réussi à faire fonctionner les appels entrants...
Lorsque j'appelle CLI marque :
== Using SIP RTP CoS mark 5
et je tombe sur le répondeur du fournisseur SIP...
Fichier sip.conf :
[general]
defaultexpirey=1800
dtmfmode=auto
qualify=yes
register => UTILISATEUR:MOT_DE_PASSE@ippi.fr/NUM_DE_TEL
externip=192.168.***.***
localnet=192.168.1.0/255.255.255.0
[ippi_outgoing]
type=peer
host=ippi.fr
username=UTILISATEUR
secret=MOT_DE_PASSE
fromuser=UTILISATEUR
fromdomain=ippi.fr
nat=yes
canreinvite=no
insecure=very
[ippi_incoming]
type=peer
host=ippi.fr
context=fromippi
nat=yes
canreinvite=no
[tel1]
type=friend
secret=MOT_DE_PASSE
host=dynamic
context=home
nat=yes
[tel2]
type=friend
secret=MOT_DE_PASSE
host=dynamic
context=home
nat=yes
Le "NUM_DE_TEL" est sous forme +33*********
Fichier extensions.conf :
[fromippi]
exten => s,1,Dial(SIP/tel1)
[home]
exten => 001,1,Dial(SIP/tel1)
exten => 002,1,Dial(SIP/tel2)
exten => _X.,1,Dial(SIP/ippi_outgoing/${EXTEN})
Merci d'avance
externip=192.168.***.***
==> je doute que ce soit ton @ externe (ie, telle que vu de l'internet)
[ippi_outgoing]
type=peer
[ippi_incoming]
type=peer
les deux ne peuvent pas être peer (je sais plus si il faut user ou friend) => simplifie toi la vie, ne fais qu'un seul contexte avec type=friend
externip=192.168.***.***
==> je doute que ce soit ton @ externe (ie, telle que vu de l'internet)
[ippi_outgoing]
type=peer
[ippi_incoming]
type=peer
les deux ne peuvent pas être peer (je sais plus si il faut user ou friend) => simplifie toi la vie, ne fais qu'un seul contexte avec type=friend
Sachant que mon IP externe change, j'ai supprimé la ligne.
j'ai changer le [ippi_outgoing] en type=friend => rien
j'ai changer le [ippi_incoming] en type=friend =>rien
j'ai changer les 2 => rien
...
pour l'externip, c'est assez nécéssaire je crois pour le nat. prends un compte gratuit sur dyndns, et configure ta box ou un autre équipement, et ensuite tu pourras mettre externip=machin.dyndns.org et externrefresh=60
pour les contextes.... je ferais UN contexte du genre:
[ippi]
type=friend
host=ippi.fr
username=UTILISATEUR
secret=MOT_DE_PASSE
fromuser=UTILISATEUR
fromdomain=ippi.fr
nat=yes
canreinvite=no
insecure=very
context=fromippi
ensuite, pour le debug, ngrep est ton ami....
ngrep -d eth0 port 5060 and host <adresse d'enregistrement de l hote ippi>
tu verras exactement ce qui arrive. btw, ton firewall (box + unix) laisse entrer les requetes en 5060 ?
# sudo ngrep -d eth0 port 5060 and host ippi.fr
interface: eth0 (192.168.1.0/255.255.255.0)
filter: (ip or ip6) and ( port 5060 and host ippi.fr )
^Cexit
8 received, 0 dropped
Et toujours rien même après les modifications
oups... je suis aller un peu vite:
# sudo ngrep -d eth0 port 5060 and host ippi.fr
interface: eth0 (192.168.1.0/255.255.255.0)
filter: (ip or ip6) and ( port 5060 and host ippi.fr )
#
U 192.168.1.100:5060 -> 213.215.45.230:5060
OPTIONS sip:ippi.fr SIP/2.0..Via: SIP/2.0/UDP 84.100.202.211:5060;branch=z9
hG4bK4b893a70;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk@84.10
0.202.211>;tag=as36afd3b9..To: <sip:ippi.fr>..Contact: <sip:asterisk@84.100
.202.211>..Call-ID: 7506157c6774cb4d28df222b6a5fe13d@84.100.202.211..C Seq:
102 OPTIONS..User-Agent: Asterisk PBX 1.6.2.5-0ubuntu1.3..Date: Tue, 28 Jun
2011 20:58:45 GMT..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCR
IBE, NOTIFY, INFO..Supported: replaces, timer..Content-Length: 0....
#
U 213.215.45.230:5060 -> 192.168.1.100:5060
SIP/2.0 404 unknown service..Via: SIP/2.0/UDP 84.100.202.211:5060;branch=z9
hG4bK4b893a70;rport=5060..From: "asterisk" <sip:asterisk@84.100.202.211>;ta
g=as36afd3b9..To: <sip:ippi.fr>;tag=a910c8153188470b2841623c513a131f.da22..
Call-ID: 7506157c6774cb4d28df222b6a5fe13d@84.100.202.211..C Seq: 102 OPTIONS
..Server: OpenSIPS (1.6.3-notls (i386/linux))..Content-Length: 0....
#
U 213.215.45.230:5060 -> 192.168.1.100:5060
OPTIONS sip:84.100.202.211:5060 SIP/2.0..Via: SIP/2.0/UDP 213.215.45.230:50
60;branch=0..From: sip:pinger@ippi.fr;tag=8cf0798a..To: sip:84.100.202.211:
5060..Call-ID: 0be50fc6-ecc13844-30e16b@213.215.45.230..CSeq: 1 OPTIONS..Co
ntent-Length: 0....
#
U 192.168.1.100:5060 -> 213.215.45.230:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP 213.215.45.230:5060;branch=0;received=213.
215.45.230..From: sip:pinger@ippi.fr;tag=8cf0798a..To: sip:84.100.202.211:5
060;tag=as325c3a56..Call-ID: 0be50fc6-ecc13844-30e16b@213.215.45.230..CSeq:
1 OPTIONS..Server: Asterisk PBX 1.6.2.5-0ubuntu1.3..Allow: INVITE, ACK, CA
NCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, ti
mer..Contact: <sip:84.100.202.211>..Accept: application/sdp..Content-Length
: 0....
#
U 213.215.45.230:5060 -> 192.168.1.100:5060
OPTIONS sip:84.100.202.211:5060 SIP/2.0..Via: SIP/2.0/UDP 213.215.45.230:50
60;branch=0..From: sip:pinger@ippi.fr;tag=1c71798a..To: sip:84.100.202.211:
5060..Call-ID: 0be50fc6-7c423844-12e16b@213.215.45.230..CSeq: 1 OPTIONS..Co
ntent-Length: 0....
#
U 192.168.1.100:5060 -> 213.215.45.230:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP 213.215.45.230:5060;branch=0;received=213.
215.45.230..From: sip:pinger@ippi.fr;tag=1c71798a..To: sip:84.100.202.211:5
060;tag=as5566a8e1..Call-ID: 0be50fc6-7c423844-12e16b@213.215.45.230..CSeq:
1 OPTIONS..Server: Asterisk PBX 1.6.2.5-0ubuntu1.3..Allow: INVITE, ACK, CA
NCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, ti
mer..Contact: <sip:84.100.202.211>..Accept: application/sdp..Content-Length
: 0....
#
U 192.168.1.100:5060 -> 213.215.45.230:5060
OPTIONS sip:ippi.fr SIP/2.0..Via: SIP/2.0/UDP 84.100.202.211:5060;branch=z9
hG4bK3800ff10;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk@84.10
0.202.211>;tag=as04fc9999..To: <sip:ippi.fr>..Contact: <sip:asterisk@84.100
.202.211>..Call-ID: 38042a5364d1367c455afba91cb83e2e@84.100.202.211..C Seq:
102 OPTIONS..User-Agent: Asterisk PBX 1.6.2.5-0ubuntu1.3..Date: Tue, 28 Jun
2011 20:59:45 GMT..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCR
IBE, NOTIFY, INFO..Supported: replaces, timer..Content-Length: 0....
#
U 213.215.45.230:5060 -> 192.168.1.100:5060
SIP/2.0 404 unknown service..Via: SIP/2.0/UDP 84.100.202.211:5060;branch=z9
hG4bK3800ff10;rport=5060..From: "asterisk" <sip:asterisk@84.100.202.211>;ta
g=as04fc9999..To: <sip:ippi.fr>;tag=a910c8153188470b2841623c513a131f.3963..
Call-ID: 38042a5364d1367c455afba91cb83e2e@84.100.202.211..C Seq: 102 OPTIONS
..Server: OpenSIPS (1.6.3-notls (i386/linux))..Content-Length: 0....
#
U 213.215.45.230:5060 -> 192.168.1.100:5060
OPTIONS sip:84.100.202.211:5060 SIP/2.0..Via: SIP/2.0/UDP 213.215.45.230:50
60;branch=0..From: sip:pinger@ippi.fr;tag=bbf1798a..To: sip:84.100.202.211:
5060..Call-ID: 0be50fc6-1cc23844-f3e16b@213.215.45.230..CSeq: 1 OPTIONS..Co
ntent-Length: 0....
#
U 192.168.1.100:5060 -> 213.215.45.230:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP 213.215.45.230:5060;branch=0;received=213.
215.45.230..From: sip:pinger@ippi.fr;tag=bbf1798a..To: sip:84.100.202.211:5
060;tag=as55ec95a4..Call-ID: 0be50fc6-1cc23844-f3e16b@213.215.45.230..CSeq:
1 OPTIONS..Server: Asterisk PBX 1.6.2.5-0ubuntu1.3..Allow: INVITE, ACK, CA
NCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, ti
mer..Contact: <sip:84.100.202.211>..Accept: application/sdp..Content-Length
: 0....
#
U 213.215.45.230:5060 -> 192.168.1.100:5060
OPTIONS sip:84.100.202.211:5060 SIP/2.0..Via: SIP/2.0/UDP 213.215.45.230:50
60;branch=0..From: sip:pinger@ippi.fr;tag=8b72798a..To: sip:84.100.202.211:
5060..Call-ID: 0be50fc6-eb433844-d5e16b@213.215.45.230..CSeq: 1 OPTIONS..Co
ntent-Length: 0....
#
U 192.168.1.100:5060 -> 213.215.45.230:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP 213.215.45.230:5060;branch=0;received=213.
215.45.230..From: sip:pinger@ippi.fr;tag=8b72798a..To: sip:84.100.202.211:5
060;tag=as301bad47..Call-ID: 0be50fc6-eb433844-d5e16b@213.215.45.230..CSeq:
1 OPTIONS..Server: Asterisk PBX 1.6.2.5-0ubuntu1.3..Allow: INVITE, ACK, CA
NCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, ti
mer..Contact: <sip:84.100.202.211>..Accept: application/sdp..Content-Length
: 0....
#
U 192.168.1.100:5060 -> 213.215.45.230:5060
OPTIONS sip:ippi.fr SIP/2.0..Via: SIP/2.0/UDP 84.100.202.211:5060;branch=z9
hG4bK29ab842a;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk@84.10
0.202.211>;tag=as78edc5e1..To: <sip:ippi.fr>..Contact: <sip:asterisk@84.100
.202.211>..Call-ID: 3f39c9310f5f93c56dced2c632df3344@84.100.202.211..C Seq:
102 OPTIONS..User-Agent: Asterisk PBX 1.6.2.5-0ubuntu1.3..Date: Tue, 28 Jun
2011 21:00:45 GMT..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCR
IBE, NOTIFY, INFO..Supported: replaces, timer..Content-Length: 0....
#
U 213.215.45.230:5060 -> 192.168.1.100:5060
SIP/2.0 404 unknown service..Via: SIP/2.0/UDP 84.100.202.211:5060;branch=z9
hG4bK29ab842a;rport=5060..From: "asterisk" <sip:asterisk@84.100.202.211>;ta
g=as78edc5e1..To: <sip:ippi.fr>;tag=a910c8153188470b2841623c513a131f.23b2..
Call-ID: 3f39c9310f5f93c56dced2c632df3344@84.100.202.211..C Seq: 102 OPTIONS
..Server: OpenSIPS (1.6.3-notls (i386/linux))..Content-Length: 0....
#
ok.... tu as tenté un appel entrant pendant que tu prenais ces traces ?
si oui, c'est que les paquets de IPPI n'arrivent pas à ton pc... as tu ouvert le firewall de ta box ?
ok.... tu as tenté un appel entrant pendant que tu prenais ces traces ?
si oui, c'est que les paquets de IPPI n'arrivent pas à ton pc... as tu ouvert le firewall de ta box ?
# sudo ngrep -d eth0 port 5060 and host ippi.fr
interface: eth0 (192.168.1.0/255.255.255.0)
filter: (ip or ip6) and ( port 5060 and host ippi.fr )
#
U 213.215.45.230:5060 -> 192.168.1.100:5060
INVITE sip:+33177*****@***.***.***.*** SIP/2.0..Record-Route: <sip:213.215.
45.230;lr=on>..Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bKa825.1098d646.
0..Via: SIP/2.0/UDP 213.215.45.252:5060;received=213.215.45.252;branch =z9hG
4bK51aaea0b;rport=5060..From: "331********" <sip:331********@ippi.fr>;tag=a
s202fa92f..To: <sip:01********@ippi.fr>..Contact: <sip:331********@213.215.
45.252>..Call-ID: 354024bf6a5a4abf4aa75bae57ada3cb@ippi.fr..CSeq: 102 INVIT
E..User-Agent: Asterisk PBX..Max-Forwards: 12..Date: Tue, 28 Jun 2011 21:19
:18 GMT..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
..Content-Type: application/sdp..Content-Length: 340..DID-info: 331********
....v=0..o=root 17453 17453 IN IP4 213.215.45.252..s=session..c=IN IP4 213.
215.45.252..t=0 0..m=audio 13466 RTP/AVP 8 0 97 3 18 101..a=rtpmap:8 PCMA/8
000..a=rtpmap:0 PCMU/8000..a=rtpmap:97 iLBC/8000..a=rtpmap:3 GSM/8000..a=rt
pmap:18 G729/8000..a=fmtp:18 annexb=no..a=rtpmap:101 telephone-event/8000..
a=fmtp:101 0-16..a=silenceSupp:off - - - -..
#
U 192.168.1.100:5060 -> 213.215.45.230:5060
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bKa82
5.1098d646.0;received=213.215.45.230..Via: SIP/2.0/UDP 213.215.45.252:5060;
received=213.215.45.252;branch=z9hG4bK51aaea0b;rpo rt=5060..From: "331********" <sip:331********@ippi.fr>;tag=as202fa92f..To: <sip:01********@ippi.fr>;
tag=as7875e22a..Call-ID: 354024bf6a5a4abf4aa75bae57ada3cb@ippi.fr..CSeq: 10
2 INVITE..Server: Asterisk PBX 1.6.2.5-0ubuntu1.3..Allow: INVITE, ACK, CANC
EL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces, time
r..WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="0b8c8aa
6"..Content-Length: 0....
#
U 213.215.45.230:5060 -> 192.168.1.100:5060
ACK sip:+331********@84.100.202.211 SIP/2.0..Via: SIP/2.0/UDP 213.215.45.23
0;branch=z9hG4bKa825.1098d646.0..From: "331********" <sip:331********@ippi.
fr>;tag=as202fa92f..Call-ID: 354024bf6a5a4abf4aa75bae57ada3cb@ippi.fr..To:
<sip:01********@ippi.fr>;tag=as7875e22a..CSeq: 102 ACK..Max-Forwards: 70..U
ser-Agent: OpenSIPS (1.6.3-notls (i386/linux))..Content-Length: 0....
Donc les infos arrive bien au pc. Ma neufbox a le port 5060 ouvert
Mais rien de plus au niveau téléphonique....
ok... effectivement, ca cause avec ton asterisk, c'est déjà ça :-)
next... pousse le détail sur la CLI, doit y a avoir qque chose...
core set verbose 9
core set debug 9
ensuite, .. as tu une extension _+. dans ton contexte ? vu que les numéros arrivent avec ce format ?
btw.... vu que le port 5060 est ouvert.... soit ton firewall autorise exclusivment ippi.fr a te contacter (si l'@ est constante), soit il te faut imperativement fail2ban, sinon, tu vas pleurer... (fraude)
ok... effectivement, ca cause avec ton asterisk, c'est déjà ça :-)
next... pousse le détail sur la CLI, doit y a avoir qque chose...
core set verbose 9
core set debug 9
ensuite, .. as tu une extension _+. dans ton contexte ? vu que les numéros arrivent avec ce format ?
*CLI> core set verbose 9
Verbosity was 7 and is now 9
*CLI> core set debug 9
Core debug was 0 and is now 9
Comment fait-on une extention_+. ?????
ben... comme les autres....
exten => _+.,1,Verbose(1, *** International Formati : 00${EXTEN:1})
exten => _+.,n,Goto(00${EXTEN:1},1)
(pour par exemple remplacer le + par 00 mais ce n'est peut etre pas ce que tu recherches)
J'ai activer "sip set debug" quand j'ai appellai, il marque:
<--- SIP read from UDP:213.215.45.230:5060 --->
INVITE sip:+331********@***.***.***.*** SIP/2.0
Record-Route: <sip:213.215.45.230;lr=on>
Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bK4a2.b4561c11.0
Via: SIP/2.0/UDP 213.215.45.252:5060;received=213.215.45.252;branch =z9hG4bK2ca377dc;rport=5060
From: "336********" <sip:336********@ippi.fr>;tag=as24278228
To: <sip:01********@ippi.fr>
Contact: <sip:336********@213.215.45.252>
Call-ID: 15594c9b4ae5bf865302279c7c0cac77@ippi.fr
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 12
Date: Tue, 28 Jun 2011 22:36:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 340
DID-info: 336********
v=0
o=root 17453 17453 IN IP4 213.215.45.252
s=session
c=IN IP4 213.215.45.252
t=0 0
m=audio 18138 RTP/AVP 8 0 97 3 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
<------------->
--- (16 headers 15 lines) ---
== Using SIP RTP CoS mark 5
Sending to 213.215.45.230 : 5060 (no NAT)
Using INVITE request as basis request - 15594c9b4ae5bf865302279c7c0cac77@ippi.fr
Found peer 'ippi' for '336********' from 213.215.45.230:5060
<--- Reliably Transmitting (NAT) to 213.215.45.230:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bK4a2.b4561c11.0;receiv ed=213.215.45.230
Via: SIP/2.0/UDP 213.215.45.252:5060;received=213.215.45.252;branch =z9hG4bK2ca377dc;rport=5060
From: "336********" <sip:336********@ippi.fr>;tag=as24278228
To: <sip:01********@ippi.fr>;tag=as0f438622
Call-ID: 15594c9b4ae5bf865302279c7c0cac77@ippi.fr
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.5-0ubuntu1.3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="79decfb5"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '15594c9b4ae5bf865302279c7c0cac77@ippi.fr' in 6400 ms (Method: INVITE)
Sediad*CLI>
<--- SIP read from UDP:213.215.45.230:5060 --->
ACK sip:+331********@***.***.***.*** SIP/2.0
Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bK4a2.b4561c11.0
From: "336********" <sip:336********@ippi.fr>;tag=as24278228
Call-ID: 15594c9b4ae5bf865302279c7c0cac77@ippi.fr
To: <sip:01********@ippi.fr>;tag=as0f438622
CSeq: 102 ACK
Max-Forwards: 70
User-Agent: OpenSIPS (1.6.3-notls (i386/linux))
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Sediad*CLI>
<--- SIP read from UDP:192.168.1.77:61198 --->
<------------->
Reliably Transmitting (NAT) to 192.168.1.77:61198:
OPTIONS sip:tel1@192.168.1.***:61198;rinstance=54f821032d6 1eaf2 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.100:5060;branch=z9hG4bK12134893;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.1.100>;tag=as7544ff20
To: <sip:tel1@192.168.1.***:61198;rinstance=54f821032d6 1eaf2>
Contact: <sip:asterisk@192.168.1.100>
Call-ID: 54a2557109e378b826294e30427c4caa@192.168.1.100
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.5-0ubuntu1.3
Date: Tue, 28 Jun 2011 22:36:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
Sediad*CLI>
<--- SIP read from UDP:192.168.1.***:61198 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.100:5060;branch=z9hG4bK12134893;rport=50 60
Contact: <sip:192.168.1.***:61198>
To: <sip:tel1@192.168.1.**:61198;rinstance=54f821032d61 eaf2>;tag=209c83b7
From: "asterisk"<sip:asterisk@192.168.1.100>;tag=as7544ff20
Call-ID: 54a2557109e378b826294e30427c4caa@192.168.1.100
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Really destroying SIP dialog '54a2557109e378b826294e30427c4caa@192.168.1.100' Method: OPTIONS
Really destroying SIP dialog '15594c9b4ae5bf865302279c7c0cac77@ippi.fr' Method: ACK
Mais sans plus
asterisk balance un unauthorized....
next... dans le register,
register => UTILISATEUR:MOT_DE_PASSE@ippi.fr/NUM_DE_TEL
le /NUM_DE_TEL designe l'extension... essaie de virer le /num_tel, ou de voir à quoi correspond cette extension (dans le sip ou extensions.conf), et de mettre tes commandes dans ce contexte
J'ai retiré le /NUM_DE_TEL, nouveau bug:
<------------->
--- (16 headers 15 lines) ---
== Using SIP RTP CoS mark 5
Sending to 213.215.45.230 : 5060 (no NAT)
Using INVITE request as basis request - 318196c5321426a359e34d466b8a1fc0@ippi.fr
Found peer 'ippi' for '331********' from 213.215.45.230:5060
<--- Reliably Transmitting (NAT) to 213.215.45.230:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bKffa.88fe2ed6.0;receiv ed=213.215.45.230
Via: SIP/2.0/UDP 213.215.45.252:5060;received=213.215.45.252;branch =z9hG4bK152bcced;rport=5060
From: "331********" <sip:331********@ippi.fr>;tag=as4acb879b
To: <sip:01********@ippi.fr>;tag=as5bcdcfc8
Call-ID: 318196c5321426a359e34d466b8a1fc0@ippi.fr
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.5-0ubuntu1.3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5b0301d7"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '318196c5321426a359e34d466b8a1fc0@ippi.fr' in 6400 ms (Method: INVITE)
<--- SIP read from UDP:213.215.45.230:5060 --->
INVITE sip:+331********@***.***.***.*** SIP/2.0
Record-Route: <sip:213.215.45.230;lr=on>
Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bKffa.88fe2ed6.1
Via: SIP/2.0/UDP 213.215.45.252:5060;received=213.215.45.252;branch =z9hG4bK152bcced;rport=5060
From: "331********" <sip:331********@ippi.fr>;tag=as4acb879b
To: <sip:01********@ippi.fr>
Contact: <sip:331********@213.215.45.252>
Call-ID: 318196c5321426a359e34d466b8a1fc0@ippi.fr
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 12
Date: Wed, 29 Jun 2011 06:14:11 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 340
DID-info: 331********
v=0
o=root 17453 17453 IN IP4 213.215.45.252
s=session
c=IN IP4 213.215.45.252
t=0 0
m=audio 11904 RTP/AVP 8 0 97 3 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
<------------->
--- (16 headers 15 lines) ---
Ignoring this INVITE request
et de mettre tes commandes dans ce contexte
??? j'ai pas comprit ???
=> je vois pas le pbm dans le traces, le ignoring est plutot du à une retransmission, est ce systematique ?
=> le /NUM_TEL
il faut je pense qu'il y ait une extension [NUM_TEL] dans le dialplan pour que cela marche...
; Asterisk can register as a SIP user agent to a SIP proxy (provider)
; Format for the register statement is:
; register => [peer?][transport://]user[@domain][:secret[:authuser]]@host[:port][/extension][~expiry]
;
plus précisemment, dans le contexte de reception des appels, tu dois avoir l'extension /NUM_TEL
exten => NUM_TEL,....
=> je vois pas le pbm dans le traces, le ignoring est plutot du à une retransmission, est ce systematique ?
Oui
Pour le NUM_TEL je l'écrit de quelle manière: +331******** ou 00331******** ou 331******** ou 01******** ???
j'ai mit 336********
quand j'appelle:
Asterisk 1.6.2.5-0ubuntu1.3, Copyright (C) 1999 - 2009 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
================================================== =======================
== Parsing '/etc/asterisk/asterisk.conf': == Found
== Parsing '/etc/asterisk/extconfig.conf': == Found
Connected to Asterisk 1.6.2.5-0ubuntu1.3 currently running on Sediad (pid = 741)
Verbosity was 0 and is now 7
== Using SIP RTP CoS mark 5
Sediad*CLI>
Mode debug:
SIP Debugging enabled
Sediad*CLI>
<--- SIP read from UDP:213.215.45.230:5060 --->
INVITE sip:331********@***.***.***.*** SIP/2.0
Record-Route: <sip:213.215.45.230;lr=on>
Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bK4021.e4e3eba1.0
Via: SIP/2.0/UDP 213.215.45.252:5060;received=213.215.45.252;branch =z9hG4bK4e499720;rport=5060
From: "331********" <sip:331********@ippi.fr>;tag=as259f1013
To: <sip:01********@ippi.fr>
Contact: <sip:331********@213.215.45.252>
Call-ID: 535a09dd7b98f0d231326e4613d941ab@ippi.fr
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 12
Date: Fri, 01 Jul 2011 08:11:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 340
DID-info: 331********
v=0
o=root 17453 17453 IN IP4 213.215.45.252
s=session
c=IN IP4 213.215.45.252
t=0 0
m=audio 19328 RTP/AVP 8 0 97 3 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
<------------->
--- (16 headers 15 lines) ---
== Using SIP RTP CoS mark 5
Sending to 213.215.45.230 : 5060 (no NAT)
Using INVITE request as basis request - 535a09dd7b98f0d231326e4613d941ab@ippi.fr
Found peer 'ippi' for '331********' from 213.215.45.230:5060
<--- Reliably Transmitting (NAT) to 213.215.45.230:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bK4021.e4e3eba1.0;recei ved=213.215.45.230
Via: SIP/2.0/UDP 213.215.45.252:5060;received=213.215.45.252;branch =z9hG4bK4e499720;rport=5060
From: "331********" <sip:331********@ippi.fr>;tag=as259f1013
To: <sip:01********@ippi.fr>;tag=as26827315
Call-ID: 535a09dd7b98f0d231326e4613d941ab@ippi.fr
CSeq: 102 INVITE
Server: Asterisk PBX 1.6.2.5-0ubuntu1.3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5e0ad280"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '535a09dd7b98f0d231326e4613d941ab@ippi.fr' in 6400 ms (Method: INVITE)
Sediad*CLI>
<--- SIP read from UDP:213.215.45.230:5060 --->
ACK sip:331********@***.***.***.*** SIP/2.0
Via: SIP/2.0/UDP 213.215.45.230;branch=z9hG4bK4021.e4e3eba1.0
From: "331********" <sip:331********@ippi.fr>;tag=as259f1013
Call-ID: 535a09dd7b98f0d231326e4613d941ab@ippi.fr
To: <sip:01********@ippi.fr>;tag=as26827315
CSeq: 102 ACK
Max-Forwards: 70
User-Agent: OpenSIPS (1.6.3-notls (i386/linux))
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Je remet mon code actuelle:
sip.conf:
[general]
defaultexpirey=1800
dtmfmode=auto
qualify=yes
register => UTILISATEUR:MOT_DE_PASSE@ippi.fr/NUM_TEL
;NUM_TEL ecrit 331********
externip=sediad.homelinux.org
externrefresh=60
localnet=192.168.1.0/255.255.255.0
[ippi]
type=friend
host=ippi.fr
username=UTILISATEUR
secret=MOT_DE_PASSE
fromuser=UTILISTATEUR
fromdomain=ippi.fr
nat=yes
canreinvite=no
insecure=very
context=fromippi
[sediad1]
type=friend
secret=MOT_DE_PASSE
host=dynamic
context=home
nat=yes
[sediad2]
type=friend
secret=MOT_DE_PASSE
host=dynamic
context=home
nat=yes
extensions.conf;
[fromippi]
exten => _+.,1,Verbose(1, *** International Formati : 00${EXTEN:1})
exten => s,n,Dial(SIP/sediad1)
[home]
exten => 001,1,Dial(SIP/sediad1)
exten => 002,1,Dial(SIP/sediad2)
exten => _X.,1,Dial(SIP/ippi/${EXTEN})
vincent10
01/07/2011, 12h54
Bonjour,
Voici comment j'ai configuré chez moi pour ippi.
[ippi_incoming] ; configuration des appels entrants depuis ippi
type=peer
host=ippi.fr
context=context
[ippi_appel-sortant-ippi] ; configuration des appels sortants par ippi
type=peer
host=ippi.fr
username=username
secret=mdp
fromuser=user
fromdomain=ippi.fr
nat=yes
insecure=port,invite
Voilà chez moi tout fonctionne.
Merci vincent10
j'ai avancé d'un pas, je ne pence pas être loin de la vérité:
Lorsque j'appelle j'ai l'erreur suivante:
== Using SIP RTP CoS mark 5
[Jul 2 20:25:47] NOTICE[873]: chan_sip.c:20039 handle_request_invite: Call from 'ippi_incoming' to extension '331********' rejected because extension not found.
Donc, j'ai donc retirer l’extension dans "register", sa me donne donc:
register => UTILISATEUR:MOT_DE_PASSE@ippi.fr
j'ai donc l'erreur suivante:
== Using SIP RTP CoS mark 5
[Jul 3 21:18:59] NOTICE[995]: chan_sip.c:20039 handle_request_invite: Call from 'ippi_incoming' to extension 's' rejected because extension not found.
vincent10
04/07/2011, 07h43
Bonjour,
Pouvez vous mettre votre fichier extensions.conf.
Mon extensions.conf :
[fromippi]
exten => s,1,Dial(SIP/sediad1)
[home]
exten => 001,1,Dial(SIP/sediad1)
exten => 002,1,Dial(SIP/sediad2)
exten => _0.,1,Dial(SIP/ippi_appel-sortant-ippi/${EXTEN})
vincent10
04/07/2011, 08h30
Re,
Pouvez vous testez ça.
Dans votre fichier extensions.conf.
[fromippi]
exten => numéro-ippi,1,Ringing(1)
exten => numéro-ippi,n,Wait(3)
exten => numéro-ippi,n,Answer
exten => numéro-ippi,n,Dial(SIP/sediad1)
Sa me donne :
== Using SIP RTP CoS mark 5
[Jul 4 09:45:56] NOTICE[892]: chan_sip.c:20039 handle_request_invite: Call from 'ippi_incoming' to extension '01********' rejected because extension not found.
sip.conf :
[general]
defaultexpirey=1800
dtmfmode=auto
qualify=yes
register => UTILISATEUR:MOT_DE_PASSE@ippi.fr/01********
externip=sediad.homelinux.org
externrefresh=60
localnet=192.168.1.0/255.255.255.0
[ippi_incoming] ; configuration des appels entrants depuis ippi
type=peer
host=ippi.fr
context=context
[ippi_appel-sortant-ippi] ; configuration des appels sortants par ippi
type=peer
host=ippi.fr
username=UTILISATEUR
secret=MOT_DE_PASSE
fromuser=UTILISATEUR
fromdomain=ippi.fr
nat=yes
insecure=port,invite
[sediad1]
type=friend
secret=mot_de_passe
host=dynamic
context=home
nat=yes
[sediad2]
type=friend
secret=mot_de_passe
host=dynamic
context=home
nat=yes
extensions.conf :
[fromippi]
exten => 01********,1,Ringing(1)
exten => 01********,n,Wait(3)
exten => 01********,n,Answer
exten => 01********,n,Dial(SIP/sediad1)
[home]
exten => 001,1,Dial(SIP/sediad1)
exten => 002,1,Dial(SIP/sediad2)
exten => _00.,1,Dial(SIP/ippi_appel-sortant-ippi/${EXTEN})
vincent10
04/07/2011, 10h10
Dans [ippi_incoming]
le context est bien fromippi?
Dans [ippi_incoming]
le context est bien fromippi?
OUPS...
Sa fonctionne nikel!!!
Merci beaucoup
vincent10
04/07/2011, 10h45
De rien.
:D :D :D
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions, Inc. Tous droits réservés