<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 10pt; color: #000000'>Tom,<br>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.<br><br>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.<br><br>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. :-)<br><br>Hope this helps.<br><br>-- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>Ryan Brindley &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>Digium, Inc. | Software Developer &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>main: +1 256-428-6000 &nbsp; fax: +1 256-864-0464 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>Check us out at: http://digium.com &amp; http://asterisk.org<br><br>----- Original Message -----<br>From: "Tom Garratt" &lt;tom.garratt@mpclondon.co.uk&gt;<br>To: asterisk-gui@lists.digium.com<br>Sent: Tuesday, February 24, 2009 8:40:17 AM GMT -06:00 US/Canada Central<br>Subject: [asterisk-gui] rawman<br><br>




<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->


<div class="Section1">

<p class="MsoNormal">Hi,</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">Sorry if this is the wrong mailing list....Always a good way
to start a question ;-)</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">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:</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">http://192.168.1.88:8088/rawman?action=updateconfig&amp;reload=yes&amp;srcfilename=users.conf&amp;dstfilename=users.conf&amp;Action-000000=newcat&amp;Cat-000000=222&amp;Action-000001=update&amp;Cat-000001=222&amp;Var-000001=fullname&amp;Value-000001=tom&amp;_=</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">If I create the user first with:</p>

<p class="MsoNormal">http://192.168.1.88:8088/rawman?action=updateconfig&amp;reload=yes&amp;srcfilename=users.conf&amp;dstfilename=users.conf&amp;Action-000000=newcat&amp;Cat-000000=222&amp;Var-000000=&amp;Value-000000</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">&nbsp;and then try to amend it. It still does not work:</p>

<p class="MsoNormal">http://192.168.1.88:8088/rawman?action=updateconfig&amp;reload=yes&amp;srcfilename=users.conf&amp;dstfilename=users.conf&amp;Action-000000=update&amp;Cat-000000=222&amp;Var-000000=fullname&amp;Value-000000=tom&amp;_=</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">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.</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">In all cases I get a success message.</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">Anyone have any ideas?</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal"><i><span style="font-size: 9pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Best
Regards</span></i></p>

<p class="MsoNormal"><b><i><span style="font-size: 9pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">&nbsp;</span></i></b></p>

<p class="MsoNormal"><b><i><span style="font-size: 9pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Tom
Garratt </span></i></b><b><span style="font-size: 9pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">&nbsp;</span></b><span style="font-size: 9pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>

<p class="MsoNormal">&nbsp;</p>

</div>

<br>_______________________________________________
--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</div></body></html>