I have custom class for work with asterisk ami via php. Using asterisk docs , I tried this:
$a->write("Action: updateconfig\r\nReload: yes\r\nSrcfilename: extensions.conf\r\nDstfilename: extensions.conf\r\nAction-000000: delete\r\nCat-000000: test\r\nVar-000000: exten");
This delets all extensions from test category. I need to delete certain extension. In docs there is a Match field, but it's not really clear for me what should I match with in extension value. I have an extension:
exten => 999,1,Dial(SIP/Bob)
I tried this:
$a->write("Action: updateconfig\r\nReload: yes\r\nSrcfilename: extensions.conf\r\nDstfilename: extensions.conf\r\nAction-000000: delete\r\nCat-000000: test\r\nVar-000000: exten\r\nValue-000000: 999");
this:
$a->write("Action: updateconfig\r\nReload: yes\r\nSrcfilename: extensions.conf\r\nDstfilename: extensions.conf\r\nAction-000000: delete\r\nCat-000000: test\r\nVar-000000: exten\r\nMatch-000000: 999");
this:
$a->write("Action: updateconfig\r\nReload: yes\r\nSrcfilename: extensions.conf\r\nDstfilename: extensions.conf\r\nAction-000000: delete\r\nCat-000000: test\r\nVar-000000: exten\r\nMatch-000000: Bob");
First variant still delets all extensions from category and other two with Match return error message: Delete did not complete successfully
How can I delete certain extensions then?
我必须在 Match 字段中写入完整的扩展值,而不像这样 > 999,1,Dial(SIP/Bob)
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.