Dbpbx: Difference between revisions

From Yate Documentation
Jump to navigation Jump to search
Created page with " [general] ; Global module settings that are read only at first initialization ; The following parameters enable handling of individual components ; Each must be enabled ..."
 
No edit summary
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
This module makes multi routing from a database. The file used for configuration is: dbpbx.conf.
For database access you can use [[PostgreSQL]] or [[MySQL]]. Please see the requirements for the database module chosen.
After enabling the multi routing parameter, the following queries can be done:
: - initial query to execute when module is initialized: '''initquery'''
: - Query for the initial routing message: '''queryroute'''
: - Query for subsequent retries: '''queryretry'''. Parameter '''retryneeds''' must be present to perform routing retries queries.
===Configuration===
File dbpbx.conf
  [general]
  [general]
  ; Global module settings that are read only at first initialization
  ; Global module settings that are read only at first initialization
Line 21: Line 36:
  ; account: string: Name of the database connection to use
  ; account: string: Name of the database connection to use
  account=my
  account=my
 
   
   
  ; In each of the following sections you have to specify the following:
  ; In each of the following sections you have to specify the following:
Line 28: Line 43:
  ; - result field to copy in message's textual return value (only for some)
  ; - result field to copy in message's textual return value (only for some)
  ; You can also override the settings from section [default]
  ; You can also override the settings from section [default]
 
  [router]
  [router]
  ; Multiple router
  ; Multiple router
 
  ; Query for the initial routing message
  ; Query for the initial routing message
  queryroute=SELECT callto,mrid,priority FROM mroutes WHERE prefix='${called}' ORDER BY priority LIMIT 1
  queryroute=SELECT callto,mrid,priority FROM mroutes WHERE prefix='${called}' ORDER BY priority LIMIT 1
Line 43: Line 58:
  ; Inital query to execute on startup
  ; Inital query to execute on startup
  ;initquery=
  ;initquery=
'''See also'''
* [[MySQL]]
* [[PostgreSQL]]
* [[Modules]]
[[Category:Routing]] [[Category:Database]] [[Category:PBX]]

Latest revision as of 11:10, 4 November 2013

This module makes multi routing from a database. The file used for configuration is: dbpbx.conf.

For database access you can use PostgreSQL or MySQL. Please see the requirements for the database module chosen.

After enabling the multi routing parameter, the following queries can be done:

- initial query to execute when module is initialized: initquery
- Query for the initial routing message: queryroute
- Query for subsequent retries: queryretry. Parameter retryneeds must be present to perform routing retries queries.

Configuration

File dbpbx.conf

[general]
; Global module settings that are read only at first initialization

; The following parameters enable handling of individual components
; Each must be enabled manually in this config file

; Enable multi router
;router=no


[priorities]
; Base priorities for each component

;router=20


[default]
; This section holds default settings for each of the following message handlers
; All these settings can be overriden in individual handler sections

; account: string: Name of the database connection to use
account=my
 

; In each of the following sections you have to specify the following:
; - initial query to execute when module is initialized
; - query to execute for each received message
; - result field to copy in message's textual return value (only for some)
; You can also override the settings from section [default]

[router]
; Multiple router
 
; Query for the initial routing message
queryroute=SELECT callto,mrid,priority FROM mroutes WHERE prefix='${called}' ORDER BY priority LIMIT 1

; Query for subsequent retries
queryretry=SELECT callto,priority FROM mroutes WHERE mrid=${mrid} AND priority>${priority} ORDER BY priority LIMIT 1

; Parameter that must be present to perform routing retries
retryneeds=mrid

; Inital query to execute on startup
;initquery=


See also