[OpenSIPS-Users] redirect server and paralel forking using registrar module
Carlos Oliva
carlos.oliva at numintec.com
Fri Jun 27 19:33:35 CEST 2014
Hello!
I'm trying to implement a redirect server based in example of:
https://github.com/OpenSIPS/opensips/blob/master/examples/redirect.cfg
but I have one doubt:
If I use usrloc and registrar module, How can I know if there are one
or more AORs?
In the example Bogdan do:
# rewrite current URI, which is always part of destination ser
rewriteuri("sip:parallel at siphub.net:9");
# append one more URI to the destination ser
append_branch("sip:redirect at siphub.net:9");
# redirect now
sl_send_reply("300", "Redirect");
But if I use lookup to get the AORs, how can I know if there are only
one AOR and I must send a 302 or many AORs and I must send a 300? and,
how can i know how many append_branch I must do?
In the registrar module documentation I read about b flag in lookup:
"If there are multiple contacts for the given username in usrloc and
this flag is not set, Request-URI will be overwritten with the
highest-q rated contact and the rest will be appended to sip_msg
structure and can be later used by tm for forking"
but I don't know if there is any "automatic" way of doing the branches
before sending the 300 or 302 response or I must count the AORs and
manually do as many branches as needed.
any hints?
Regards,
Carlos Oliva
More information about the Users
mailing list