SearchSearch  Log in to check your private messagesLog in to check your private messages  recent posts Recent Posts
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
GawithOffline



Joined: Feb 08, 2008
Posts: 9

Status: Offline
Posted: Apr 08, 2008 - 10:49 AM Reply with quote Back to top
Hi guys,

can anybody tell me, how I can rewrite the SIP status code (and reason) of an incoming response message?
E.g. "convert" a incoming "483 Too many hops" to a "500 My personal error"

Regards.
View user's profile Send private message
spykeOffline



Joined: Feb 07, 2008
Posts: 6

Status: Offline
Posted: Apr 09, 2008 - 02:15 PM Reply with quote Back to top
You can put what you want in the send_reply_error:

if (!mf_process_maxfwd_header("10"))
{

xlog("L_INFO", "Too many hops - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
sl_send_reply("500", "Keep off the grass");
exit;
C.
View user's profile Send private message
GawithOffline



Joined: Feb 08, 2008
Posts: 9

Status: Offline
Posted: Apr 09, 2008 - 02:27 PM Reply with quote Back to top
Thanks for the reply, but your solution does not solve the problem.

I'm looking for a status code rewriting in a proxy scenario:

Proxy1 --INVITE--> OPENSER --INVITE--> Proxy2
Proxy1 <----503--- OPENSER <----483--- Proxy2

The 483 received shall be forwarded as 503.

Regards.
View user's profile Send private message
spykeOffline



Joined: Feb 07, 2008
Posts: 6

Status: Offline
Posted: Apr 09, 2008 - 02:37 PM Reply with quote Back to top
I think you have to do something like this:
....

if((src_ip==proxy2))
{ if(t_check_status("483"))
{ sl_send_reply("503", "Lunch Time");
exit;

You have to put it in the correct route[] in order to forward it to proxy1

C.
View user's profile Send private message
x-consoleOffline
Site Admin


Joined: Aug 01, 2006
Posts: 1133
Location: Leeds UK
Status: Offline
Posted: Apr 09, 2008 - 04:04 PM Reply with quote Back to top
you need the intermediary proxy to be operating satefuly, and you need to catch the negative response in a failure route, and issue your custom error response from there.
View user's profile Send private message Yahoo Messenger


View previous topic Printable version Log in to check your private messages View next topic

Post new topic   Reply to topic
Forum Rules and Guidelines | About VoIP User | Privacy Policy


All logos and trademarks in this site are property of their respective owner.
Comments and posts are property of the poster, all the rest (c) 2003-2006 VoIP User.

No part of this site may be reproduced without our prior consent.