Dynamic Routes FAQ: Difference between revisions

From voipsupport
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:


<strong>3. Q. Does Dynamic Routes effect system availability?</strong>
<strong>3. Q. Does Dynamic Routes effect system availability?</strong>
Please note that by using this module, a database can be used for lookups during incoming calls. Therefore the database becomes a necessary component for call processing. If the database is unavailable, dynamic routing will not take place. You may however define a default destination. When a lookup fails it will follow the default destination. The default destination is also used when the lookup succeeds but no match is found. Using a local database server reduces availability dependencies but does not remove them entirely.


<strong>4. Q. What are the security implications of using Dynamic Routes?</strong>
<strong>4. Q. What are the security implications of using Dynamic Routes?</strong>

Revision as of 20:21, 11 June 2016

General FAQ

1. Q. What are the prerequisites for Dynamic Routes?

A. The Dynamic Route module itself does not introduce additional prerequisites, so if your system is set up for Asterisk and Freepbx this module can be installed without adding any additional software. However, the lookup method you choose can introduce additional prerequisites.

If you are using Dynamic Routes to connect to a MySQL database directly (without ODBC) then an additional Asterisk module is required (app_mysql). Please note that the app_mysql is not built by default. Please see this link for information. Although app_mysql is still widely used, it is no longer the recommended way to connect to the MySQL database from Asterisk.

If you are using Dynamic Routes with ODBC you will need to install the ODBC software and driver for your database and configure it. Please see this link for information.

2. Q. Does Dynamic Routes effect performance?

3. Q. Does Dynamic Routes effect system availability?

Please note that by using this module, a database can be used for lookups during incoming calls. Therefore the database becomes a necessary component for call processing. If the database is unavailable, dynamic routing will not take place. You may however define a default destination. When a lookup fails it will follow the default destination. The default destination is also used when the lookup succeeds but no match is found. Using a local database server reduces availability dependencies but does not remove them entirely.

4. Q. What are the security implications of using Dynamic Routes?

Configuration FAQ

1. Q. How can I avoid matching short caller ids?

A. You can use a condition in the WHERE clause to ensure that only caller ids of sufficient length are matched. This is useful if your database contains company phone numbers with similar prefixes, but when receiving calls the caller id is set to the shorter main phone number of the company.

select destination from callerid_table where calleridnum like '%[NUMBER]' and length('[NUMBER]') > 4

2. Q. How can I match data in my database when sometimes the caller id arrives with an international prefix of + country codes, other times 00 country code and other times just as a national number?

A. You may use the MySQL TRIM function to adjust the presented caller id to match the type of data in your database. For example:

select destination from callerid_table where calleridnum like concat('%',TRIM(LEADING '+' FROM TRIM(LEADING '0' FROM '[NUMBER]')))

Trouble shooting FAQ

1. Q. Why do I get strange errors when using asterisk MYSQL module?

[2015-04-24 21:52:59] WARNING[14294][C-000020b6] pbx.c: Error in extension logic (missing '}')
[2015-04-24 21:52:59] WARNING[14294][C-000020b6] pbx.c: Can't find trailing parenthesis for function 'CALLERID(nu'?
[2015-04-24 21:52:59] ERROR[14294][C-000020b6] func_callerid.c: Unknown callerid data type 'nu'.
[2015-04-24 21:52:59] VERBOSE[14294][C-000020b6] pbx.c:     -- Executing [s@dynroute-21:4] MYSQL("SIP/215-00000087", "Query resultid 1 select callerid_firstname from calleridlookup where owner='john' and '") in new stack
[2015-04-24 21:52:59] WARNING[14294][C-000020b6] app_mysql.c: aMYSQL_query: mysql_query failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
[2015-04-24 21:52:59] VERBOSE[14294][C-000020b6] pbx.c:     -- Executing [s@dynroute-21:5] MYSQL("SIP/215-00000087", "Fetch fetchid  dynroute") in new stack
[2015-04-24 21:52:59] WARNING[14294][C-000020b6] app_mysql.c: aMYSQL_fetch: missing some arguments
[2015-04-24 21:52:59] VERBOSE[14294][C-000020b6] pbx.c:     -- Executing [s@dynroute-21:6] MYSQL("SIP/215-00000087", "Clear ") in new stack
[2015-04-24 21:52:59] WARNING[14294][C-000020b6] app_mysql.c: Identifier 0, identifier_type 2 not found in identifier list
[2015-04-24 21:52:59] WARNING[14294][C-000020b6] app_mysql.c: Invalid result identifier 0 passed in aMYSQL_clear
[2015-04-24 21:52:59] VERBOSE[14294][C-000020b6] pbx.c:     -- Executing [s@dynroute-21:7] MYSQL("SIP/215-00000087", "Disconnect 1") in new stack
[2015-04-24 21:52:59] VERBOSE[14294][C-000020b6] pbx.c:     -- Executing [s@dynroute-21:8] Set("SIP/215-00000087", "__DYNROUTE_TEST=") in new stack
[2015-04-24 21:52:59] WARNING[14294][C-000020b6] ast_expr2.fl: ast_yyerror():  syntax error: syntax error, unexpected '=', expecting $end; Input:>

A. Do not use a semicolon at the end of the query. This syntax is not supported by asterisk MYSQL module.