Sounds good – but I do not know howo to handle that.

 

Do you have a config example?

 

Von: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] Im Auftrag von Carsten Bock
Gesendet: Sonntag, 24. November 2013 20:52
An: SR-Users
Betreff: Re: [SR-Users] error handling

 

You could check, if you can send the announcement as early media (183 Session progress) and afterwards decline the call from FreeSwitch. In this case, you should not get a 200 Ok from FreeSwitch,  but another SIP reply, which you could mofify in yout Kamailio config...

Carsten

Am 24.11.2013 20:44 schrieb "Oliver Roth" <oliver.roth@triotel.ch>:

Sorry – I do not understand what you mean …

 

I added the following code at the end of the failure_route – seems to work

 

 

        if (t_grep_status("404")){

                xlog("L_INFO", "ORO Status 404 - not found");

                t_reply("404", "not found");

                exit;

        }

 

 

Von: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] Im Auftrag von Brandon Armstead
Gesendet: Sonntag, 24. November 2013 20:41
An: Kamailio (SER) - Users Mailing List
Cc: Kamailio (SER) - Users Mailing List
Betreff: Re: [SR-Users] error handling

 

Acc_db_request

Sent from my iPhone


On Nov 24, 2013, at 11:20 AM, Oliver Roth <oliver.roth@triotel.ch> wrote:

Hi all

 

Question about error handling with kamailio.

 

We send call to carrier and get back error 404.

In carrierfailureroute we catch up this error and send call to an internal freeswitch that plays a voiceprompt saying: “destination not available”

 

In accounting this calls is collected like a “normal” call – cause the internal freeswitch did the connection.

I would like to play the voiceprompt but get the error 404 and see the call in the missed calls acc table.

 

With 486 (busy) it is simple because we do not need an rtp response … just fast busy.

 

How can we handle this for errors we need to play a voiceprompt?

 

What we do in failure route:

 

failure_route[MANAGE_FAILURE] {

 

        sip_trace();

        setflag(22);

        if (t_grep_status("486")){

                xlog("L_INFO", "Status 486 - busy");

                t_reply("486", "Busy");

                exit;

        }

 

 

        revert_uri();

        route(NATMANAGE);

 

        if (t_is_canceled()) {

                exit;

        }

 

        xlog("L_INFO", "failure_route rd: $rd replCode:  $T_reply_code trunk_in: $avp(s:trunk_in) Tree: $avp(s:tree), rU:  $rU, todirection $avp(s:todirection) fu: $fu\n");

 

        if(!cr_next_domain("$avp(s:cr_pref_carr)", "$avp(s:tree)", "$rU", "$avp(s:trunk_in)", "$T_reply_code", "$avp(s:tree)" )){

                xlog("cr_next_domain failed");

                exit;

        }

 

        if(!cr_route("$avp(s:cr_pref_carr)", "$avp(s:tree)", "$rU", "$rU", "call_id", "$avp(s:todirection)" )){

                xlog("cr_route failed");

                exit;

        }

 

 

        xlog("L_INFO", "failure_route rd: $rd replCode:  $T_reply_code trunk_in: $avp(s:trunk_in) Tree: $avp(s:tree), rU:  $rU, todirection $avp(s:todirection) fu: $fu \n");

        $avp(s:trunk_out) = $avp(s:todirection);

 

        xlog(, "L_INFO", "RELAY - FailureRoute: Outbound sent via $avp(s:trunk_out) rU $rU -------------------------------------------------------- ");

        if (is_method("INVITE"))

        {

                setflag(FLT_ACC); # do accounting

                setflag(FLT_ACCMISSED); # oro 28.10.13

        }

 

 

        route(ALTERHEADER);

 

        t_on_failure("MANAGE_FAILURE");

        #append_branch();

 

        if (!t_relay()) {

                xlog("failureroute t_relay failed");

                exit;

        }

 

}

_______________________________________________
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


E-Mail ist virenfrei.
Von AVG überprüft - www.avg.de
Version: 2014.0.4158 / Virendatenbank: 3629/6863 - Ausgabedatum: 24.11.2013


_______________________________________________
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


E-Mail ist virenfrei.
Von AVG überprüft - www.avg.de
Version: 2014.0.4158 / Virendatenbank: 3629/6863 - Ausgabedatum: 24.11.2013