« Back to Cisco JTAPI Questions

how to get caller phone number with the JTAPI?

Combination View Flat View Tree View
Threads [ Previous | Next ]
 I am a freshman for JTAPI, I test with the JTAPI sample. for the makecall method, we need to pass some parameters to it. such as
makecall <server> <login> <password> <delay> <origin> <destination>. we can hardcode the origin number and destination number to test now.
but I have a quesion, can I get the origin number( this also is the caller number) with the JTAPI? If no, how can I get this number with other way?

Hi Yang,

You can use CiscoCall API's like getCallingAddress(), getCurrentCallingAddress(), getModifiedCallingAddress(), etc, to retrieve the caller address in a call. For more info, please refer to the latest JTAPI Developer Guide posted on http://developer.cisco.com/web/jtapi/docs.

Thanks,
Andrew

Hi Yang,

You can use CiscoCall API's like getCallingAddress(), getCurrentCallingAddress(), getModifiedCallingAddress(), etc, to retrieve the caller address in a call. For more info, please refer to the latest JTAPI Developer Guide posted on http://developer.cisco.com/web/jtapi/docs.

Thanks,
Andrew



Thanks your suggestion, but I think for getCallingAddress(), getCurrentCallingAddress(), getModifiedCallingAddress() can be used to get the caller infomation after make a call. my quesion is when I begin to make a call ,how to know this number. below coding is copy from sample coding-makecall.java
 
 if (src == null) {
                        src = args;
                    } else {
                        dest = args;
                        Originator originator = new Originator(this.provider.getAddress(src), dest, (Trace) this, actionDelayMillis);
 
you can see the src is the original number, and it is passed from outside. My PC has installed the Cisco IP communatior software. There is a bingding phone number for me. How can I get this numer with the JTAPI ?

When JTAPI is used to open provider, application would know all the controllable addresses and terminals for that user. For example, you can fetch those addresses from CiscoProvider.getAddresses() and decide which address to be used as the calling party. Or you can fetch the terminals from provider and get the address of the one that you're interested in.

Regards,
Andrew