Hi, I ended up using ts_store and ts_append as this seems to be more convenient.
I guess t_suspend was not built to support what I tried. May be the documentation should be changed to indicate that it should be used only in request route block (and may be reply route block), but not in branch. I was able to loop over the destination URI in the request route block after my lookup by using $ru for the main branch, and $(branch(uri)[$var(i)] for all the others. It worked perfectly! Tks, Aymeric www.antisip.com 2018-02-08 17:04 GMT+01:00 Aymeric Moizard <amoiz...@gmail.com>: > > > 2018-02-08 16:25 GMT+01:00 Vasiliy Ganchev <vancece...@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 >> > > > > -- > Antisip - http://www.antisip.com > -- Antisip - http://www.antisip.com
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users