[OpenSIPS-Users] drouting() Function Availability
Mark Farmer
farmorg at gmail.com
Wed Mar 6 09:03:02 EST 2019
Hi everyone
I am confused about when drouting() functions become available. I resolved
an issue using is_from_gw() & goes_to_gw() by using them after
do_routing(). But looking at my trunking script I see that is_from_gw() is
being used before do_routing() to check if the call is coming from a known
gateway. This was generated by the "Generate OpenSIPS Script" in make
menuconfig which I guess knows better than me :)
How come it works before do_routing() here but would not work for me
elsewhere?
route{
if (!mf_process_maxfwd_header("10")) {
send_reply("483","Too Many Hops");
exit;
}
if ( check_source_address("0","$avp(trunk_attrs)") ) {
# request comes from trunks
setflag(IS_TRUNK);
} else if ( is_from_gw() ) {
# request comes from GWs
} else {
send_reply("403","Forbidden");
exit;
}
TIA for explanations.
Mark.
--
Mark Farmer
farmorg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190306/6efab51c/attachment.html>
More information about the Users
mailing list