Primero les muestro el esquema que poseo:
SIP PHONE (Linksys) ---> Kamailio (1.5.4) ----> Mitel ----> Mitel Phone
Lo que quiero hacer es llamar desde la extension Linksys a traves de Kamailio a una extension de la central propietaria Mitel. Actualmente Mitel rechaza mis llamadas con un bonito 404 Not Found! lo cual es imposible porque la extension Mitel existe y funciona bien.
Ademas, solo para probar, intente el mismo escenario, pero en vez de utilizar Kamailio, puse un asterisk y funciona barbaro. Entonces... en algo le estoy errando en Kamailio.
Hice unas capturas para que puedan ver si hay algun inconveniente con los INVITES (por logica no deberian existir, pero por las dudas los pongo)
Primero una aclaracion sobre las IPs:
Sip Phone -> 100
192.168.10.140 -> Sip Phone
192.168.10.150 -> Kamailio
192.168.10.160 -> Mitel
Mitel Phone -> 200
Kamailio
U 192.168.10.140:5060 -> 192.168.10.150:5060
INVITE sip:200@192.168.10.150 SIP/2.0.
Via: SIP/2.0/UDP 192.168.10.140:5060;branch=z9hG4bK-d063d53a.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=d396005aaf3ab9a2o0.
To: "Mitel Phone" <sip:200@192.168.10.150>.
Call-ID: d4de30ba-eb6944c2 [!at] 192.168.10.140 (replace the [!at] with a @).
CSeq: 101 INVITE.
Max-Forwards: 70.
Contact: "Sip Phone" <sip:100@192.168.10.140:5060>.
Expires: 240.
User-Agent: Linksys/SPA941-5.1.8.
Content-Length: 395.
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER.
Supported: replaces.
Content-Type: application/sdp.
U 192.168.10.150:5060 -> 192.168.10.140:5060
SIP/2.0 100 Giving a try.
Via: SIP/2.0/UDP 192.168.10.140:5060;branch=z9hG4bK-d063d53a;rport=5060;received=192.168.10.140.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=d396005aaf3ab9a2o0.
To: "Mitel Phone" <sip:200@192.168.10.150>.
Call-ID: d4de30ba-eb6944c2 [!at] 192.168.10.140 (replace the [!at] with a @).
CSeq: 101 INVITE.
Server: Kamailio (1.5.4-notls (i386/linux)).
Content-Length: 0.
U 192.168.10.150:5060 -> 192.168.10.160:5060
INVITE sip:200@192.168.10.150 SIP/2.0.
Via: SIP/2.0/UDP 192.168.10.150;branch=z9hG4bKc17.8e746ba.0.
Via: SIP/2.0/UDP 192.168.10.140:5060;rport=5060;received=192.168.10.140;branch=z9hG4bK-d063d53a.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=d396005aaf3ab9a2o0.
To: "Mitel Phone" <sip:200@192.168.10.150>.
Call-ID: d4de30ba-eb6944c2 [!at] 192.168.10.140 (replace the [!at] with a @).
CSeq: 101 INVITE.
Max-Forwards: 69.
Contact: "Sip Phone" <sip:100@192.168.10.140:5060>.
Expires: 240.
User-Agent: Linksys/SPA941-5.1.8.
Content-Length: 395.
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER.
Supported: replaces.
Content-Type: application/sdp.
U 192.168.10.160:5060 -> 192.168.10.150:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 192.168.10.150;branch=z9hG4bKc17.8e746ba.0,SIP/2.0/UDP 192.168.10.140:5060;rport=5060;received=192.168.10.140;branch=z9hG4bK-d063d53a.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=d396005aaf3ab9a2o0.
To: "Mitel Phone" <sip:200@192.168.10.150>;tag=0_4044193584-65506210.
Call-ID: d4de30ba-eb6944c2 [!at] 192.168.10.140 (replace the [!at] with a @).
CSeq: 101 INVITE.
Content-Length: 0.
U 192.168.10.160:5060 -> 192.168.10.150:5060
SIP/2.0 404 Not Found.
Via: SIP/2.0/UDP 192.168.10.150;branch=z9hG4bKc17.8e746ba.0,SIP/2.0/UDP 192.168.10.140:5060;rport=5060;received=192.168.10.140;branch=z9hG4bK-d063d53a.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=d396005aaf3ab9a2o0.
To: "Mitel Phone" <sip:200@192.168.10.150>;tag=0_4044193584-65506210.
Call-ID: d4de30ba-eb6944c2 [!at] 192.168.10.140 (replace the [!at] with a @).
CSeq: 101 INVITE.
Contact: <sip:192.168.10.160>.
Content-Length: 0.
Lo mismo pero con Asterisk (que si funciona)
U 192.168.10.140:5060 -> 192.168.10.150:5060
INVITE sip:200@192.168.10.150 SIP/2.0.
Via: SIP/2.0/UDP 192.168.10.140:5060;branch=z9hG4bK-d5c5100f.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=59178c25144180dfo0.
To: "Mitel Phone" <sip:200@192.168.10.150>.
Call-ID: 5f5d6a1d-6b287b47 [!at] 192.168.10.140 (replace the [!at] with a @).
CSeq: 102 INVITE.
Max-Forwards: 70.
Proxy-Authorization: Digest username="100",realm="asterisk",nonce="3ed77171",uri="sip:200@192.168.10.150",algorithm=...
Contact: "Sip Phone" <sip:100@192.168.10.140:5060>.
Expires: 240.
User-Agent: Linksys/SPA941-5.1.8.
Content-Length: 397.
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER.
Supported: replaces.
Content-Type: application/sdp.
U 192.168.10.150:5060 -> 192.168.10.140:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 192.168.10.140:5060;branch=z9hG4bK-d5c5100f;received=192.168.10.140.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=59178c25144180dfo0.
To: "Mitel Phone" <sip:200@192.168.10.150>.
Call-ID: 5f5d6a1d-6b287b47 [!at] 192.168.10.140 (replace the [!at] with a @).
CSeq: 102 INVITE.
User-Agent: Asterisk PBX.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO.
Supported: replaces.
Contact: <sip:200@192.168.10.150>.
Content-Length: 0.
U 192.168.10.150:5060 -> 192.168.10.160:5060
INVITE sip:200@192.168.10.160 SIP/2.0.
Via: SIP/2.0/UDP 192.168.10.150:5060;branch=z9hG4bK5c9bfd49;rport.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=as749996b5.
To: <sip:200@192.168.10.160>.
Contact: <sip:100@192.168.10.150>.
Call-ID: 59dfcf505cb2671977c8c9175f50c96e [!at] 192.168.10.150 (replace the [!at] with a @).
CSeq: 102 INVITE.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Date: Wed, 22 Sep 2010 12:36:12 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO.
Supported: replaces.
Content-Type: application/sdp.
Content-Length: 235.
U 192.168.10.160:5060 -> 192.168.10.150:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 192.168.10.150:5060;branch=z9hG4bK5c9bfd49;rport.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=as749996b5.
To: <sip:200@192.168.10.160>;tag=0_3844423584-65506194.
Call-ID: 59dfcf505cb2671977c8c9175f50c96e [!at] 192.168.10.150 (replace the [!at] with a @).
CSeq: 102 INVITE.
Content-Length: 0.
U 192.168.10.160:5060 -> 192.168.10.150:5060
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP 192.168.10.150:5060;branch=z9hG4bK5c9bfd49;rport.
From: "Sip Phone" <sip:100@192.168.10.150>;tag=as749996b5.
To: <sip:200@192.168.10.160>;tag=0_3844423584-65506194.
Call-ID: 59dfcf505cb2671977c8c9175f50c96e [!at] 192.168.10.150 (replace the [!at] with a @).
CSeq: 102 INVITE.
Contact: <sip:200@192.168.10.160:5060;transport=udp>.
Content-Length: 0.
La configuracion de Kamailio es default. Basicamente consulto por el numero ingresado, si es 200 lo envio para la Mitel:
route[2]{
force_rport();
if (nat_uac_test("19")) {
if (method=="REGISTER") {
fix_nated_register();
} else {
fix_nated_contact();
};
setflag(5);
if (is_method("INVITE") && $rU =~ "200"){
force_rtp_proxy();
t_on_failure("1");
route(5);
};
};
}
route[5] {
t_on_reply("1");
exit;
}
Tienen idea si me esta faltando algo???
Les agradecere cualquier ayuda.