2018-02-08 16:25 GMT+01:00 Vasiliy Ganchev <vancecezar@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.

Objective:
I'm working on implementing a configuration to support push notification for mobile devices.
Those devices are sending REGISTER with push information inside the URI-PARAMS of
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:

branch_route[MANAGE_BRANCH]
{
  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") {
      route(SENDPUSH);
    }
  }
  
  route(INVITETOFORWARD);
}

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.

Tks!
Aymeric
 
cheers



--
Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



--