I'm not suggesting that t_next_contacts deviates from the README. I'm looking for its specific use case when combined with the outbound module. At the very least, the example registrar configuration here: http://www.kamailio.org/docs/modules/4.4.x/modules/outbound.html is incomplete, in that it will always result in this error when there's only one binding in the registrations table.

I suppose it's just a matter of checking for t_next_contacts() == -1 in the initial fork, and then check for < 0 in subsequent failure routes. I apologize if my original message was unclear, but this was a request for clarification, not a bug report - though I will try to make a PR for the outbound documentation page when I get this working.

Best,
Colin

On Sun, Jul 24, 2016 at 12:51 PM Juha Heinanen <jh@tutpro.com> wrote:
Colin Morelli writes:

> When there's one registration binding in the locations table,
> t_load_contacts doesn't seem to do anything and as a result
> t_next_contacts fails.

t_next_contacts() does work as specified in README:

  Function returns 1 if contacts_avp was not empty and a destination set
  was successfully added, returns -2 if contacts_avp was empty and thus
  there was nothing to do, and returns -1 in case of an error (see
  syslog).

so you just have to test the return value accordingly.

-- juha

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users