[HELP]: Can I add new user by using phone calls?

I know that by editing the extensions.conf, you can add in new user by adding in their names 1 by 1. But what if I have more than 100 extensions name to key in? That will be a disaster. So I am asking that is there any possibility to add new user automatically?

For example,

[incoming]

exten => s, 1, Answer()

################This part how to do?#################
exten => 1, 1, Enter Your New Extensions Key
exten => 1, 2, Set Your Password
#################################################

; EXT_NUM = extension number, user
; EXT_PWD = extension password
; result = is password correct?

exten => 2, 1, Answer()
exten => 2, 2, Read (EXT_NUM, vm-extension)
exten => 2, 3, Wait(1)
exten => 2, 4, Read (EXT_PWD, vm-password)
exten => 2, 5, Wait(1)
exten => 2, 6, agi,chk_vm_pwd.agi|/etc/asterisk/voicemail.conf|${EXT_NUM}|${EXT$
exten => 2, 7, GotoIf($["${result}" = “1”]?20:50) ; if yes, go to 30
… so on and forth.

Basically extension 2 is done, now i need to know is there anyway for the user to call in, go to extension 1 and create a new extension and password by key in through the telephone?

[quote=“InfComTec”]If I would want to do something like this I’d look at the Asterisk Realtime option.
Using Asterisk Realtime you can put extensions in a table in the MySQL database and have them active immediately.
You may also use other (ODBC) databases.

Regards,
Walter
infcomtec.nl/[/quote]

Yes, I am aware that I can actually manually key-in all the extensions 1 by 1, but if for example I have 1000s or more extensions need to key-in, that will be a disaster. What I am trying to do now is to let the users phone in, choose their wanted extensions, and then register their ownselves. Could it possibly be done?

Do you have any tutorials on how to setup the Asterisk Realtime? I have read this voip-info.org/wiki/view/Aste … Extensions and it just not make sense. Any better tutorial?

EDIT : Oh no, after I done all stuff from above, my Asterisk suddenly will not work anymore. I can run the samples perfectly last time, now when I tried to call in my voicemail, i get these messages.

Dec 21 16:36:35 WARNING[5784]: file.c:512 ast_openstream_full: File demo-moreinfo does not exist in any format
Dec 21 16:36:35 WARNING[5784]: file.c:824 ast_streamfile: Unable to open demo-moreinfo (format unknown): No such file or directory
Dec 21 16:36:35 WARNING[5784]: pbx.c:5799 pbx_builtin_background: ast_streamfile failed on Zap/2-1 for demo-moreinfo
Dec 21 16:36:35 WARNING[5784]: file.c:512 ast_openstream_full: File demo-instruct does not exist in any format
Dec 21 16:36:35 WARNING[5784]: file.c:824 ast_streamfile: Unable to open demo-instruct (format unknown): No such file or directory
Dec 21 16:36:35 WARNING[5784]: pbx.c:5799 pbx_builtin_background: ast_streamfile failed on Zap/2-1 for demo-instruct
Dec 21 16:36:46 WARNING[5784]: file.c:512 ast_openstream_full: File demo-thanks does not exist in any format
Dec 21 16:36:46 WARNING[5784]: file.c:824 ast_streamfile: Unable to open demo-thanks (format unknown): No such file or directory
Dec 21 16:36:46 WARNING[5784]: app_playback.c:133 playback_exec: ast_streamfile failed on Zap/2-1 for demo-thanks

Anyone knows what happen?

Too bad I dun have any extra system, I read the Trixbox manual, and to install it need to wipe out all the current system. :open_mouth:

BTW, I get new error message, it seems that it cant detect my MySQL. :cry:

Dec 22 11:48:49 WARNING[12112]: config.c:920 find_engine: Realtime mapping for ‘voicemail’ found to engine ‘mysql’, but the engine is not available
Dec 22 11:48:49 WARNING[12112]: app_voicemail.c:2414 leave_voicemail: No entry in voicemail config file for ‘1234’

I got PHPMYADMIN, and I set all the database already. I also transfer the res_mysql.conf into the Asterisk folder, set the extconfig.conf, everything based on that tutorial.

Any :bulb: what’s wrong?

And thanks Walter, it seems that you are the only one to answer my question.

All above are done except,

[quote]Finally, within the Asterisk CLI, check that things are working:

What I get was [quote]Dec 22 16:09:53 WARNING[20736]: config.c:920 find_engine: Realtime mapping for ‘voicemail’ found to engine ‘mysql’, but the engine is not available
Dec 22 16:09:53 WARNING[20736]: app_voicemail.c:2414 leave_voicemail: No entry in voicemail config file for '1234’
Dec 22 16:09:53 WARNING[20716]: channel.c:787 channel_find_locked: Avoided initial deadlock for ‘0x8130d20’, 10 retries![/quote]

:unamused:

Yea, it seems like I don’t have the app_addon_sql_mysql.so & res_config_mysql.so in the /usr/lib/asterisk/modules folders. :cry:

After doing some google, it seems that the 2 files above can be included into the modules folder by

[quote]make res_config_mysql.so
mv res_config_mysql.so /usr/lib/asterisk/modules/

make app_addon_sql_mysql.so
mv app_addon_sql_mysql.so /usr/lib/asterisk/modules/ [/quote]

But it seems that the asterisk-addon folder got error,

[quote] [CC] app_addon_sql_mysql.c -> app_addon_sql_mysql.o
In file included from app_addon_sql_mysql.c:15:
/usr/include/asterisk.h:42: error: ‘PATH_MAX’ undeclared here (not in a function)
/usr/include/asterisk.h:203: error: expected declaration specifiers or ‘…’ before ‘uint64_t’
/usr/include/asterisk.h:204: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ast_profile’
/usr/include/asterisk.h:205: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ast_mark’
app_addon_sql_mysql.c:27:27: warning: asterisk/file.h: No such file or directoryapp_addon_sql_mysql.c:28:29: warning: asterisk/logger.h: No such file or directory
app_addon_sql_mysql.c:29:30: warning: asterisk/channel.h: No such file or directory
app_addon_sql_mysql.c:30:26: warning: asterisk/pbx.h: No such file or directory
app_addon_sql_mysql.c:31:29: warning: asterisk/module.h: No such file or directory
app_addon_sql_mysql.c:32:34: warning: asterisk/linkedlists.h: No such file or directory
app_addon_sql_mysql.c:33:31: warning: asterisk/chanvars.h: No such file or directory
app_addon_sql_mysql.c:34:27: warning: asterisk/lock.h: No such file or directoryapp_addon_sql_mysql.c:78: warning: data definition has no type or storage class
app_addon_sql_mysql.c:78: warning: parameter names (without types) in function declaration
app_addon_sql_mysql.c:89: error: expected specifier-qualifier-list before ‘AST_LIST_ENTRY’
app_addon_sql_mysql.c: In function ‘AST_LIST_HEAD’:
app_addon_sql_mysql.c:92: error: expected declaration specifiers before ‘_mysql_ids_head’
app_addon_sql_mysql.c:95: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:122: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:150: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:180: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:192: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:196: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:208: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:248: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:295: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:345: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:362: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:380: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:423: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:429: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
app_addon_sql_mysql.c:435: error: expected declaration specifiers before ‘AST_MODULE_INFO_STANDARD’
app_addon_sql_mysql.c:435: error: expected ‘{’ at end of input
make: *** [app_addon_sql_mysql.o] Error 1
[/quote]

:cry:

And also, when i type in make menuselect in the asterisk addon folder, all modules ares listed as XXX - means dependencies have not been met or a conflict exists. But I am sure that I downloaded and have the Asterisk and mysqlclient, or is there anyway to check them are they properly installed?