neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31602 )
Change subject: add msc.vty to test 'msc' / 'codec-list' cfg ......................................................................
add msc.vty to test 'msc' / 'codec-list' cfg
Show various weird things we allow in codec-list.
Change-Id: I04ce02dff7cadab826611bd6a0df5596a40578b5 --- A tests/msc.vty 1 file changed, 135 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/02/31602/1
diff --git a/tests/msc.vty b/tests/msc.vty new file mode 100644 index 0000000..555ea34 --- /dev/null +++ b/tests/msc.vty @@ -0,0 +1,124 @@ +OsmoBSC> enable + +OsmoBSC# configure terminal +OsmoBSC(config)# msc 0 + +OsmoBSC(config-msc)# codec-list? + codec-list Set the allowed audio codecs +OsmoBSC(config-msc)# codec-list ? + LIST List of audio codecs, e.g. fr3 fr1 hr3 + +OsmoBSC(config-msc)# # Default list -- should match the default in osmo_msc_data_alloc() +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list fr1 hr1 fr2 fr3 hr3 +... + +OsmoBSC(config-msc)# # Change order +OsmoBSC(config-msc)# codec-list fr3 hr3 fr2 fr1 hr1 +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list fr3 hr3 fr2 fr1 hr1 +... +OsmoBSC(config-msc)# codec-list hr1 hr3 fr1 fr2 fr3 +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list hr1 hr3 fr1 fr2 fr3 +... + +OsmoBSC(config-msc)# codec-list foo +Codec name must be hrX or frX. Was 'foo' +% Command incomplete. +OsmoBSC(config-msc)# # ERROR: "Command incomplete" is not accurate + +OsmoBSC(config-msc)# codec-list fr10 +Codec name must be hrX or frX. Was 'fr10' +% Command incomplete. +OsmoBSC(config-msc)# # ERROR: "Command incomplete" is not accurate + +OsmoBSC(config-msc)# codec-list hr10 +Codec name must be hrX or frX. Was 'hr10' +% Command incomplete. +OsmoBSC(config-msc)# # ERROR: "Command incomplete" is not accurate + +OsmoBSC(config-msc)# codec-list FR1 +Codec name must be hrX or frX. Was 'FR1' +% Command incomplete. +OsmoBSC(config-msc)# # ERROR: "Command incomplete" is not accurate + +OsmoBSC(config-msc)# # Ensure the codec-list with wrong args did not change the config +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list hr1 hr3 fr1 fr2 fr3 +... + +OsmoBSC(config-msc)# codec-list fr1 fr1 +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list fr1 fr1 +... +OsmoBSC(config-msc)# # ERROR: duplicate entries make no sense + +OsmoBSC(config-msc)# codec-list fr0 fr1 +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list fr0 fr1 +... +OsmoBSC(config-msc)# # ERROR: fr0 should be rejected + +OsmoBSC(config-msc)# codec-list hr0 hr1 +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list hr0 hr1 +... +OsmoBSC(config-msc)# # ERROR: hr0 should be rejected + +OsmoBSC(config-msc)# codec-list fr8 fr9 +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list fr8 fr9 +... +OsmoBSC(config-msc)# # ERROR: fr8 and fr9 should be rejected + +OsmoBSC(config-msc)# codec-list hr8 hr9 +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list hr8 hr9 +... +OsmoBSC(config-msc)# # ERROR: hr8 and hr9 should be rejected + +OsmoBSC(config-msc)# codec-list fr2 hr2 +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list fr2 hr2 +... +OsmoBSC(config-msc)# # TODO: should hr2 be rejected + +OsmoBSC(config-msc)# codec-list fr1 fr2 fr3 fr4 +OsmoBSC(config-msc)# show running-config +... +msc 0 +... + codec-list fr1 fr2 fr3 fr4 +... +OsmoBSC(config-msc)# # TODO: should fr4 thru fr7 be rejected