I want to use extensions in Asterisk Realtime (MySQL).
I had read the manuals and added this lines to extconfig.conf.
[settings]
sipusers => mysql,asterisk,sipuser
sippeers => mysql,asterisk,sipuser
extensions => mysql,asterisk,extension
And this lines to extensions.conf
[edwin]
switch => Realtime
I also have added this data to the MySQL table sipuser.
bechtoldsheim*CLI> realtime load sipusers name edwin
Column Name Column Value
-------------------- --------------------
name edwin
callerid edwin <1232>
canreinvite no
context edwin ( <============= )
dtmfmode rfc2833
host dynamic
nat yes
qualify yes
secret test
type friend
disallow all
allow ilbc
allow alaw
allow ulaw
regexten 1232
When i start a call, the phone i trying to call is ringing. That’s working.
BUT, not every SIP user have context ‘edwin’.
When a SIP user with context ‘edwin2’ is starting a call, this notice is shown in the log:
2006-09-19 12:13:16 NOTICE[23672]: pbx.c:1741 pbx_extension_helper: Cannot find extension context ‘edwin2’
So i need to add this lines to extensions.conf and repeat that for every extension.
[edwin2]
switch => Realtime
That’s not what i expected. I want to use Realtime to keep extensions.conf small and simple add extensions to the dialplan, or change/delete this extensions.