I want the extensions to read from the database, but it reads from the file

I want the extensions to read from the database, but it reads from the file

sorcery.conf add

[res_pjsip]
endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors
extension=realtime,extensions
domain_alias=realtime,ps_domain_aliases

extconfig.conf

extensions => odbc,asterisk,extensions
ps_endpoints => odbc,asterisk,ps_endpoints
ps_auths => odbc,asterisk,ps_auths
ps_aors => odbc,asterisk,ps_aors
ps_domain_aliases => odbc,asterisk,ps_domain_aliases

What do you mean by extensions? PJSIP endpoints? How are you confirming things?

i mean file extensions.conf
I want to read from the database, I made my settings. But it reads from the file
[internal]
exten => _2000XXXXXX,1,NoOp()
exten => _2000XXXXXX,2,Set(GLOBAL(user)=${PJSIP_HEADER(read,user_id)})
exten => _2000XXXXXX,3,Set(GLOBAL(with)=${PJSIP_HEADER(read,with_id)})
exten => _2000XXXXXX,4,Set(GLOBAL(stanza)=${PJSIP_HEADER(read,stanza_message)})
exten => _2000XXXXXX,5,MixMonitor(/var/www/html/files/VoIP/${user}/${with}/${stanza}.wav,ab)
exten => _2000XXXXXX,6,Dial(PJSIP/${EXTEN},30,ge)
exten => _2000XXXXXX,7,StopMixMonitor()
exten => _2000XXXXXX,8,HangUp()

I have no experience with that, sorry. I will add that the more you tightly couple your Asterisk with a database the more you increase the blast area of issues. If your database has any problem (or is slow) then that can and will cause issues in Asterisk.

1 Like

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