SPEEDDIAL module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “Overview”This 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 OpenSIPS. Then it can dial the two digits whenever it wants to call the SIP address associated with them.
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”The following modules must be loaded before this module:
- database module (mysql, dbtext, …).
External Libraries or Applications
Section titled “External Libraries or Applications”The following libraries or applications must be installed before running OpenSIPS with this module loaded:
- None.
Exported Parameters
Section titled “Exported Parameters”db_url (string)
Section titled “db_url (string)”The URL of database where the table containing speed dial records.
Default value is mysql://opensipsro:opensipsro@localhost/opensips.
...modparam("speeddial", "db_url", "mysql://user:xxx@localhost/db_name")...user_column (string)
Section titled “user_column (string)”The name of column storing the user name of the owner of the speed dial record.
Default value is “username”.
...modparam("speeddial", "user_column", "userid")...domain_column (string)
Section titled “domain_column (string)”The name of column storing the domain of the owner of the speed dial record.
Default value is “domain”.
...modparam("speeddial", "domain_column", "userdomain")...sd_user_column (string)
Section titled “sd_user_column (string)”The name of the column storing the user part of the short dial address.
Default value is “sd_username”.
...modparam("speeddial", "sd_user_column", "short_user")...sd_domain_column (string)
Section titled “sd_domain_column (string)”The name of the column storing the domain of the short dial address.
Default value is “sd_domain”.
...modparam("speeddial", "sd_domain_column", "short_domain")...new_uri_column (string)
Section titled “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”.
...modparam("speeddial", "new_uri_column", "real_uri")...domain_prefix (string)
Section titled “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.
...modparam("speeddial", "domain_prefix", "tel.")...use_domain (int)
Section titled “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.
...modparam("speeddial", "use_domain", 1)...Exported Functions
Section titled “Exported Functions”sd_lookup(table [, owner])
Section titled “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. This parameter may include pseudovariables.
- 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.
...# 'speed_dial' is the default table name created by opensips db scriptif($ru=~"sip:[0-9]{2}@.*") sd_lookup("speed_dial");# use auth usernameif($ru=~"sip:[0-9]{2}@.*") sd_lookup("speed_dial", "sip:$au@$fd");...Samples
Section titled “Samples”OpenSIPS Config Script - Speeddial Usage
Section titled “OpenSIPS Config Script - Speeddial Usage”## $Id$## 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 ----------------------------------
mpath="/usr/local/lib/opensips/modules"loadmodule "sl.so"loadmodule "tm.so"loadmodule "rr.so"loadmodule "maxfwd.so"loadmodule "usrloc.so"loadmodule "registrar.so"loadmodule "textops.so"loadmodule "mysql.so"loadmodule "speeddial.so"loadmodule "mi_fifo.so"
# ----------------- setting module-specific parameters ---------------
# -- mi_fifo params --
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# ------------------------- request routing logic -------------------
# main routing logicroute{
# initial sanity checks if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; }; if ($ml >= 65535 ) { sl_send_reply("513", "Message too big"); exit; };
if (!$rm=="REGISTER") record_route();
if (loose_route()) { if (!t_relay()) { sl_reply_error(); }; exit; };
if (!is_myself("$rd")) { if (!t_relay()) { sl_reply_error(); }; exit; };
if (is_myself("$rd")) { if ($rm=="REGISTER") { save("location"); exit; };
if($ru=~"sip:[0-9]{2}@.*") sd_lookup("speeddial");
lookup("aliases"); if (!is_myself("$rd")) { if (!t_relay()) { sl_reply_error(); }; exit; };
if (!lookup("location")) { sl_send_reply("404", "Not Found"); exit; }; };
if (!t_relay()) { sl_reply_error(); };}Contributors
Section titled “Contributors”By Commit Statistics
Section titled “By Commit Statistics”Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
| # | Name | DevScore | Commits | Lines++ | Lines— |
|---|---|---|---|---|---|
| 1. | Bogdan-Andrei Iancu (@bogdan-iancu) | 30 | 23 | 214 | 272 |
| 2. | Daniel-Constantin Mierla (@miconda) | 21 | 16 | 131 | 141 |
| 3. | Liviu Chircu (@liviuchircu) | 12 | 9 | 50 | 69 |
| 4. | Elena-Ramona Modroiu | 12 | 2 | 1063 | 1 |
| 5. | Stefan Darius (@dariusstefan) | 9 | 4 | 366 | 38 |
| 6. | Razvan Crainea (@razvancrainea) | 8 | 6 | 12 | 10 |
| 7. | Henning Westerholt (@henningw) | 4 | 2 | 52 | 43 |
| 8. | Vlad Patrascu (@rvlad-patrascu) | 4 | 2 | 10 | 9 |
| 9. | Elena-Ramona Modroiu | 4 | 2 | 4 | 1 |
| 10. | Sergio Gutierrez | 4 | 2 | 2 | 2 |
All remaining contributors: Anca Vamanu, Andrei Pelinescu-Onciul, Konstantin Bokarius, Julián Moreno Patiño, Edson Gellert Schubert.
(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)
(2) including any documentation-related commits, excluding merge commits
(3) ignoring whitespace edits, renamed files and auto-generated files
By Commit Activity
Section titled “By Commit Activity”| # | Name | Commit Activity |
|---|---|---|
| 1. | Stefan Darius (@dariusstefan) | Jun 2026 - Jul 2026 |
| 2. | Razvan Crainea (@razvancrainea) | Aug 2015 - Jun 2026 |
| 3. | Bogdan-Andrei Iancu (@bogdan-iancu) | Oct 2005 - Jun 2020 |
| 4. | Liviu Chircu (@liviuchircu) | Mar 2014 - Nov 2018 |
| 5. | Vlad Patrascu (@rvlad-patrascu) | May 2017 - Jul 2017 |
| 6. | Julián Moreno Patiño | Feb 2016 - Feb 2016 |
| 7. | Sergio Gutierrez | Nov 2008 - Dec 2008 |
| 8. | Daniel-Constantin Mierla (@miconda) | May 2006 - Mar 2008 |
| 9. | Konstantin Bokarius | Mar 2008 - Mar 2008 |
| 10. | Edson Gellert Schubert | Feb 2008 - Feb 2008 |
All remaining contributors: Henning Westerholt (@henningw), Anca Vamanu, Elena-Ramona Modroiu, Andrei Pelinescu-Onciul, Elena-Ramona Modroiu.
(1) including any documentation-related commits, excluding merge commits
Documentation
Section titled “Documentation”Contributors
Section titled “Contributors”Last edited by: Razvan Crainea (@razvancrainea), Bogdan-Andrei Iancu (@bogdan-iancu), Liviu Chircu (@liviuchircu), Vlad Patrascu (@rvlad-patrascu), Sergio Gutierrez, Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Elena-Ramona Modroiu, Elena-Ramona Modroiu.
License
Section titled “License”All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0