[SR-Users] t_suspend usage in branch_route

Aymeric Moizard amoizard at gmail.com
Thu Feb 8 17:04:24 CET 2018

2018-02-08 16:25 GMT+01:00 Vasiliy Ganchev <vancecezar at gmail.com>:

> Hi!
> Tks for answering!

> I am not sure that t_suspend is expected to work from branch_route.
> Why not suspend it from the main route?
> Describe in more details what are you going to achieve with the suspend.

I'm working on implementing a configuration to support push notification
for mobile devices.
Those devices are sending REGISTER with push information inside the
the Contact header.

My way to acheive it:
I have a "location" database containing many "Contact" headers for a UA.

Some of those destinations  don't have the "push" informations and I want
to forward
the INVITE to them.
Some of those destinations has "push" information in the URI: such as
pn-provider, pn-param, pn-prid.
I consider those UA as not available and don't want to forward the INVITE
to them. In the
branch route, I have this code:

  if (!strempty($(ru{uri.param,pn-provider})) &&
!strempty($(ru{uri.param,pn-param})) &&
!strempty($(ru{uri.param,pn-prid}))) {
    if ($(ru{uri.param,pn-provider}) == "fcm" && $(ru{uri.param,pn-param})
== "xxxxxxxxx") {


It's very easy to check for each branch the URI parameters of $ru. So I can
send a PUSH NOTIFICATION to every
one of them.


> cheers
> --
> Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Antisip - http://www.antisip.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180208/cb64156e/attachment-0001.html>

More information about the sr-users mailing list