Hello,
I experienced a strange issue with some of VoIP accounts.
When the INVITE comes into MANAGE_FAILURE, after timeout, the config identifies, with "dialplan", the right Asterisk instance that should handle the call for voicemail.
This part is okay, and results in a new INVITE with the Request-URI formed with the right domain (eg. sip: sip:%3cNUMBER%3e@asterisk3 <NUMBER>@asterisk3). Then, the request goes to RELAY. Here is the issue: sometimes, the request is forwarded to the IP of the UA (the one initially contacted) instead of the IP of Asterisk.
I can't figure out the difference between a succeeded call and a failed one.
If someone has an idea. Here is the config that handles the VoiceMail:
failure_route[MANAGE_FAILURE] {
[.]
if (isflagset(24)) {
$avp(s:inv_timeout) = "5";
t_set_fr($avp(s:inv_timeout)*1000);
if (avp_db_load("$to/username","$avp(s:vm_uri)/usr_vm")) {
resetflag(24);
avp_pushto("$ruri","$avp(s:vm_uri)");
# Dynamic routing
if (avp_db_load("$ruri/username","$avp(s:client)/usr_fai")) {
if (dp_translate("2","$avp(s:client)/$avp(s:dest)") == 1) {
$ru = "sip:" + $rU + "@" + $avp(s:dest);
} else {
# Load default voicemail
$avp(s:client) = "DEFAULT_VM";
dp_translate("2","$avp(s:client)/$avp(s:dest)");
$ru = "sip:" + $rU + "@" + $avp(s:dest);
};
} else {
# Load default voicemail
$avp(s:client) = "DEFAULT_VM";
dp_translate("2","$avp(s:client)/$avp(s:dest)");
$ru = "sip:" + $rU + "@" + $avp(s:dest);
}
} else {
xlog("L_WARN","time=[$Tf] call id=[$ci] call seq=[$cs] contact header=[$ct] from uri=[$fu] from tag=[$ft] request's method=[$rm] request's uri=[$ru] to uri=[$tu] to tag=[$tt] sip message id=[$mi] process id=[$pp] ip source=[$si] flags=[$mf], User have no mail box\n");
exit;
};
prefix("710");
xlog("L_WARN","time=[$Tf] call id=[$ci] call seq=[$cs] contact header=[$ct] from uri=[$fu] from tag=[$ft] request's method=[$rm] request's uri=[$ru] to uri=[$tu] to tag=[$tt] sip message id=[$mi] process id=[$pp] ip source=[$si] flags=[$mf], failure route to Voice Mail\n");
route(RELAY);
exit;
}
Regards,
Igor.
And $ru is OK while sending to wrong (initial) IP? Did you try to set/check $du too?
2015-05-15 11:30 GMT+03:00 Igor Potjevlesch igor.potjevlesch@gmail.com:
Hello,
I experienced a strange issue with some of VoIP accounts.
When the INVITE comes into MANAGE_FAILURE, after timeout, the config identifies, with "dialplan", the right Asterisk instance that should handle the call for voicemail.
This part is okay, and results in a new INVITE with the Request-URI formed with the right domain (eg. sip:<NUMBER>@asterisk3). Then, the request goes to RELAY. Here is the issue: sometimes, the request is forwarded to the IP of the UA (the one initially contacted) instead of the IP of Asterisk.
I can't figure out the difference between a succeeded call and a failed one.
If someone has an idea. Here is the config that handles the VoiceMail:
failure_route[MANAGE_FAILURE] {
[…]
if (isflagset(24)) {
$avp(s:inv_timeout) = "5"; t_set_fr($avp(s:inv_timeout)*1000); if
(avp_db_load("$to/username","$avp(s:vm_uri)/usr_vm")) {
resetflag(24); avp_pushto("$ruri","$avp(s:vm_uri)"); # Dynamic routing if
(avp_db_load("$ruri/username","$avp(s:client)/usr_fai")) {
if
(dp_translate("2","$avp(s:client)/$avp(s:dest)") == 1) {
$ru = "sip:" +
$rU + "@" + $avp(s:dest);
} else { # Load default
voicemail
$avp(s:client)
= "DEFAULT_VM";
dp_translate("2","$avp(s:client)/$avp(s:dest)");
$ru = "sip:" +
$rU + "@" + $avp(s:dest);
}; } else { # Load default voicemail $avp(s:client) =
"DEFAULT_VM";
dp_translate("2","$avp(s:client)/$avp(s:dest)");
$ru = "sip:" + $rU + "@" +
$avp(s:dest);
} } else { xlog("L_WARN","time=[$Tf] call id=[$ci]
call seq=[$cs] contact header=[$ct] from uri=[$fu] from tag=[$ft] request's method=[$rm] request's uri=[$ru] to uri=[$tu] to tag=[$tt] sip message id=[$mi] process id=[$pp] ip source=[$si] flags=[$mf], User have no mail box\n");
exit; }; prefix("710"); xlog("L_WARN","time=[$Tf] call id=[$ci] call
seq=[$cs] contact header=[$ct] from uri=[$fu] from tag=[$ft] request's method=[$rm] request's uri=[$ru] to uri=[$tu] to tag=[$tt] sip message id=[$mi] process id=[$pp] ip source=[$si] flags=[$mf], failure route to Voice Mail\n");
route(RELAY); exit; }
Regards,
Igor.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello Dmitri,
Yes, the $ru is ok and contains the right domain name.
Regards,
Igor.
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Dmitri Savolainen Envoyé : vendredi 15 mai 2015 10:51 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Issue with Asterisk interconnection for VoiceMail
And $ru is OK while sending to wrong (initial) IP? Did you try to set/check $du too?
2015-05-15 11:30 GMT+03:00 Igor Potjevlesch <igor.potjevlesch@gmail.com mailto:igor.potjevlesch@gmail.com >:
Hello,
I experienced a strange issue with some of VoIP accounts.
When the INVITE comes into MANAGE_FAILURE, after timeout, the config identifies, with "dialplan", the right Asterisk instance that should handle the call for voicemail.
This part is okay, and results in a new INVITE with the Request-URI formed with the right domain (eg. sip: sip:%3cNUMBER%3e@asterisk3 <NUMBER>@asterisk3). Then, the request goes to RELAY. Here is the issue: sometimes, the request is forwarded to the IP of the UA (the one initially contacted) instead of the IP of Asterisk.
I can't figure out the difference between a succeeded call and a failed one.
If someone has an idea. Here is the config that handles the VoiceMail:
failure_route[MANAGE_FAILURE] {
[…]
if (isflagset(24)) {
$avp(s:inv_timeout) = "5";
t_set_fr($avp(s:inv_timeout)*1000);
if (avp_db_load("$to/username","$avp(s:vm_uri)/usr_vm")) {
resetflag(24);
avp_pushto("$ruri","$avp(s:vm_uri)");
# Dynamic routing
if (avp_db_load("$ruri/username","$avp(s:client)/usr_fai")) {
if (dp_translate("2","$avp(s:client)/$avp(s:dest)") == 1) {
$ru = "sip:" + $rU + "@" + $avp(s:dest);
} else {
# Load default voicemail
$avp(s:client) = "DEFAULT_VM";
dp_translate("2","$avp(s:client)/$avp(s:dest)");
$ru = "sip:" + $rU + "@" + $avp(s:dest);
};
} else {
# Load default voicemail
$avp(s:client) = "DEFAULT_VM";
dp_translate("2","$avp(s:client)/$avp(s:dest)");
$ru = "sip:" + $rU + "@" + $avp(s:dest);
}
} else {
xlog("L_WARN","time=[$Tf] call id=[$ci] call seq=[$cs] contact header=[$ct] from uri=[$fu] from tag=[$ft] request's method=[$rm] request's uri=[$ru] to uri=[$tu] to tag=[$tt] sip message id=[$mi] process id=[$pp] ip source=[$si] flags=[$mf], User have no mail box\n");
exit;
};
prefix("710");
xlog("L_WARN","time=[$Tf] call id=[$ci] call seq=[$cs] contact header=[$ct] from uri=[$fu] from tag=[$ft] request's method=[$rm] request's uri=[$ru] to uri=[$tu] to tag=[$tt] sip message id=[$mi] process id=[$pp] ip source=[$si] flags=[$mf], failure route to Voice Mail\n");
route(RELAY);
exit;
}
Regards,
Igor.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Friday 15 May 2015 10:30:45 Igor Potjevlesch wrote:
Then, the request goes to RELAY. Here is the issue: sometimes, the request is forwarded to the IP of the UA (the one initially contacted) instead of the IP of Asterisk.
Unset $du ($du=$null) when routing to voicemail.
It is set after a lookup(): http://www.kamailio.org/wiki/cookbooks/4.1.x/pseudovariables#du_-_destinatio...
Hello Daniel,
I can try this. But there are cases where lookup is called and the redirection to VoiceMail is working fine.
Could it be an issue with a missing "append_branch()" instruction?
Regards,
Igor.
-----Message d'origine----- De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel Tryba Envoyé : vendredi 15 mai 2015 10:58 À : sr-users@lists.sip-router.org Objet : Re: [SR-Users] Issue with Asterisk interconnection for VoiceMail
On Friday 15 May 2015 10:30:45 Igor Potjevlesch wrote:
Then, the request goes to RELAY. Here is the issue: sometimes, the request is forwarded to the IP of the UA (the one initially contacted) instead of the IP of Asterisk.
Unset $du ($du=$null) when routing to voicemail.
It is set after a lookup(): http://www.kamailio.org/wiki/cookbooks/4.1.x/pseudovariables#du_-_destinatio n_uri
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello Daniel,
I tried and it works! Thank you.
So, as suggested, I write $du=$null before call RELAY route.
Regards,
Igor.
-----Message d'origine----- De : Igor Potjevlesch [mailto:igor.potjevlesch@gmail.com] Envoyé : lundi 18 mai 2015 16:42 À : 'Kamailio (SER) - Users Mailing List' Objet : RE: [SR-Users] Issue with Asterisk interconnection for VoiceMail
Hello Daniel,
I can try this. But there are cases where lookup is called and the redirection to VoiceMail is working fine.
Could it be an issue with a missing "append_branch()" instruction?
Regards,
Igor.
-----Message d'origine----- De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel Tryba Envoyé : vendredi 15 mai 2015 10:58 À : sr-users@lists.sip-router.org Objet : Re: [SR-Users] Issue with Asterisk interconnection for VoiceMail
On Friday 15 May 2015 10:30:45 Igor Potjevlesch wrote:
Then, the request goes to RELAY. Here is the issue: sometimes, the request is forwarded to the IP of the UA (the one initially contacted) instead of the IP of Asterisk.
Unset $du ($du=$null) when routing to voicemail.
It is set after a lookup(): http://www.kamailio.org/wiki/cookbooks/4.1.x/pseudovariables#du_-_destinatio n_uri
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users