[OpenSIPS-Users] Calling multiple contacts

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Mar 31 14:42:47 UTC 2022


Hi Karsten,

why using the record_route_preset()? it just make your life more 
complicated. Simply do before the t_relay() a record_route() and you 
should be done.

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS eBootcamp 23rd May - 3rd June 2022
   https://opensips.org/training/OpenSIPS_eBootcamp_2022/

On 3/30/22 9:04 PM, Karsten Wemheuer wrote:
> Hi,
>
> Am Dienstag, dem 29.03.2022 um 17:01 +0200 schrieb Karsten Wemheuer:
>> Hi *,
>>
>> I am new to the list and I have a problem of understanding that
>> unfortunately I could not solve with Google and reading the
>> documentation.
>>
>> My setup:
>> Phones register to OpenSIPs. Calls from the phones are transferred to
>> a
>> PBX via t_relay. This part is working fine.
>>
>> Requests from the PBX arrive in a route block to "lookup()". Now it
>> is
>> so that some AOR are found with multiple contacts. t_relay() directs
>> these to the correct targets. Phones are ringing in parallel.
>>
>> My problem: In some cases, manipulations have to be done on only some
>> of the outgoing requests. Think of one contact reachable by udp,
>> others
>> by tcp or tls. I thought of using record_route_preset in the
>> branch_route. But this leads to an error (calling rr twice is not
>> possible).
>>
>> Do You have any hints or examples for such a use case?
>>
>> Thanks in advance,
>>
>> Karsten
> to make the whole thing a bit more concrete, here is the section from
> the configuration:
>
> route[TOPHONES] {
>    if ( !lookup("location") ) {
>      sl_send_reply(404, "Not Found");
>      exit;
>    }
>
>    t_on_branch("AST2PHONE");
>
>    if ( $rm == "CANCEL" ) {
>      if (!t_relay(8)) {
>        sl_reply_error();
>      }
>      exit;
>    }
>
>    if (!t_relay()) {
>      sl_reply_error();
>    }
> }
>
> branch_route[AST2PHONE] {
>    t_on_reply("PHONE_REPlY");
> }
>
> In some cases lookup() returns multiple responses. The entries found
> must be partially reached via UDP or TLS or via NAT. Should I use
> record_route? Where could this happen?
>
> Thanks for any hints!
>
> Best regards,
>
> Karsten
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list