Where are you getting the numbers 123 and 132 from? Those make no sense.
To properly analyze your sound data, you first need to figure out whether it's 8-bit or 16-bit (most likely 16-bit nowadays) and look at it using the appropriate data type (char for 8-bit, short for 16-bit). Note that the data is signed, not unsigned. You can check if the absolute value of the data is bigger than some threshold (maybe this is what you tried to do with your 123-132 thing)? You'll have to experiment to find the right threshold value. Also note that in any sound you'll get a wave that oscillates between positive and negative values. So just a pure threshold check will not work well, as you'll clip out the part of the wave below the threshold and it will distort the sound. Rather, you should do something like keep track of how long it's been below the threshold and stop recording if it's been below the threshold for half a second. Or, calculate the average power over the last half a second and stop recording if it's below a threshold. Again, you'll have to experiment to find the most effective way to do it.