Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
api:lua:devel [2010/11/17 00:12] miconda |
api:lua:devel [2010/11/17 13:46] miconda |
||
---|---|---|---|
Line 16: | Line 16: | ||
* **Lua**: http:// | * **Lua**: http:// | ||
+ | Remarks: | ||
+ | |||
+ | * check the modules' | ||
+ | * the parameters must be strings if the prototype have them in between double quotes, or integers if there are no double quotes | ||
+ | * any parameter specified in prototype enclosed in between square brackets is optional | ||
+ | |||
===== SR Package ===== | ===== SR Package ===== | ||
Line 228: | Line 234: | ||
<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() | ||
</ | </ | ||
Line 309: | Line 365: | ||
==== sr.rr.record_route ==== | ==== sr.rr.record_route ==== | ||
+ | |||
+ | Add Record-Route header. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.rr.record_route([" | ||
+ | </ | ||
==== sr.rr.loose_route ==== | ==== sr.rr.loose_route ==== | ||
+ | |||
+ | |||
+ | Handle Route headers. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.rr.loose_route() | ||
+ | </ | ||
+ | |||
===== SR.AUTH Package ===== | ===== SR.AUTH Package ===== | ||
==== sr.auth.www_challenge ==== | ==== sr.auth.www_challenge ==== | ||
+ | |||
+ | Send WWW digest authentication challenge reply (401). | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.auth.www_challenge(" | ||
+ | </ | ||
==== sr.auth.proxy_challenge ==== | ==== sr.auth.proxy_challenge ==== | ||
+ | |||
+ | Send Proxy digest authentication challenge reply (401). | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.auth.proxy_challenge(" | ||
+ | </ | ||
==== sr.auth.pv_www_authenticate ==== | ==== sr.auth.pv_www_authenticate ==== | ||
+ | |||
+ | Perform WWW digest authentication using password from parameter. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.auth.pv_www_authenticate(" | ||
+ | </ | ||
+ | |||
==== sr.auth.pv_proxy_authenticate ==== | ==== sr.auth.pv_proxy_authenticate ==== | ||
+ | |||
+ | |||
+ | Perform Proxy digest authentication using password from parameter. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.auth.pv_proxy_authenticate(" | ||
+ | </ | ||
==== sr.auth.consume_credentials ==== | ==== sr.auth.consume_credentials ==== | ||
+ | |||
+ | Delete authentication credentials from SIP request. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.auth.consume_credentials() | ||
+ | </ | ||
===== SR.AUTH_DB Package ===== | ===== SR.AUTH_DB Package ===== | ||
==== sr.auth_db.www_authenticate ==== | ==== sr.auth_db.www_authenticate ==== | ||
+ | |||
+ | Perform WWW digest authentication against database. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.auth_db.www_authenticate(" | ||
+ | </ | ||
==== sr.auth_db.proxy_authenticate ==== | ==== sr.auth_db.proxy_authenticate ==== | ||
+ | |||
+ | Perform Proxy digest authentication against database. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.auth_db.proxy_authenticate(" | ||
+ | </ | ||
===== SR.MAXFWD Package ===== | ===== SR.MAXFWD Package ===== | ||
==== sr.maxfwd.process_maxfwd ==== | ==== sr.maxfwd.process_maxfwd ==== | ||
+ | |||
+ | |||
+ | Handle Max Forward header. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.maxfwd.process_maxfwd(newlimit) | ||
+ | </ | ||
===== SR.REGISTRAR Package ===== | ===== SR.REGISTRAR Package ===== | ||
==== sr.registrar.save ==== | ==== sr.registrar.save ==== | ||
+ | |||
+ | Save contacts to user location table. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.registrar.save(" | ||
+ | </ | ||
+ | |||
==== sr.registrar.lookup ==== | ==== sr.registrar.lookup ==== | ||
+ | |||
+ | Lookup contacts in user location table. | ||
+ | |||
+ | Prototype | ||
+ | |||
+ | <code c> | ||
+ | sr.registrar.lookup(" | ||
+ | </ | ||
+ |