[SR-Users] manually append_branch to lookup result

David Villasmil david.villasmil.work at gmail.com
Tue Jun 15 16:00:43 CEST 2021


Hello guys,

I'm trying to dynamically add a branch after doing lookup.
The user is found, but in some cases I need to add a branch and do parallel
forking.

So i'm basically doing:

route[LOCATION] {
    if (!lookup("location")) {
        ....
    }

    if (something) {
        route(BRANCH_TO_EXTRA);
    }

    route(RELAY);
}

route[BRANCH_TO_EXTRA] {
    $fs = MY_SOCKET;
    append_branch("sip:$tU@" + $sel(cfg_get.pstn.gw_ip) + ":" +
$sel(cfg_get.pstn.gw_port));
    return;
}

For some reason only the branch appended is being used (I have
append_branches=1)

Ideas?

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210615/a357d0c8/attachment.htm>


More information about the sr-users mailing list