# HG changeset patch # User Tomas Zeman # Date 1345546904 -7200 # Node ID 7a33198be9301f046bedf8f8f500b8042012d219 # Parent dd3906ea5dc64b8a2e6dc6a37b2c0b12137b056e oneaccess.gramar: dial-peers diff -r dd3906ea5dc6 -r 7a33198be930 oneaccess.gramar --- a/oneaccess.gramar Tue Aug 21 12:42:51 2012 +0200 +++ b/oneaccess.gramar Tue Aug 21 13:01:44 2012 +0200 @@ -59,6 +59,7 @@ line: s_controller | s_interface | s_voice_port + | s_dial_peer | l_vrf | l_sntp | l_syslog @@ -242,3 +243,24 @@ | "modify-tone" identifier /\S+/ { $arg{ctx}->{$item[1]}->{$item{identifier}} = $item[3] } +# dial peers +s_dial_peer: "0" "dial-peer" "voice" word num eol s_dial_peer_l[ctx => ctx('dial-peer', $item{word}.":".$item{num}), type => $item{word}, num => $item{num} ](s) "0" "exit" eol + +s_dial_peer_l: "1" s_dial_peer_content[ctx => $arg{ctx}] eol + { + $arg{ctx}->{type} = $arg{type}; + $arg{ctx}->{num} = $arg{num} + } + | l_section + +s_dial_peer_content: identifier word + { + if ($item[1] eq 'no') { + $arg{ctx}->{$item[2]} = 0; + } else { + $arg{ctx}->{$item[1]} = $item[2]; + } + } + | identifier + { $arg{ctx}->{$item[1]} = 1 } +