[Spce-user] Ring groups in Sipwise via avp_db_load and avp_pushto, possible?

Andreas Granig agranig at sipwise.com
Fri Jul 15 04:29:23 EDT 2011


On 07/15/2011 10:04 AM, Henrik Aagaard Sørensen wrote:
> I'm still trying to solve the problem on getting ring groups to work in
> Sipwise.
> After a lot of Googling I found something with:
> if (avp_db_load("$ruri/username", "$avp(s:cfu)/forward")) {
>     avp_pushto("$ruri", "$avp(s:cfu)/g");
> };

This logic already exists in the code to handle call forward and has
nothing to do with your scenario. What you want to do is some sort of
parallel forking, e.g. call comes in, and for the called party number
you need to do a lookup in some table to fetch multiple subscribers,
then processing the rest of the routing logic for each in a separate branch.

One way to achieve this would be to create a dummy subscriber, which
should then have a new usr_preference like group_members, where multiple
other subscriber URIs are being put in.

In ROUTE_LOAD_CALLEE_PREF of proxy.cfg.tt2 you'd need to handle this
preference after
  avp_db_load("$avp(s:callee_uuid)", "*");
and recursively call ROUTE_FIND_CALLEE for all entries in a loop after
calling append_branch() for each of them. You might even need to move
lots of parts of the config into a branch_route to be processed
properly, also taking in mind that some subscribers might have
provisioned call forwarding etc.

You see, this is far from trivial. It's probably easier to register an
IP-PBX for the main subscriber, and register your users you'd like to
fork to also at this asterisk box?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20110715/e438b5c9/attachment-0001.asc>

More information about the Spce-user mailing list