#!/usr/bin/expect set timeout 1 proc files codecname { puts "am working on codec no. $codecname" for {set filecount 1} {$filecount <= 4} {incr filecount} { set slpdur 20 switch $filecount { 1 { #puts file as ref-f1.au set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f1.au \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait for {set i 1 } { $i <= 5 } { incr i } { switch $i { 1 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f11$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 2 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f12$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 3 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f13$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 4 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f14$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 5 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f15$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } } } } 2 { #puts file as ref-f2.au set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f2.au \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait for {set i 1 } { $i <= 5 } { incr i } { switch $i { 1 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f21$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 2 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f22$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 3 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f23$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 4 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f24$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 5 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-f25$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } } } } 3 { #puts file as ref-m1.au set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m1.au \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait for {set i 1 } { $i <= 5 } { incr i } { switch $i { 1 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m11$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 2 { set tpid [ spawn telnet 156.26.66.65 ] send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m12$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 3 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m13$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 4 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m14$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 5 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m15$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } } } } 4 { #puts file as ref-m2.au set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m2.au \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait for {set i 1 } { $i <= 5 } { incr i } { switch $i { 1 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m21$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 2 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m22$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 3 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m23$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connect" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 4 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m24$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait } 5 { set tpid [ spawn telnet 156.26.66.65 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "stop \r" expect "#" send "global type voice \r" expect "#" send "audio-file 1 tftp://130.10.10.100/ref-m25$codecname.au \r" expect "#" send "exit \r" expect "#" send "start \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait set tpid [ spawn telnet 156.26.1.2 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "callgen \r" expect "#" send "start \r" sleep $slpdur expect "#" send "stop \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "Connection" wait } } } } } } return } # prcedure ends here proc codecconf load { for {set codcounter 1} {$codcounter <= 4 } {incr codcounter} { switch $codcounter { 1 { #puts codec as g711alaw set codecname "load1g711a" set tpid [ spawn telnet 156.26.52.52 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "conf t \r" expect "#" send "dial-peer voice 101 voip \r" expect "#" send "codec g711alaw \r" expect "#" send "end \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait #config r11 too set tpid [ spawn telnet 156.26.52.53 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "conf t \r" expect "#" send "dial-peer voice 101 voip \r" expect "#" send "codec g711alaw \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "wr m \r" sleep 5 expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait #call proc for file manip on r8 and r9 files $codecname } 2 { #puts codec as g711ulaw set codecname "load1g711u" set tpid [ spawn telnet 156.26.52.52 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "conf t \r" expect "#" send "dial-peer voice 101 voip \r" expect "#" send "codec g711ulaw \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "wr m \r" sleep 5 expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait #config r11 too set tpid [ spawn telnet 156.26.52.53 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "conf t \r" expect "#" send "dial-peer voice 101 voip \r" expect "#" send "codec g711ulaw \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "wr m \r" sleep 5 expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait #call proc for file manip on r8 and r9 files $codecname } 3 { #puts codec as g723ar53 set codecname "load1g723ar53" set tpid [ spawn telnet 156.26.52.52 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "conf t \r" expect "#" send "dial-peer voice 101 voip \r" expect "#" send "codec g723ar53 \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "wr m \r" sleep 5 expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait #config r11 too set tpid [ spawn telnet 156.26.52.53 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" expect "#" send "conf t \r" expect "#" send "dial-peer voice 101 voip \r" expect "#" send "codec g723ar53 \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "wr m \r" sleep 5 expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait #call proc for file manip on r8 and r9 files $codecname } 4 { #puts codec as g723ar63 set codecname "load1g723ar63" set tpid [ spawn telnet 156.26.52.52 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" expect "#" send "conf t \r" expect "#" send "dial-peer voice 101 voip \r" expect "#" send "codec g723ar63 \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "wr m \r" sleep 5 expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait #config r11 too set tpid [ spawn telnet 156.26.52.53 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "conf t \r" expect "#" send "dial-peer voice 101 voip \r" expect "#" send "codec g723ar63 \r" expect "#" send "exit \r" expect "#" send "exit \r" expect "#" send "wr m \r" sleep 5 expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait #call proc for file manip on r8 and r9 files $codecname } } } return } # puts "Zero Load Configuration" set load "noload" set tpid [ spawn telnet 156.26.26.26 ] expect "Password" send "cisco\r" expect ">" send "en \r" expect "Password" send "cisco\r" expect "#" send "tgn \r" expect "#" send "stop \r" expect "#" send "clear conf \r" expect "#" send "add ip \r" expect "#" send "length 125 \r" expect "#" send "rate 1000 \r" expect "#" send "start \r" #sleep 305 expect "#" send "quit \r" expect "#" send "exit \r" expect "Connection" exec kill -9 $tpid wait # calling procedure now to change config of # R10 and R11 codecconf $load