[asterisk-users] how to add-edit-delete entery into asterisk conf files

Daniel Tryba daniel at tryba.nl
Sat Sep 3 06:48:41 CDT 2011


On Fri, Sep 02, 2011 at 04:58:52PM +0530, virendra bhati wrote:
> Please guide me how to configure all these files from from AMI connection. I
> am able to login into AMI from Login action but I want to do more task in to
> it.
[lots of fputs]
> After doing all no success :((

Have you actually tried reading from the socket to see what the results
are for your commands (hint: turn off events)?

This is what I get:
Response: Success
ActionID: 9873497149817

Looking at
http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+UpdateConfig
it is clear that adding values to a category works different than you
expected.

First you need to create the new category (your scripts does that
already), then you need to append lines to is in the form of appends to
the category like in the example on voip-info.org:

action:updateconfig
reload:yes
srcfilename:manager.conf
dstfilename:manager.conf
Action-000000:append
Cat-000000:newuser
Var-000000:secret
Value-000000:nottelling

-- 

   Daniel Tryba



More information about the asterisk-users mailing list