[sr-dev] sl_send_reply in failure_route

Olle E. Johansson oej at edvina.net
Tue Oct 5 17:47:39 CEST 2010


5 okt 2010 kl. 17.43 skrev Iñaki Baz Castillo:

> 2010/10/5 Olle E. Johansson <oej at edvina.net>:
>> failure_route[0]{
>>        if (!t_branch_timeout()){
>>                if (t_any_timeout()){
>>                        log("one branch did timeout\n");
>>                        sl_send_reply("408", "Timeout");
>>                }
>>        }
>> }
>> 
>> If I use sl_send_reply in a failure route (like in the example) I get
>> 
>>  0(19813) : <core> [cfg.y:3333]: parse error in config file /etc/kamailio/kamailio.cfg, line 719, column 49: Command cannot be used in the block
>> 
>> Now, is the documentation or the sl module in error?
> 
> It must be an error in the documentation. When entering in
> failure_route this implies that the transaction does exist, so
> sl_send_reply() is not valid.
> 
Hmm. I am not sure you are right here. You enter the failure_route when a transaction fails, but it still exists. You can retrigger it with new branches. Or has it ceased to exist so you simply create a new transaction?

We need to add this to the docs too.
/O




More information about the sr-dev mailing list