Adapt get_via_branch function to OpenSIPS API

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>