To add to the comments by Atomic Toothbrush.
This is a snippet from one of my old Applescripts that uses the built in Command line [efax (fax)1 program to communicate with a modem.
set phone_num to "0207000000"
set thecall to do shell script "efax -v0 -d /dev/cu.modem -a TDT" & phone_num
I have also used the built in Command line program Screen to receive data from a totem Bluetooth Modem. ( I do not have a snippet to hand at the mo. On an old mac which I will need to dig out)
But before you even get into trying this you should read up on Applescript basics.