Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
api:lua:devel [2010/11/17 00:32] miconda |
api:lua:devel [2010/11/17 13:54] miconda |
||
---|---|---|---|
Line 83: | Line 83: | ||
Note that module functions that have parameter fixups cannot be executed unless they have free fixup. This is to prevent memory leaks caused by fixup functions. If you have doubts about a module function, whether it is safe to execute or not from Lua, ask on devel mailing list: **sr-dev [at] lists.sip-router.org**. | Note that module functions that have parameter fixups cannot be executed unless they have free fixup. This is to prevent memory leaks caused by fixup functions. If you have doubts about a module function, whether it is safe to execute or not from Lua, ask on devel mailing list: **sr-dev [at] lists.sip-router.org**. | ||
+ | |||
+ | ==== sr.is_myself ==== | ||
+ | |||
+ | Return true if the URI matches local IPs and aliases. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.is_myself(" | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== sr.setflag ==== | ||
+ | |||
+ | Set message flag. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.setflag(index) | ||
+ | </ | ||
+ | |||
+ | ==== sr.resetflag ==== | ||
+ | |||
+ | Reset message flag. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.resetflag(index) | ||
+ | </ | ||
+ | |||
+ | ==== sr.isflagser ==== | ||
+ | |||
+ | Test if message flag is set. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.isflagset(index) | ||
+ | </ | ||
+ | |||
+ | ==== sr.sebtflag ==== | ||
+ | |||
+ | Set branch flag. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.setbflag(index) | ||
+ | </ | ||
+ | |||
+ | ==== sr.resetflag ==== | ||
+ | |||
+ | Reset branch flag. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.resetflag(index) | ||
+ | </ | ||
+ | |||
+ | ==== sr.isbflagser ==== | ||
+ | |||
+ | Test if branch flag is set. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.isbflagset(index) | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== sr.seturi ==== | ||
+ | |||
+ | Set request URI. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.seturi(" | ||
+ | </ | ||
+ | |||
+ | ==== sr.setuser ==== | ||
+ | |||
+ | Set request URI user part. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.setuser(" | ||
+ | </ | ||
+ | |||
+ | ==== sr.sethost ==== | ||
+ | |||
+ | Set request URI host part. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.sethost(" | ||
+ | </ | ||
+ | |||
+ | ==== sr.setdsturi ==== | ||
+ | |||
+ | Set destination URI (outbound proxy). | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.setdsturi(" | ||
+ | </ | ||
+ | |||
+ | ==== sr.resetdsturi ==== | ||
+ | |||
+ | Reset destination URI (outbound proxy). | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.resetdsturi() | ||
+ | </ | ||
===== SR.HDR Package ===== | ===== SR.HDR Package ===== | ||
Line 234: | Line 356: | ||
<code c> | <code c> | ||
sr.tm.t_relay() | sr.tm.t_relay() | ||
+ | </ | ||
+ | |||
+ | ==== sr.tm.t_on_branch ==== | ||
+ | |||
+ | Set on branch route. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.tm.t_on_branch(" | ||
+ | </ | ||
+ | |||
+ | ==== sr.tm.t_on_reply ==== | ||
+ | |||
+ | Set on reply route. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.tm.t_on_reply(" | ||
+ | </ | ||
+ | |||
+ | ==== sr.tm.t_on_failure ==== | ||
+ | |||
+ | Set on failure route. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.tm.t_on_failure(" | ||
+ | </ | ||
+ | |||
+ | ==== sr.tm.t_check_trans ==== | ||
+ | |||
+ | Check for existence of transaction. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.tm.t_check_trans() | ||
+ | </ | ||
+ | |||
+ | ==== sr.tm.t_is_canceled ==== | ||
+ | |||
+ | Return >0 if the INVITE transaction is canceled. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.tm.t_is_canceled() | ||
</ | </ | ||