Hello,
The 404 No t found was received for another server, we had the code on the onreply_route and that work.


if(t_check_status("404")){
    xlog("L_ERR", "404 Not found\n");
        append_hf("Reason: Q.850; cause=1\r\n");
    xlog("L_ERR", "404 Not found apres\n");
        exit;
  }


Thanks,

Alexandre Rendour

Acropolis Telecom <http://www.acropolistelecom.net>

rend...@acropolistelecom.net
<mailto:rend...@acropolistelecom.net>
Adresse : 161-163 avenue Gallieni
Paris - Porte de Bagnolet
93170 Bagnolet

Le 30/04/2010 12:50, Daniel-Constantin Mierla a écrit :
Hello,

On 4/30/10 11:07 AM, Alex Rendour wrote:
Hi,
We need to add  header on the failure route.

Exemple:
On failure  404 Not found, we need add header
                        Reason: Q.850; cause=1


We tried this in failure_route:

if(t_check_status("404")){
    xlog("L_ERR", "404 Not found\n");
        append_to_reply("Reason: Q.850; cause=1\r\n");
    xlog("L_ERR", "404 Not found apres\n");
        exit;
  }


and

if(t_check_status("404")){
    xlog("L_ERR", "404 Not found\n");
        append_hf("Reason: Q.850; cause=1\r\n");
    xlog("L_ERR", "404 Not found apres\n");
        exit;
  }

The twice doesn't work.

Someone can help me?
is it a received 404? Or you enforce it with t_reply() from failure route?

If it is received, you cannot do much on failure_route() since you process the request there. If it is enforced, then append_to_reply() should work, just confirm is not working and I will investigate.

For received replies the solution is to use a onreply_route[x]. Before relaying the request, use t_on_reply("x") and then in the onreply_route[x] use append_hf(...)

Cheers,
Daniel


_______________________________________________
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

Reply via email to