Summary: | ASTERISK-13385: UpdateConfig not handling correctly sets of parameters | ||
Reporter: | Jose P. Espinal (khratos) | Labels: | |
Date Opened: | 2009-01-16 17:46:35.000-0600 | Date Closed: | 2011-06-07 14:10:19 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Core/ManagerInterface |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | In the ATFOT book, pg. 545, 'notes' section we see: "Note that the first set of parameters should be numbered 000000, the second 000001, and so on. This allows you to update many different configuration values at the same time." Given a file 'voicemail2.conf' with an empty context [default], sending the following data to the AMI Interface will only handle the FIRST set of parameters, ignoring the rest of the same kind (UpdateConfig parameters): Action: login Username: test Secret: 123456 Action: UpdateConfig SrcFilename: voicemail2.conf DstFilename: voicemail2.conf Action-000000: Append Cat-000000: default Var-000000: 127 Value-000000: >5555, Jason Bourne58, jason100@noCia.gov.do, ActionID: 1447626984 Action: UpdateConfig SrcFilename: voicemail2.conf DstFilename: voicemail2.conf Action-000001: Append Cat-000001: default Var-000001: 125 Value-000001: >55555, Jason Bourne25, jason34@noCia.gov.do, ActionID: 587122214 Action: UpdateConfig SrcFilename: voicemail2.conf DstFilename: voicemail2.conf Action-000002: Append Cat-000002: default Var-000002: 122 Value-000002: >5555, Jason Bourne36, jason54@noCia.gov.do, ActionID: 1891210230 ****** ADDITIONAL INFORMATION ****** All of them return 'success'. Naming all of the set of parameters with '000000', instead of '000000, 000001, 000002, etc' correctly appends lines to the file. | ||
Comments: | By: James Golovich (jamesgolovich) 2009-01-16 18:34:01.000-0600 I'm not sure what the book says or if there is an example in there. Your just doing it incorrectly. All of the params need to be in the same action. This should probably have been asked on asterisk-users instead of on the bug tracker This is what you need to do: Action: UpdateConfig SrcFilename: voicemail2.conf DstFilename: voicemail2.conf Action-000000: Append Cat-000000: default Var-000000: 127 Value-000000: >5555, Jason Bourne58, jason100@noCia.gov.do, Action-000001: Append Cat-000001: default Var-000001: 125 Value-000001: >55555, Jason Bourne25, jason34@noCia.gov.do, Action-000002: Append Cat-000002: default Var-000002: 122 Value-000002: >5555, Jason Bourne36, jason54@noCia.gov.do, By: Jose P. Espinal (khratos) 2009-01-16 21:01:34.000-0600 I'm very sorry for posting it here, I thought it was a 'trivial' bug, because of the following: a) There is no example available (no matter what google keyword you use on search) that gives you a clue on this particular topic. b) After asking a couple of time on #asterisk (and waiting several hours for a response) nobody came up with something. c) I did not get any response on asterisk-users d) The book ATFOT only mentions what I pasted previously I tried reading the source code, and even if I understood some little things about how it works, I could not find out the correct way to do it from it. Once again, sorry. PS. Thank you very much for telling me the right way to do it. Is there any other place where I can look for deeper information about the AMI ? (The voip-info.org website barely scratch the surface on details) |