[OpenSIPS-Users] confusion about the reply route and the failure route
Răzvan Crainea
razvan at opensips.org
Thu Nov 21 09:47:51 EST 2019
On 11/21/19 4:17 PM, Ben Newlin wrote:
> "Moreover, in failure route you can only drop a reply, but you cannot failover."
>
> I think this should say in reply route.
That is correct, my apologies, you can only drop a response in reply_route.
>
> Ben Newlin
>
> On 11/21/19, 3:56 AM, "Users on behalf of Răzvan Crainea" <users-bounces at lists.opensips.org on behalf of razvan at opensips.org> wrote:
>
> Hello!
>
> By default, the replies received by OpenSIPS are relayed further,
> whether you have a reply of failure route or not. The purpose of these
> two routes is to do any processing on the messages they are processing.
> Note that the scope of failure route and reply route is a bit different:
> the reply route is ran for each reply message - this means that if you
> for example add a header on a 408, that 408 message will contain the
> header. Moreover, in failure route you can only drop a reply, but you
> cannot failover.
> The failure route has nothing to do with replies processing - it is ran
> in the context of the initial request. This means that if you add a
> header in failure route, it will not appear in any replies! However, if
> you run t_relay() in failure route, you will create a new branch - send
> the request to a new upstream - that request will contain the added
> header. The only thing that failure route running relates to replies is
> the fact that if you do a t_relay() in failure route and dispatch the
> request to a new destination, no reply will be sent downstream.
> To summarize, if you don't use reply route or failure route, all
> responses will be sent. The only exception to this rule is when you use
> parallel forking: send the initial request to multiple destinations in
> parallel. In such case, according to RFC 3261, OpenSIPS will only relay
> downstream the result all replies received from upstream - that is the
> lowest terminal response code.
>
> Best regards,
> Răzvan
>
>
> On 11/21/19 4:30 AM, 汤世祥 wrote:
> > Hi:
> > I'm a little confused about the reply route and the failure route.
> > Both can handle 404/408 responses in invite session. Both default action is to relay back the SIP reply.
> > If I omit two routes in scripts(that meas not arm the reply route by using the t_on_reply("name") function or t_on_failure("name") function) or call t_relay() in these two routing scripts, will there be two responses sent ?
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
> --
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
More information about the Users
mailing list