[OpenSIPS-Users] Remove Route Header before forwarding

John Quick john.quick at smartvox.co.uk
Mon Apr 8 12:01:53 EDT 2019


Sunil,

I see that you didn't get a reply yet to your query.
I have been using the path header in a setup that has two OpenSIPS Proxies -
1) Edge Proxy which adds the header and 2) The Registrar Server
In my setup, I use the loose_route() function in the Edge Proxy to remove
the route header added to INVITE by the Registrar, following lookup.

Something like this:
  if (has_totag()) {
     if (loose_route()) {
         ...

The loose_route() function will remove the route header provided it
described a route to itself. This is the normal situation.
It will also set the destination if the route header contained a
"received=.." parameter. Both of these actions are useful.

If the INVITE then fails, you should be able to catch it in a failure_route
section and from there you could deal with redirection to another
destination.

Hope this helps.

John Quick
Smartvox Limited





More information about the Users mailing list