[SR-Users] Message flags preservation for replies in onsend_route

Alex Balashov abalashov at evaristesys.com
Tue Nov 22 11:07:33 CET 2016


Hi,

I have

--
    flags
       BLAH : 1,
       DUMMY : 12

    onsend_route_reply=yes

    route {
       ...

       setflag(BLAH);

       if(!t_relay())
          sl_reply_error();
    }

    onsend_route {
       if(is_reply() && isflagset(BLAH))
          do_things();
    }
--

My discovery has been that isflagset(BLAH) always == FALSE _unless_ an 
onreply_route has been armed for the request, regardless of whether it 
is necessary.

In other words, the following causes isflagset(BLAH) to == TRUE (if set, 
when appropriate) in the onsend_route for the reply:

--
    flags
       BLAH : 1,
       DUMMY : 12

    onsend_route_reply=yes

    onreply_route[BOGUS] {
       exit;
    }

    route {
       ...

       setflag(BLAH);

       t_on_reply("BOGUS");

       if(!t_relay())
          sl_reply_error();
    }

    onsend_route {
       if(is_reply() && isflagset(BLAH))
          do_things();
    }
--

But without the onreply_route, it doesn't work.

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 (direct) / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/



More information about the sr-users mailing list