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




--
Savolainen Dmitri