Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api:lua:devel [2010/11/17 13:46]
miconda
api:lua:devel [2011/02/03 09:47] (current)
85.178.84.141
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("uri")
 +</code>
 +
 +
 +==== sr.setflag ====
 +
 +Set message flag.
 +
 +Prototype
 +
 +<code c>
 +sr.setflag(index)
 +</code>
 +
 +==== sr.resetflag ====
 +
 +Reset message flag.
 +
 +Prototype
 +
 +<code c>
 +sr.resetflag(index)
 +</code>
 +
 +==== sr.isflagser ====
 +
 +Test if message flag is set.
 +
 +Prototype
 +
 +<code c>
 +sr.isflagset(index)
 +</code>
 +
 +==== sr.sebtflag ====
 +
 +Set branch flag.
 +
 +Prototype
 +
 +<code c>
 +sr.setbflag(index)
 +</code>
 +
 +==== sr.resetflag ====
 +
 +Reset branch flag.
 +
 +Prototype
 +
 +<code c>
 +sr.resetflag(index)
 +</code>
 +
 +==== sr.isbflagser ====
 +
 +Test if branch flag is set.
 +
 +Prototype
 +
 +<code c>
 +sr.isbflagset(index)
 +</code>
 +
 +
 +==== sr.seturi ====
 +
 +Set request URI.
 +
 +Prototype
 +
 +<code c>
 +sr.seturi("uri")
 +</code>
 +
 +==== sr.setuser ====
 +
 +Set request URI user part.
 +
 +Prototype
 +
 +<code c>
 +sr.setuser("user")
 +</code>
 +
 +==== sr.sethost ====
 +
 +Set request URI host part.
 +
 +Prototype
 +
 +<code c>
 +sr.sethost("host")
 +</code>
 +
 +==== sr.setdsturi ====
 +
 +Set destination URI (outbound proxy).
 +
 +Prototype
 +
 +<code c>
 +sr.setdsturi("uri")
 +</code>
 +
 +==== sr.resetdsturi ====
 +
 +Reset destination URI (outbound proxy).
 +
 +Prototype
 +
 +<code c>
 +sr.resetdsturi()
 +</code>
  
 ===== SR.HDR Package ===== ===== SR.HDR Package =====
Line 498: Line 620:
 </code> </code>
  
 +
 +===== SR.dispatcher Package =====
 +
 +==== sr.dispatcher.select ====
 +
 +Select first destination address.
 +
 +Prototype
 +
 +<code c>
 +sr.dispatcher...
 +</code>
 +
 +==== sr.dispatcher.next ====
 +
 +Select next destination address.
 +
 +Prototype
 +
 +<code c>
 +sr.dispatcher...
 +</code>
 +
 +==== sr.dispatcher.mark ====
 +
 +Set status for destination address.
 +
 +Prototype
 +
 +<code c>
 +sr.dispatcher...
 +</code>
 +
 +==== sr.dispatcher.is_from ====
 +
 +Detects if the message comes from a dispatcher address.
 +
 +Prototype
 +
 +<code c>
 +sr.dispatcher...
 +</code>
 +
 +===== SR.XHTTP Package =====
 +
 +==== sr.xhttp.reply ====
 +
 +Send an HTTP reply.
 +
 +Prototype
 +
 +<code c>
 +sr.xhttp.reply(code, reason, content-type, body)
 +</code>

Navigation

Wiki

Other

QR Code
QR Code api:lua:devel (generated for current page)