# HG changeset patch # User Tomas Zeman # Date 1345545771 -7200 # Node ID dd3906ea5dc64b8a2e6dc6a37b2c0b12137b056e # Parent b39ab9900b2451779190822692b9c3bda2545e85 oneaccess.gramar: voice ports diff -r b39ab9900b24 -r dd3906ea5dc6 oneaccess.gramar --- a/oneaccess.gramar Tue Aug 21 12:22:33 2012 +0200 +++ b/oneaccess.gramar Tue Aug 21 12:42:51 2012 +0200 @@ -58,6 +58,7 @@ line: s_controller | s_interface + | s_voice_port | l_vrf | l_sntp | l_syslog @@ -226,5 +227,18 @@ l_syslog: "0" "syslog" "server" ip num via_iface[ctx => ctx('syslog', 'server', $item{ip})] eol | "0" "logging" "syslog" /\w+/ eol - { $::res->{syslog}->{level} = $item[4]; } + { $::res->{syslog}->{level} = $item[4] } + +# voice ports +s_voice_port: "0" "voice-port" /\d+\/\d+/ eol s_voice_port_l[ctx => ctx('voice-port', $item[3])](s) "0" "exit" eol + +s_voice_port_l: "1" s_voice_port_content[ctx => $arg{ctx}] eol + | l_section +s_voice_port_content: /clock-source|tone|caller-id/ identifier + { $arg{ctx}->{$item[1]} = $item{identifier} } + | /(no)?/ /sntp-time|power-source-one/ + { $arg{ctx}->{$item[2]} = ($item[1] eq 'no') ? 0 : 1 } + | "modify-tone" identifier /\S+/ + { $arg{ctx}->{$item[1]}->{$item{identifier}} = $item[3] } +