[SR-Users] Foward REGISTER to all dispatcher members
miconda at gmail.com
Mon Sep 15 11:46:16 CEST 2014
On 15/09/14 08:33, Kees Meijs - SIGNET B.V. wrote:
> Dear list members,
> Currently I'm using the dispatcher module to distribute traffic
> towards media servers (being Asterisk, in my case). I'd like to
> forward REGISTER requests to all (active) dispatcher members, e.g.
> using a short and simple while loop.
> Could someone please give me some pointers towards the right
> direction? Is it for example possible to use the MI di_list
> functionality for iterating over all the members?
you can call ds_select_dst() for register request. The first selected
gateway is in dst_uri ($du), so that can be simply relayed.
Then you can access the rest of the destination via $avp(name) you sent
to dst_avp parameter:
In a while loop, you can append branches to register before relaying:
... # appends branch, etc..
$avp(name) = $null);
Iirc, also first selected destination is in this avp list, so you may
need to skip first entry.
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany
More information about the sr-users