Hi Grant, There could very well be a better way so hopefully someone else will chime in if they have a better solution however I would leverage a simple $var(example_mode) = 'reply'; - $var's operate on a per process basis so you would simply set it before the route(GEN) call and check its value within the block. This seems like a lightweight and error prone implementation, just be aware that a var will persist on a given process so you'll just need to set it every time before calling the route to be sure you're not using stale data.
Again, hope that helps and I'll be interested if there is a better way - I haven't seen that route parameter syntax before so if that's valid I would also be happy with that approach. Good luck, Callum On Mon, 17 Feb 2020 at 22:01, Grant Bagdasarian <[email protected]> wrote: > Hi Callum, > > Thanks for the reply. I’m aware of the different types of routes and how > to arm reply and branch routes for the parent requests. > > I’m currently trying to port a Kamailio script I’ve written a while back > to OpenSips. One of the routes is fairly generic and called from both > request routes as onreply routes, but depends on the functions is_request > and is_reply, but these are Kamailio specific. > > The only solution I can think of now is passing the type as a route > parameter when called from request or reply routes. > > route(GENERIC_ROUTE, “request”) > Or > route(GENERIC_ROUTE, “reply”) > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- *0333 332 0000 | www.x-on.co.uk <http://www.x-on.co.uk> | ** <https://www.linkedin.com/company/x-on> <https://www.facebook.com/XonTel> <https://twitter.com/xonuk> * X-on is a trading name of Storacall Technology Ltd a limited company registered in England and Wales. Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead, Herts, HP3 9SD. Company Registration No. 2578478. The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient, please notify X-on immediately on +44(0)333 332 0000 and delete the message from your computer. If you are not a named addressee you must not use, disclose, disseminate, distribute, copy, print or reply to this email. Views or opinions expressed by an individual within this email may not necessarily reflect the views of X-on or its associated companies. Although X-on routinely screens for viruses, addressees should scan this email and any attachments for viruses. X-on makes no representation or warranty as to the absence of viruses in this email or any attachments.
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
