Tom, 
This could depend on if you are using 1.4 or 1.6.X, but in 1.4 there are 6 
commands: newcat, renamecat, delcat, update, delete, and append. In 1.4, the 
update command doesn't append if the var doesn't exist. It actually just does 
nothing. So what you are looking for is to do newcat, and then append for any 
var/value you want. And then only update if you know the var already exists. 

Since you are using the astman API, i'm assuming you are relatively familiar 
with coding. I'd like to point you to the asterisk code that handles updates. 
Its a function in main/manager.c called 'handle_updates' starting around line 
1154 (i'm not sure if i'm in the latest rev of 1.4). You can follow the 
if/elseif statements to view all the conditions each command expects. 

If you are trying to use the GUI as a guide, I'd also suggest using Firefox and 
downloading Firebug (a FF addon). Firebug will track all your HTTP requests, 
which include all the updateconfig requests and provide you with any request 
that the GUI makes. :-) 

Hope this helps. 

-- 
Ryan Brindley 
Digium, Inc. | Software Developer 
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA 
main: +1 256-428-6000 fax: +1 256-864-0464 
Check us out at: http://digium.com & http://asterisk.org 

----- Original Message ----- 
From: "Tom Garratt" <[email protected]> 
To: [email protected] 
Sent: Tuesday, February 24, 2009 8:40:17 AM GMT -06:00 US/Canada Central 
Subject: [asterisk-gui] rawman 




Hi, 



Sorry if this is the wrong mailing list....Always a good way to start a 
question ;-) 



I’m trying use rawman to create a user and set the details. Below I create the 
user 222, which works. I then try to set the fullname to tom, which does not 
work: 



http://192.168.1.88:8088/rawman?action=updateconfig&reload=yes&srcfilename=users.conf&dstfilename=users.conf&Action-000000=newcat&Cat-000000=222&Action-000001=update&Cat-000001=222&Var-000001=fullname&Value-000001=tom&_=
 





If I create the user first with: 

http://192.168.1.88:8088/rawman?action=updateconfig&reload=yes&srcfilename=users.conf&dstfilename=users.conf&Action-000000=newcat&Cat-000000=222&Var-000000=&Value-000000
 



and then try to amend it. It still does not work: 

http://192.168.1.88:8088/rawman?action=updateconfig&reload=yes&srcfilename=users.conf&dstfilename=users.conf&Action-000000=update&Cat-000000=222&Var-000000=fullname&Value-000000=tom&_=
 



If I create the user using the above create user code and then edit the user 
using asterisk gui and then amend the user via the amend code this works. 



In all cases I get a success message. 



Anyone have any ideas? 



Best Regards 



Tom Garratt 


_______________________________________________ --Bandwidth and Colocation 
Provided by http://www.api-digital.com-- asterisk-gui mailing list To 
UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-gui
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-gui mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-gui

Reply via email to