[Kamailio-Users] problem with relaying invite

Alex Balashov abalashov at evaristesys.com
Sun Oct 12 16:52:57 CEST 2008


Yep.  What Iñaki said.

In any sort of programming language-like runtime environment, which 
Kamailio script is, when you evaluate two actual statements in a 
disjunction rather than values holding return codes, those statements 
get executed right then and there.

So, whether the first t_relay() ran successfully or not, the second one 
will be executed.  This won't work unless you branch.

Iñaki Baz Castillo wrote:

> El Domingo, 12 de Octubre de 2008, Asim Riaz escribió:
>> if(!t_relay("udp:third_proxy_1:5060") ||
>>     !t_relay("udp:third_proxy_2:5060")) {
> 
> I think that this is not valid, you can not check the result of sending the 
> request to both destinations.
> 
> If the first condition is false (!t_relay("udp:third_proxy_1:5060") this means 
> that a transaction has been correctly created. But after that you do a new 
> comparision:
>   !t_relay("udp:third_proxy_2:5060")
> The transaction was already created in the first t_realy so you are trying to 
> do it again in a new t_relay, that is illegal.
> 
> 


-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599




More information about the Users mailing list