[sr-dev] dispatcher: limit a number of dst to failover to

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 21 18:19:54 CEST 2014


Hello,

thanks for sending the patch! Two remarks for now:

1) you changed the inter-module API prototype for ds_select_dst_f, 
respectively:

  typedef int (*ds_select_dst_f)(struct sip_msg *msg, int set,
-            int alg, int mode);
+            int alg, unsigned int limit, int mode);

I think the reason for that function is an export to app_lua (and maybe 
other embedded languages). With this change, things get broken there. I 
would do:

- rename the function ds_select_dst() to ds_select_dst_limit()
- add ds_select_dst() as a wrapper function calling the new 
ds_select_dst_limit()

The API stay unchanged, and eventually one can add a new member for 
ds_select_dst_limit() when needed

Otherwise, the change of ds_select_dst() prototype should involve 
reviewing other modules and seeing if people are happy with this change, 
because it breaks existing embedded scripts.

2) You need to document the new functions exported to kamailio config, 
in modules/dispatcher/doc/dispatcher_admin.xml

Once the patch is overall ok, I can commit it to the repository.

Cheers,
Daniel

On 21/08/14 17:40, Alekzander Spiridonov wrote:
> Hi list,
>
> I'd like to propose a patch that allows user to limit the number of 
> items that appears in dst_avp after ds_select_dst or ds_select_domain 
> call.
>
> There are some use cases when one could have couple of dst sets and 
> would like to failover from the first to another without checking all 
> items but have just 3 or 4 of them dead in a row.
>
> What do you think about that?
>
> -- 
> Best regards,
> Alekzander Spiridonov
>
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20140821/8fd1df0a/attachment.html>


More information about the sr-dev mailing list