[SR-Users] t_uac_send function with From tag

João Vitor Arruda joao.arruda at gmail.com
Fri Nov 20 17:43:50 CET 2020


Thanks Daniel,

I've tried t_cancel_callid function but it didn't work in this case.
I'm not trying to cancel a local generated INVITE.

Let me explain what i'm trying to do and maybe you have some
additional suggestions.

This is a case of serial forking controlled by kamailio.
The original received INVITE is sent to the first destination (in an
array of destinations to be tried out) and if it replies with 486 or
we have 408 on branch timeout then the next destination is set to $rU
and we t_relay() again.
This will both send the new INVITE out and the CANCEL to the previous
target which is working fine.

But to workaround a specific issue with one of the destinations
identifying two sequential tries as a looped request I would like to
first send the CANCEL for the previous INVITE, wait some seconds and
then send the new INVITE out.

Regards,
Joao Arruda

Em sex., 20 de nov. de 2020 às 11:44, Daniel-Constantin Mierla
<miconda at gmail.com> escreveu:
>
> Maybe it works to use:
>
>   *
> https://www.kamailio.org/docs/modules/stable/modules/tmx.html#tmx.f.t_cancel_callid
>
> Haven't used it for local generated INVITEs (as I guess you do), but it
> may work.
>
> Cheers,
> Daniel
>
> On 19.11.20 23:09, João Vitor Arruda wrote:
> > I have a follow up question on this.
> >
> > Now that the From tag works as expected I'm not getting a "400 Bad
> > Request" for the CANCEL being created by the t_uac_send inside a
> > failure_route anymore.
> > But now i'm getting "481 Call/Transaction Does Not Exist"
> > Since the from header and tag, to header, Call-ID and CSeq all matches
> > the original INVITE I suspect that is because the Via header branch
> > parameter in the CANCEL doesn't match the one from the original
> > INVITE.
> >
> > There is a way to make it matching?
> >
> > Regards,
> > Joao Arruda
> >
> > Em qui., 19 de nov. de 2020 às 17:40, João Vitor Arruda
> > <joao.arruda at gmail.com> escreveu:
> >> Hi Daniel,
> >>
> >> I've tried this patch and now the From tag works as expected.
> >> Thank you very much for the quick response and patch.
> >>
> >> Regards,
> >> Joao Arruda
> >>
> >> Em qui., 19 de nov. de 2020 às 13:09, Daniel-Constantin Mierla
> >> <miconda at gmail.com> escreveu:
> >>> Hello,
> >>>
> >>> can you try with master branch or with the patch from the next commit?
> >>>
> >>>   *
> >>> https://github.com/kamailio/kamailio/commit/aa6e9963b2725c1b6b7e5ff995a77c222d95fa3c
> >>>
> >>> If all ok, then I can backport to stable branches.
> >>>
> >>> Cheers,
> >>> Daniel
> >>>
> >>> On 18.11.20 21:45, João Vitor Arruda wrote:
> >>>> Hello,
> >>>>
> >>>> I'm trying to use the function t_uac_send inside a failure_route as
> >>>> described in https://kamailio.org/docs/modules/5.3.x/modules/tm.html#tm.f.t_uac_send
> >>>> to send a CANCEL out.
> >>>>
> >>>> Although the documentation says "it can include From/To tags" i was
> >>>> not able to get the from tag provided to be used. Another random
> >>>> generated one is used.
> >>>>
> >>>> I've tried the following format without success:
> >>>> t_uac_send("CANCEL", "$ru", "", "", "From: <$fu>;tag=$ft\r\nTo:
> >>>> $tu\r\nCall-ID: $ci\r\n", "")
> >>>> t_uac_send("CANCEL", "$ru", "", "", "From: $fu;tag=$ft\r\nTo:
> >>>> $tu\r\nCall-ID: $ci\r\n", "")
> >>>> t_uac_send("CANCEL", "$ru", "", "", "From:
> >>>> bob at kamailio.org;tag=2w3e\r\nTo: $tu\r\nCall-ID: $ci\r\n", "")
> >>>>
> >>>> In the last one which is copied from the documentation that is how the
> >>>> From header going out looks like:
> >>>> From: <bob at kamailio.org;tag=2w3e>;tag=3393f0703fb0ccaca74109ff37de39f5-36d71ef0
> >>>>
> >>>> Any tips on how to get the From tag passed to the function to be used?
> >>>>
> >>>> Thanks,
> >>>> Joao Arruda
> >>>>
> >>>> _______________________________________________
> >>>> Kamailio (SER) - Users Mailing List
> >>>> sr-users at lists.kamailio.org
> >>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >>> --
> >>> Daniel-Constantin Mierla -- www.asipto.com
> >>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> >>> Funding: https://www.paypal.me/dcmierla
> >>>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
>



More information about the sr-users mailing list