[OpenSIPS-Users] Dynamic Routing never routes call

John Quick john.quick at smartvox.co.uk
Sat Jan 26 05:05:30 EST 2019


Hi Mark,

Liviu made a mistake in his last response to you. He picked out the debug at
the end of the drouting process, not the beginning. Perhaps he had the
screen upside down.

>From the debug it is clear that do_routing behaved correctly and has worked.
So the problem is either that you have misunderstood what the do_routing()
function is meant to do OR you have a mistake in the code in your script
just after the snippet that you posted to the forum.

do_routing() will only alter the R-URI. It does not then send the request to
the destination and exit. You must do this explicitly, for example:
t_relay()
exit

As a general point for anyone using OpenSIPS, it is worth noting that just
about every function will return.
The only exception I can think of right now is t_check_trans() and even that
will sometimes return - it depends on specific conditions.
If you want the main route in your script to stop executing after a function
has been called, you need to insert an exit statement.
Also note that each type of route has a default behaviour on exit as
described in the documentation under the heading "Types of routes"

John Quick
Smartvox Limited
Web: www.smartvox.co.uk





More information about the Users mailing list