Dahdi on Realtime

Home » Asterisk Tips » Dahdi on Realtime
Asterisk Tips No Comments

There is no specific Realtime database for chan_dahdi (that I know if). You can store the configuration using Realtime Static using the new chan_dahdi.conf notation without any problems. The only problem with Realtime Static is that you cannot use the text file, you need to load everything from the database.

Another possibility would be to use an #exec from chan_dahdi.conf to extract the channel configuration from the database.

Here is the table configuration for mysql:
 

span class=”st0″>`ast_config` (
`id``cat_metric``var_metric``commented``filename``category``var_name``var_val``id``filename_comment` (`filename`,`commented`

 
In extconfig.conf:
 

chan_dahdi.conf => mysql,general,ast_config

 
Database example:
 

+——+————+————+———–+—————–+———-+———————–+————+
| id | cat_metric | var_metric | commented | filename | category | var_name | var_val |
+——+————+————+———–+—————–+———-+———————–+————+
| 1497 | 27 | 1 | 0 | chan_dahdi.conf | axtel | language | es |
| 1498 | 27 | 2 | 0 | chan_dahdi.conf | axtel | context | entrada |
| 1499 | 27 | 3 | 0 | chan_dahdi.conf | axtel | usecallerid | yes |
| 1500 | 27 | 4 | 0 | chan_dahdi.conf | axtel | hidecallerid | no |
| 1501 | 27 | 5 | 0 | chan_dahdi.conf | axtel | callwaiting | no |
| 1502 | 27 | 6 | 0 | chan_dahdi.conf | axtel | canpark | no |
| 1503 | 27 | 7 | 0 | chan_dahdi.conf | axtel | usecallingpres | yes |
| 1504 | 27 | 8 | 0 | chan_dahdi.conf | axtel | callwaitingcallerid | no |
| 1505 | 27 | 9 | 0 | chan_dahdi.conf | axtel | threewaycalling | yes |
| 1506 | 27 | 10 | 0 | chan_dahdi.conf | axtel | transfer | yes |
| 1507 | 27 | 11 | 0 | chan_dahdi.conf | axtel | cancallforward | no |
| 1508 | 27 | 12 | 0 | chan_dahdi.conf | axtel | callreturn | yes |
| 1509 | 27 | 13 | 0 | chan_dahdi.conf | axtel | echocancel | yes |
| 1510 | 27 | 14 | 0 | chan_dahdi.conf | axtel | echocancelwhenbridged | no |
| 1511 | 27 | 15 | 0 | chan_dahdi.conf | axtel | echotraining | yes |
| 1512 | 27 | 16 | 0 | chan_dahdi.conf | axtel | rxgain | 0.0 |
| 1513 | 27 | 17 | 0 | chan_dahdi.conf | axtel | txgain | 0.0 |
| 1514 | 27 | 18 | 0 | chan_dahdi.conf | axtel | busydetect | yes |
| 1515 | 27 | 19 | 0 | chan_dahdi.conf | axtel | busycount | 4 |
| 1516 | 27 | 20 | 0 | chan_dahdi.conf | axtel | callprogress | no |
| 1517 | 27 | 21 | 0 | chan_dahdi.conf | axtel | accountcode | Axtel |
| 1518 | 27 | 22 | 0 | chan_dahdi.conf | axtel | amaflags | default |
| 1519 | 27 | 23 | 0 | chan_dahdi.conf | axtel | signalling | fxs_ks |
| 1520 | 27 | 24 | 0 | chan_dahdi.conf | axtel | group | 1 |
| 1521 | 27 | 25 | 0 | chan_dahdi.conf | axtel | faxdetect | incoming |
| 1522 | 27 | 26 | 0 | chan_dahdi.conf | axtel | callerid | asreceived |
| 1523 | 27 | 27 | 0 | chan_dahdi.conf | axtel | mohinterpret | default |
| 1524 | 27 | 28 | 0 | chan_dahdi.conf | axtel | mohsuggest | default |
| 1525 | 27 | 29 | 0 | chan_dahdi.conf | axtel | dahdichan | 1-2 |
+——+————+————+———–+—————–+———-+———————–+————+

 
You can use this database table for almos any of the conf files in Asterisk that do not support a “real” Realtime table. I personally use this for chan_dahdi.conf and for extensions.conf
 
Thanks to Carlos Chavez ( cursor@DELETEMEtelecomabmex.com ) for this example.