I need to modify sip.conf with AMI, adding a new user to it. Everything works fine, and I can create a user like this without problems:
[1000]
secret=pass12
But I have to create user with template like
[1000](mytemp)
secret=pass12
and I don't know how to do this. Neither Google, nor Digium forum can't help me. P.S. I use JavaScript asterisk-manager to interact with Asterisk, and here is my code, which adds extension:
var amiAction = {
action: 'UpdateConfig',
reload: 'yes',
srcfilename: 'sip.conf',
dstfilename: 'sip.conf',
'action-000000': 'newcat',
'cat-000000': '1000',
'action-000001': 'append',
'cat-000001': '1000',
'var-000001': 'secret',
'value-000001': 'pass12'
};
ami.action(amiAction, function(err, resp) {
console.log(err, resp);
});