I have written a small Windows app to import new extensions by placing the proper information into sip,users and devices and everything looks fine. When I look at the data that was made by freepbx and the import I did, it looks the same. Freepbx can see that data that I import but when I do the “red bar” reload or any reboot the data is not making it into the Asterisk Database. Only after I go into each extension, click submit, then a red bar reload does it actually go into the asterisk database, ‘database show’.
‘sip show peers’ shows the new data I imported with my program without having to go into each extension and clicking submit. I must be missing something crucial so that freePBX can add them to the astersisk database with a single update.
I did notice that when I add records to the sip table my records end up all over the place and when FreePBX adds records it seems to add them in a clustered format(all of extension keywords grouped). Could this be my problem?
Yes I was trying to add them directly to the tables then thinking that once I did the update in freePBX the newly added data would get placed in the asterisk database. I’ll look for the functions and see what it does.
you will want to use the function vs. trying to copy what it does. Things will change in the coming future, using the function will keep your app working. Also - once you get your app up and working, why don’t you ping me to take a look at it, I’m sure it would be useful.
This was really a twister…cause all the *.conf files were updated fine but the database show was not giving me any new information about the extensions that were added.
point of referance, I am running the beta version.
I’m writing a script to create extensios from the Linux Cli and I’m having the same problem you have.
Did you solve it ? and how did u do it ?
p_lindheimer, i was trying to use the functions core_users_add() and core_devices_add().
I called them in my script but i get some errors. Is there any secret in how to use it ? or some include ?
Is there a way to batch edit existing user extensions? I may want to restore from an old backup and may need to add/edit/remove some of them in an automated manner.
However it only seems to work if I have your php file in the /var/www/html directory. I put it in another directory the include for the header.php fails.
I want to trigger the creation of a new extension from another transactional system. I’m aware of the bulk extensions tool, and I’ve used it successfully, but I want to do something more transactional.
So, Samyantoun - are you still around? Do you still use this script? p_lindheimer - if the API’s are amess, do you have another suggestion for transactionally creating extensions?
As i have a task to add ‘n’ number of extensions using PHP and MySQL. So i was cross checked in the internet and got the idea by reading the samyantoun link.
I was followed the instructions what samyantoun has given in the link. When am tryed the same code into my page and getting blank page after executing the code. Please can you people guided me to out of these issue.
My file path :- http://www.test.com/user/test.php
and am passing the values :- addext.php?tech=sip&extension=".$ext."&name=".$name."&devinfo_secret=".$secret."
I need to make a PHP script to create Trixbox extension and apply conf in configuration files from php script itself.
PHP.txt : http://samyantoun.50webs.com/asterisk/freepbx/createext.php.txt provided by samyantoun (tadpole) is not working for me and inclusive files are not with me.
Can you please advise revised php script or steps and cli - -> php code to complete this On urgent basis?
Am using elastix server for voice call functionality in mobile application, in this I can able to store value(extension data) in asterisk database and also able to view data’s in elastix page through the PHP code. When am calling via extension number am receiving “service not available”.
How can I solve this issue or else can you tell me how to store the extension data in elastix server using API?