0

I'm using a PHP library to update config files of asterisk.

I add a user like this:

$a->write('Action: updateconfig\r\nReload: yes\r\nSrcfilename: users.conf\r\nDstfilename: users.conf\r\nAction-000000: NewCat\r\nCat-000000:test\r\nAction-000001: append\r\nCat-000001: test\r\nVar-000001: mailbox\r\nValue-000001: test\r\n ...etc user fields');

But also I have a template templatename so I want to add categories with template. I found this question, where is talled that you need simply change category name to test [(templatename)]. But this simply doesn't create anything.

If you need I can post library but it's just custom library with sockets.

Community
  • 1
  • 1
Sergey Scopin
  • 2,217
  • 9
  • 39
  • 67

1 Answers1

0

You should use quoted string if you sending something like that.

Also it is highly NOT recommended use users.conf in case if you are not guru.

Reason: it can result not what you expect/insecure sections.

Use sip.conf or iax2.conf.

arheops
  • 15,544
  • 1
  • 21
  • 27