Hi!
The TM docs give this example (#59): at http://kamailio.org/docs/modules/stable/modules/tm.html#t_reset_fr
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?
/O :-)
Olle E. Johansson writes:
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?
perhaps you should try send_reply() function instead of sl_send_reply.
-- juha
5 okt 2010 kl. 16.42 skrev Juha Heinanen:
Olle E. Johansson writes:
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?
perhaps you should try send_reply() function instead of sl_send_reply.
So the docs are in error...
I used t_reply() which worked...
Thanks, Juha.
/O
2010/10/5 Olle E. Johansson oej@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.
5 okt 2010 kl. 17.43 skrev Iñaki Baz Castillo:
2010/10/5 Olle E. Johansson oej@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
2010/10/5 Olle E. Johansson oej@edvina.net:
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.
I mean the incoming transaction (that created upon receipt of the INVITE). t_relay is executed (the transaction is created). When entering in failure_route that transaction obviously exists (we haven't sent a final reply to the caller yet) so using sl_send_reply is invalid (it can be used just in case the transaction hasn't be created).
You can retrigger it with new branches.
Yes, but it has nothing to do with the incoming transaction which is unique.
Or has it ceased to exist so you simply create a new transaction?
The incoming transaction exists until a final response is sent by kamailio to the client. Outgoing transactions (branches) exist until kamailio receives a final reply for each one.