is_from_gw checks the gateways in the DB on their ip address and is used for incoming calls. ' Hence it is perfeclty possible to call is from gateway before do-routing.
Op wo 6 mrt. 2019 om 15:07 schreef Mark Farmer <[email protected]>: > 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 > [email protected] > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
