Hola a todos,
Estoy tratando de configurar Kamailio 3.0.0 para que redirija las llamadas a un buzón de voz basado en SEMS cuando el usuario llamado está ocupado. Siguiendo las instrucciones de varios ejemplos encontrados en internet, y del propio script ejemplo de kamailio.cfg, estoy usando las funciones revert_uri(), rewritehostport() (o reescribiéndo el R-URI manualmente) y append_branch(), dentro de la failure_route. Aparentemente modifica correctamente el R-URI y crea la segunda "pata" de la llamada. Sin embargo, a pesar de que la dirección del R-Uri aparece bien cambiada como decía en la Request Line, el paquete IP se envía a la dirección IP del destinatario original:
|Time | 192.168.3.20
| 192.168.0.167 |
| | | 192.168.0.197 |
|5,069 | INVITE SDP ( telephone-event) | |SIP From:
sip:4095@192.168.0.197 To:sip:4440@192.168.0.197
| |(5060) ------------------> (5060) | |
|5,071 | 407 Proxy Authentication Required | |SIP Status
| |(5060) <------------------ (5060) | |
|5,074 | ACK | | |SIP Request
| |(5060) ------------------> (5060) | |
|5,076 | INVITE SDP ( telephone-event) | |SIP From:
sip:4095@192.168.0.197 To:sip:4440@192.168.0.197
| |(5060) ------------------> (5060) | |
|5,084 | 100 trying -- your call is important to us | |SIP Status
| |(5060) <------------------ (5060) | |
|5,085 | | INVITE SDP ( telephone-event) |SIP Request
| | |(5060) ------------------> (5060) |
|5,088 | | 100 Trying| |SIP Status
| | |(5060) <------------------ (5060) |
|5,088 | | 486 Busy Here |SIP Status
| | |(5060) <------------------ (5060) |
|5,091 | | ACK | |SIP Request
| | |(5060) ------------------> (5060) |
|5,101 | | INVITE SDP ( telephone-event) |SIP Request
| | |(5060) ------------------> (5060) |
|5,102 | | 404 Not Found |SIP Status
| | |(5060) <------------------ (5060) |
|5,102 | | ACK | |SIP Request
| | |(5060) ------------------> (5060) |
|5,103 | 404 Not Found | |SIP Status
| |(5060) <------------------ (5060) | |
|5,106 | ACK | | |SIP Request
| |(5060) ------------------> (5060) | |
Esta es la captura del Invite de la redirección, en el timestamp 5,101
No. Time Source Destination Protocol Info
1235 5.100698 192.168.0.197 192.168.0.167 SIP/SDP Request: INVITE
sip:voicemail4440@192.168.0.197:5080, with session description
Frame 1235 (1151 bytes on wire, 1151 bytes captured)
Ethernet II, Src: CadmusCo_96:31:84 (08:00:27:96:31:84), Dst: Micro-St_6d:77:54 (00:21:85:6d:77:54)
Internet Protocol, Src: 192.168.0.197 (192.168.0.197), Dst: 192.168.0.167 (192.168.0.167)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: INVITE
sip:voicemail4440@192.168.0.197:5080 SIP/2.0
Method: INVITE
Request-URI:
sip:voicemail4440@192.168.0.197:5080 [Resent Packet: True]
[Suspected resend of frame: 1233]
Message Header
Record-Route: <sip:192.168.0.197;lr=on;nat=
La configuración que he usado es la siguiente:
# Sample failure route
failure_route[FAIL_ONE] {
#ifdef WITH_NAT
if (is_method("INVITE")
&& (isbflagset("6") || isflagset(5))) {
unforce_rtp_proxy();
}
#endif
if (t_is_canceled()) {
exit;
}
# uncomment the following lines if you want to block client
# redirect based on 3xx replies.
##if (t_check_status("3[0-9][0-9]")
) {
##t_reply("404","Not found");
## exit;
##}
# uncomment the following lines if you want to redirect the failed
# calls to a different new destination
if (t_check_status("486|408")) {
revert_uri();
prefix("voicemail");
remove_hf("P-App-Name");
append_hf("P-App-Name: voicemail\r\n");
append_hf("P-App-Param: mod=box;usr= $rU;dom=
sipproxy.a.com;uid=$rU;did=
sipproxy.a.com;\r\n");
$ru = "sip:" + $rU + "@" + "
192.168.0.197:5080";
#rewritehostport("
192.168.0.197:5080");
#append_branch("
sip:4888@192.168.0.102");
append_branch();
# do not set the missed call flag again
t_relay();
}
}
¿Alguien ha tenido un problema similar? Cualquier ayuda será bienvenida.