[SR-Users] manually append_branch to lookup result

David Villasmil david.villasmil.work at gmail.com
Tue Sep 7 17:21:25 CEST 2021


Nice!

On Tue, 7 Sep 2021 at 15:22, Володимир Іванець <volodyaivanets at gmail.com>
wrote:

> Looks like append_branch() needs to be before the lookup(). I just tried
> placing it there and it worked fine.
>
> Thank you.
>
> Regards, Volodymyr Ivanets
>
> вт, 7 вер. 2021 о 17:03 Володимир Іванець <volodyaivanets at gmail.com> пише:
>
>> David,
>>
>> Thank you for sharing your solution!
>>
>> Just to clarify. Do you use the same or a different location for GSM
>> contacts than for regular contacts (do you perform lookup only from one
>> location or two times from different locations)?
>>
>> Thanks a lot!
>>
>> Regards, Volodymyr Ivanets
>>
>> вт, 7 вер. 2021 о 16:25 David Villasmil <david.villasmil.work at gmail.com>
>> пише:
>>
>>> Hello,
>>>
>>> I ended up simply adding an extra location for these specific users. I
>>> needed to do it for GSM users, so adding the GSM users to the location
>>> table would immediately add a branch in addition to whatever location the
>>> user had if registered.
>>>
>>> Hope that helps
>>>
>>> David
>>>
>>> On Tue, 7 Sep 2021 at 14:10, Володимир Іванець <volodyaivanets at gmail.com>
>>> wrote:
>>>
>>>> Hello David!
>>>>
>>>> I'm trying to do a similar thing and can not make Kamailio create an
>>>> additional branch. Were you able to find a solution?
>>>>
>>>> Thank you!
>>>>
>>>> Regards, Volodymyr Ivanets
>>>>
>>>> вт, 15 черв. 2021 о 17:03 David Villasmil <
>>>> david.villasmil.work at gmail.com> пише:
>>>>
>>>>> 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
>>>>>
>>>> __________________________________________________________
>>>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>>>>   * sr-users at lists.kamailio.org
>>>>> Important: keep the mailing list in the recipients, do not reply only
>>>>> to the sender!
>>>>> Edit mailing list options or unsubscribe:
>>>>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>
>>>> __________________________________________________________
>>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>>>   * sr-users at lists.kamailio.org
>>>> Important: keep the mailing list in the recipients, do not reply only
>>>> to the sender!
>>>> Edit mailing list options or unsubscribe:
>>>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>> --
>>> Regards,
>>>
>>> David Villasmil
>>> email: david.villasmil.work at gmail.com
>>> phone: +34669448337
>>> __________________________________________________________
>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>>   * sr-users at lists.kamailio.org
>>> Important: keep the mailing list in the recipients, do not reply only to
>>> the sender!
>>> Edit mailing list options or unsubscribe:
>>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

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/20210907/8d4ddf8f/attachment.htm>


More information about the sr-users mailing list