using USB modem
Exactly which vendor and model of USB modem?
is it possible to create a generic method or any command/method available, which can provide the caller's number?
No, there is no standard for controlling the modem's calling line feature.
The first step is to verify that your telephony provider offers calling line service, and that your subscription includes the service (or in the case of an office PBX, that the PBX has the feature and that it is enabled for your line). Note that there are many (non-compatible) protocols used to deliver calling line information - you will need to ensure the your modem supports the protocol used by service/equipment you are connecting to.
Next, determine if the modem you want to use supports the calling line feature. The best way is to start with the make and model number, and search for the user manual or technical reference. If you find a document for the device, check to see if the feature is supported and which AT command(s) used to control it. Also check the protocols it supports, and verify that it is compatible with the telephony service/equipment. If you cannot locate an information, you could try a variety of AT commands used by different modem and hope you get lucky. Try each one and see if any respond with
OK.
The more command strings are:
        AT+VCID=1
        AT+CLIP=1
        AT#CID=1
        AT%CCID=1
        AT#CC1
        AT*ID1