high.*!
i'm using openser v1.2 and am a bit confused about the scope of the flag.
just for information about my setup: i use openser as gateway between
OCSmediation server and asterisk.
i learned that the message flags are transaction persistent, which means
that if i set some flags while processing the INVITE request, these flags
must be visible also when we process all other requests and replies in scope
of the same transaction.
and i also learned, that the flags which are set for INVITE are visible only
when processing 100 (Trying), 180 (Ringing), and 487 (Request Cancelled).
however, the flags are not visible when processing CANCEL, 200 (OK), and
ACK.
thats for the theory.
now i have two problems:
first (as i mentioned above) i experienced, that 'my' flags are not that
visible as they should be. means e.g. i set flag 3 in request route and
print it out in onreply_route, where it seems not to be set.
see my code below:
route {
...
if (src_ip == 172.xx.xx.xx) {
# relay request to *
if (!t_relay("udp:172.xx.xx.xx:5060")) {
sl_reply_error();
}
}
else {
# relay request to OCS
if (!t_relay("tcp:172.xx.xx.xx:5060")) {
sl_reply_error();
}
}
if (method == INVITE) setsflag(3);
xlog("L_INFO","$Cyb$rm: mf=$mf, bf=$bf, sf=$sf$Cxx\n");
exit;
}
onreply_route {
xlog("L_INFO","$Cyr$rs($rr): mf=$mf, bf=$bf, sf=$sf$Cxx\n");
}
the output is the following:
10(10569) INVITE: mf=0, bf=0, sf=8
7(10566) 100(Trying): mf=0, bf=0, sf=0
5(10564) 180(Ringing): mf=0, bf=0, sf=0
8(10567) 200(OK): mf=0, bf=0, sf=0
10(10569) ACK: mf=0, bf=0, sf=0
6(10565) BYE: mf=0, bf=0, sf=0
11(10570) 200(OK): mf=0, bf=0, sf=0
as you can see the flag 3 is only set, while processing the INVITE but after
this is stays reset.
any ideas which problem i'm facing here?
my second problem is, that i need to identify the reply "200 OK" which is
answered to the relayed INVITE message. as i mentioned above, this will not
be covered by the flags scope anyways. Sad
<http://www.voipuser.org/modules/PNphpBB2/images/smiles/icon_sad.gif>
is there any possibility to have kind of (real) global variables in
openser.cfg?
thx & cheers
-hugo