[SR-Users] Process redirected message

Daniel Tryba d.tryba at pocos.nl
Thu Aug 11 16:06:04 CEST 2016


On Thu, Aug 11, 2016 at 04:46:38PM +0300, jaflong jaflong wrote:
> kamailio A relays to kamailio B
> kamailio B send 300 redirect back to kamailio A
> 
> 
> In this setup how do I catch the redirect response back from kamailio B
> What conditions should I do to catch and further process the redirect message


You need to set a failure route that handles the 300. There you need to
parse the Contact header of the response, eg:

if (t_check_status("300"))
{
  $du=null
  $ru=$T_rpl($ct);
  route(RELAY);
  exit;
}





More information about the sr-users mailing list