How should I include a custom Asterisk function?

I have a huge table of CID to use based on a 5 digit code that the user dials.

Splitting the code off of the dialed number is easy enough in macro-dialout-trunk-predial-hook

exten => s,1,Wait(1)
exten => s,n,Log(NOTICE, Arrived in macro-dialout-trunk-predial-hook)
exten => s,n,Set(AUTDIALEDNUM=${OUTNUM:2:12})
exten => s,n,Set(AUTCODE=${OUTNUM:-5})
exten => s,n,Log(NOTICE, Leaving macro-dialout-trunk-predial-hook)
;do more stuff here.....

I have added a table to mysql and gave the freepbxuser access access. Then I added an entry to res_odbc_custom.conf and updated /etc/odbc.ini

;this has to match what is in /etc/odbc.ini
dsn => DSNNAME
;Use the AMPDBUSER value from /etc/amportal.conf
username => freepbxuser
;Use the AMPDBPASS value from /etc/amportal.conf
password => 
enabled => yes
pre-connect => yes

Where do I put my function? On a raw asterisk system it goes in func_odbc.conf but that file does not exist. I added it from within the GUI. and it all works. Mostly just wondering if this is where I should put it or not?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.