You cannot detect this via external means. The common practise is either to setup udev rules for specific modem manufacturer and model. Or you can sequentially connect to each tty and verify via AT command what type of port it is.
In the case of udev rules you can follow this process:
1) Detect modem vid and pid
2) Based on vid/pid create symlinks in /dev/serial/by-id
For example a Sierra Wireless MC8795V modem with vid = 1199 and pid 683c. I know that port 3 is always the AT command channel. Therefore you could create a symlink post-fixed with -AT at the end.
In the case of detecting via AT commands the best and more common approach is to execute the AT command to see if the tty responds at all. You should get an echo back or an OK if your configured your modem not to echo.
For example:
AT
AT
OK
If you get a response this means you found either an AT control port or a PPP port. To check this simply execute a ATI command. If the response contains APP1, APP2, APP3 then you hit a PPP port. Otherwise you found your AT control port.
For example a AT control port:
ATI
Manufacturer: Sierra Wireless, Incorporated
Model: MC8795V
Revision: K2_0_7_46AP C:/WS/FW/K2_0_7_46AP/MSM6290/SRC 2010/10/27 22:15:30
IMEI: XXXXXXXXXXXXXXX
IMEI SV: 20
FSN: D9A2160146410
3GPP Release 6
+GCAP: +CGSM,+DS,+ES
OK
For example a PPP port:
ATI
Sierra Wireless, Incorporated
MC8795V
APP1
OK
A word of warning though. In the case of Sierra Wireless modules they clearly show which port is which. In the case of other manufacturers you'll need to check the USB interface guide to see if it is possible via ATI to take this approach.