[SR-Users] question about dlg_var

张顺通 shuntongzhang at gmail.com
Thu Mar 3 04:55:12 CET 2016


I want to distingguish 200 OK is for INVITE or reINVITE。

so I do this:
request_route {
    if (is_method("INVITE") && !has_totag()) {
        $dlg_var(is_init_invite) = "1";
    }
}

onreply_route {
    xlog("L_INFO","[$rs-$rr][is_init_invite:$dlg_var(is_init_invite)]");
    if (is_method("INVITE") && t_check_status("200") &&
$dlg_var(is_init_invite) == "1") {
        # do somting
        $dlg_var(is_init_invite) = "0";
    }
    xlog("L_INFO","[$rs-$rr][is_init_invite:$dlg_var(is_init_invite)]");
}

What I confuse is:
When I recive 100 Trying LOG is
[100 - Trying][is_init_invite:0]
[100 - Trying][is_init_invite:1]

why is_init_invite is 0?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160303/356919ec/attachment.html>


More information about the sr-users mailing list