Write a shell script to query the modem and send the results of that shell script into a log file. Then parse as needed. You can do this one of two ways:
(Inside the shell script)
exec 1>> modem_query.log # Some log name, STDOUT
exec 2>> modem_query.log # Some log name, STDERR
OR:
./modem_query.ksh > modem_query.log 2>&1
If you do not want the errors, then send them to /dev/null.