Editing sip.conf

Nov 13, 2013 at 11:43 AM
Hello Skrusty and thanks alot for your great work,

I wanted to know if it is possible to edit sip.conf file using AsterNet ( I want to edit peers data ).

Best regards
Coordinator
Nov 13, 2013 at 12:14 PM
Hi mosab,

Thanks for the feedback. In answer to your question, yes. You can see something similar in the Test application. The code below shows you how to get the lines from the sip.conf file via AMI. To save information back, you need to use the "UpdateConfigAction".
ManagerResponse response = manager.SendAction(new GetConfigAction("sip.conf"));
if (response.IsSuccess())
{
...
}
I hope this helps!

Skrusty
Nov 19, 2013 at 7:52 PM
Hi again Skrusty,

Image

I have tested the "UpdateConfig' fonction with 3 versions of asterisk. It returns "success" but it does nothing. Isn't the "Action-0" supposed to be "Action-000000" ?

Image

Thank you in advance :)
Coordinator
Nov 20, 2013 at 10:18 AM
I will try and look at this a little more later today.

Can you provide the following information: -

AsterNET Version (release or source commit version):
Asterisk Version:
Output of AGI Debug:


(AGI DEbug can be enabled from the asterisk console using 'agi debug on').
Nov 20, 2013 at 11:36 AM
AsterNET Version: 1.6.3.1
Asterisk Version: 1.6.1.0

I have activated the AGI Debug but I didn't get any outputs

Here is what I got using "core set verbose 4" :
     == Parsing '/etc/asterisk/sip.conf':    == Found
     == Saving '/etc/asterisk/sip.conf':    == Saved