*Thank you for your help,$avp and flag is ok.*
2016-03-03 17:22 GMT+08:00 Julia Boudniatsky :
> Hello,
>
>
>
> I am using two different on_reply routes:
>
>
>
> if (is_method("INVITE") && !has_totag()) {
> ...
>t_on_reply(REPLY_TO_SOURCE);
> }
>
> route[WITHINDLG] {
>
> if(has_to_tag(
Hello,
I am using two different on_reply routes:
if (is_method("INVITE") && !has_totag()) {
...
t_on_reply(REPLY_TO_SOURCE);
}
route[WITHINDLG] {
if(has_to_tag()) {
t_on_reply(REPLY_IN_DIALOG);
}
May be it will help.
Best regards,
Julia.
On Thu, Mar 3, 2016 a
Hi,
If I understood correctly the original question was to identify, in a reply
route, a 200 OK coming for an initial INVITE.
In the reply route the 200 OK will always have a to tag (unless the UAS is
broken), so you cannot this condition.
Regards,
Federico
On Thu, Mar 3, 2016 at 9:05 AM, Serge
Hi,Sorry, but why not to check has_totag again? Why we need a flag?-- Wbr, Serge via mobile03.03.2016, 09:31, "Federico Cabiddu" :Hi,$dlg_var is not available at this stage of the dialog:http://www.kamailio.org/docs/modules/devel/modules/dialog.html#idp19330392To achieve your goal you can use there
Hi,
$dlg_var is not available at this stage of the dialog:
http://www.kamailio.org/docs/modules/devel/modules/dialog.html#idp19330392
To achieve your goal you can use there an avp or a flag, which are bound to
transactions.
Something like:
#define INIT_FLAG
if (is_method("INVITE") && !has_totag
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"