<meta http-equiv="Content-Type" content="text/html; charset=GB18030"><div>in the cmd_fucntion, i want to check whether the flag 4 is set.</div><div><br></div><div>```</div><div><div>static int update_zone_code (struct sip_msg* msg, char *param) {</div><div>    LM_DBG("update_zone_code %s\n", param);</div><div>    LM_DBG("========start print method src_ip dst_ip\n");</div><div>    LM_DBG("method: %s, ru: %s\n", msg->first_line.u.request.method.s, GET_RURI(msg)->s);</div><div>    LM_DBG("src_ip: %s, src_port: %d\n", ip_addr2a(&msg->rcv.src_ip), msg->rcv.src_port);</div><div>    LM_DBG("dst_ip: %s, dst_port: %d\n", ip_addr2a(&msg->rcv.dst_ip), msg->rcv.src_port);</div><div><br></div><div>    //</div><div>    LM_DBG("========start print Flags: %u\n", msg->flags);</div><div><br></div><div>    if (msg->flags & (1<<4)) {</div><div>        LM_DBG("Flag 4 is set\n");</div><div>    } else {</div><div>        LM_DBG("Flag 4 is not set\n");</div><div>    }</div></div><div>```</div><div><br></div><div>in the opensips.cfg</div><div><br></div><div>```</div><div><div>modparam("demo_module","static_zone_map", "1510217=0728")</div><div>modparam("demo_module","static_zone_map", "1510218=0720")</div><div>modparam("demo_module","static_zone_map", "1510219=0723")</div><div>modparam("demo_module","static_zone_map", "1510219=0723")</div><div><br></div><div>route{</div><div>    xlog("hello");</div><div>    <font color="#ff0000"><b>setflag(4);</b></font></div><div>    setflag(5);</div><div>    setflag(6);</div><div>    if (isflagset(6)) {</div><div>        xlog("flag 6 is set");</div><div>    } else {</div><div>        xlog("flag 6 is set");</div><div>    }</div><div>    update_zone_code("1210219");</div><div>}</div></div><div>```</div><div><br></div><div>in the log</div><div><br></div><div>```</div><div><div>Nov  3 15:55:34 [6178] DBG:demo_module:update_zone_code: ========start print Flags: 7</div><div>Nov  3 15:55:34 [6178] DBG:demo_module:update_zone_code:<b> <font color="#ff0000">Flag 4 is not set</font></b></div></div><div>```</div><div><br></div><div>it print the flag is not set,</div>