db_url
(string)user_column
(string)domain_column
(string)sd_user_column
(string)sd_domain_column
(string)new_uri_column
(string)domain_prefix
(string)use_domain
(int)sd_lookup(table [, owner])
db_url
parameteruser_column
parameterdomain_column
parametersd_user_column
parametersd_domain_column
parameternew_uri_column
parameterdomain_prefix
parameteruse_domain
parametersd_lookup
usageThis module provides on-server speed dial facilities. An user can store records consisting of pairs short numbers (2 digits) and SIP addresses into a table of OpenSER. Then it can dial the two digits whenever it wants to call the SIP address associated with them.
The following modules must be loaded before this module:
database module (mysql, dbtext, ...).
The following libraries or applications must be installed before running OpenSER with this module loaded:
None.
db_url
(string)The URL of database where the table containing speed dial records.
Default value is DEFAULT_RODB_URL.
user_column
(string)The name of column storing the user name of the owner of the speed dial record.
Default value is "username".
domain_column
(string)The name of column storing the domain of the owner of the speed dial record.
Default value is "domain".
sd_user_column
(string)The name of the column storing the user part of the short dial address.
Default value is "sd_username".
sd_domain_column
(string)The name of the column storing the domain of the short dial address.
Default value is "sd_domain".
new_uri_column
(string)The name of the column containing the URI that will be use to replace the short dial URI.
Default value is "new_uri".
domain_prefix
(string)If the domain of the owner (From URI) starts with the value of this parameter, then it is stripped before performing the lookup of the short number.
Default value is NULL.
use_domain
(int)The parameter specifies wheter or not to use the domain when searching a speed dial record (0 - no domain, 1 - use domain from From URI, 2 - use both domains, from From URI and from request URI).
Default value is 0.
sd_lookup(table [, owner])
The function lookups the short dial number from R-URI in 'table' and replaces the R-URI with associated address.
Meaning of the parameters is as follows:
table - The name of the table storing the speed dial records.
owner - The SIP URI of the owner of short dialing codes. If not pressent, URI of From header is used.
This function can be used from REQUEST_ROUTE.
Next picture displays a sample usage of speeddial.
Example 1-10. OpenSER config script - sample speeddial usage
... # # $Id: speeddial.cfg 1514 2007-01-16 17:01:22Z bogdan_iancu $ # # sample config script to use speeddial module # # ----------- global configuration parameters ------------------------ check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) # ------------------ module loading ---------------------------------- loadmodule "/usr/local/lib/openser/modules/sl.so" loadmodule "/usr/local/lib/openser/modules/tm.so" loadmodule "/usr/local/lib/openser/modules/rr.so" loadmodule "/usr/local/lib/openser/modules/maxfwd.so" loadmodule "/usr/local/lib/openser/modules/usrloc.so" loadmodule "/usr/local/lib/openser/modules/registrar.so" loadmodule "/usr/local/lib/openser/modules/textops.so" loadmodule "/usr/local/lib/openser/modules/mysql.so" loadmodule "/usr/local/lib/openser/modules/speeddial.so" loadmodule "/usr/local/lib/openser/modules/mi_fifo.so" # ----------------- setting module-specific parameters --------------- # -- mi_fifo params -- modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo") # -- usrloc params -- modparam("usrloc", "db_mode", 0) # -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1) # ------------------------- request routing logic ------------------- # main routing logic route{ # initial sanity checks if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; }; if (msg:len >= max_len ) { sl_send_reply("513", "Message too big"); exit; }; if (!method=="REGISTER") record_route(); if (loose_route()) { if (!t_relay()) { sl_reply_error(); }; exit; }; if (!uri==myself) { if (!t_relay()) { sl_reply_error(); }; exit; }; if (uri==myself) { if (method=="REGISTER") { save("location"); exit; }; if(uri=~"sip:[0-9]{2}@.*") sd_lookup("speeddial"); lookup("aliases"); if (!uri==myself) { if (!t_relay()) { sl_reply_error(); }; exit; }; if (!lookup("location")) { sl_send_reply("404", "Not Found"); exit; }; }; if (!t_relay()) { sl_reply_error(); }; } ...
Sent an email to <team@lists.openser-project.org>
or,
if you want to keep the mail private, send it to
<ramona@voice-system.ro>
.
Remember: first at all, check if your question was already answered on one of OpenSER mailing lists:
User Mailing List - http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Developer Mailing List - http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
Accumulate as much as possible information (OpenSER version,
ser -V output, your OS (uname -a), OpenSER logs, network dumps,
core dump files, configuration file)
and send a mail to <support@voice-system.ro>