cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
854
Views
1
Helpful
1
Replies

How to know (PSTN) phone status is answered JTAPI

mohamedsary15
Level 1
Level 1

Dears,


we develop java web service  using JTAPI to ring for external number and know if the call is answered or not. Did you know if External phone (PSTN) status like (answered,ringing,..) is available  to collect in JTAPI as i searched i found under javax.telephony.callcontrol.events i can know the events by doing some conditions like this

if (( mycall.getConnections()[1].getState() == Connection.CONNECTED))&&mycall.getConnections()[0].getState() == Connection.CONNECTED)

And it works with me fine but only with IP phones to know if the call is answered or not, but with PSTN its not working simply the condition come true when the phone in ringing status is there any work around for this. to know if the call is answered or not.JTAPI


Thank you

Mohamed

1 Reply 1

pmnkumar
Level 1
Level 1

Terminal connections are not created for external address/terminals like PSTN phones. As you mentioned the Connection or callControlConnection states should be used. In basic call scenario,  even for external PSTN phones you should see connection events. You can use Jtrace sample app to track the events you are receiving. Sometimes PSTN calls take a few seconds to reach the destination and then answered. You may want to use the events received rather than checking the events periodically.

Some times the call may not be "answered" but media could be established. In such scenarios, CiscoRTP* events could help.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: