cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

The famous Address is out of service

2741
Views
0
Helpful
0
Comments
This document was generated from CDN thread

Created by: Kostik Hvostik on 18-09-2012 12:44:57 PM
Hi all! Could not find what I'm doing wrong. I'm writing test app to make a call to specified number (source code in attached file).
I'm getting Provider from peer, waiting for provider InService state - this goes successful. After that I'm getting Address and adding Observer to Address. In Observer's event list I receive "Address out of service" event (CiscoAddrOutOfServiceEvImpl). Point me to my mistake, plz!
Maybe, something wrong with CUCM configuration. I'm using Cisco Jtapi version 8.6(2.10000)-5 Release.
I've created End User st2 with roles:
 
Standard CCM End Users
Standard CTI Allow Control of All Devices
Standard CTI Enabled
 
checkbox "Allow Control of Device from CTI" is checked
 
He controls device stdev2:
 
Product Type:  CTI Port
Device Protocol:  SCCP
 
Device Security Profile: Cisco CTI Port - Standard SCCP Non-Secure Profile
 
Also I've added Directory Number to stdev2 device. DN associated with this device. In frame "Users Associated with Line" I've added a user st2. All other settings was set by default.
 
When I'm working with provider - I'm successfully get the list of addresses and terminals. But when adding observer to Addresss - receive "Address is out of service" error. What I'm doing wrong? Thanks a lot for advices!!!

Subject: RE: The famous Address is out of service
Replied by: Kostik Hvostik on 18-09-2012 07:26:11 PM
Hmmm, now I can to inititiate Arrdess to go into InService state. I was made it accidentally. I've tried to run JTrace app from example apps and when it was running - Addres was goin into InService mode correctly. I've made a little investigation and here is a neccessary line of code to make Addres to go InService:

            this.mainTerminal = (CiscoMediaTerminal)provider.getTerminals()[0];
            this.sourceDirectory = (CiscoAddress)provider.getAddress(sourceDirectory);
            this.sourceDirectory.addObserver(this);
            this.mainTerminal.register (
   InetAddress.getLocalHost (),
   0x4321,
   new CiscoMediaCapability [] { CiscoMediaCapability.G711_64K_30_MILLISECONDS }
   );


Just one question - why ? Like I understand - there is no reason to use CiscoMediaTerminal when I want to make a simple call. Or it's isn't so ?

Subject: RE: Re: New Message from Kostik Hvostik in Cisco JTAPI (JTAPI) - Cisco JTAP
Replied by: Kostik Hvostik on 18-09-2012 07:38:06 PM
You must specify media capabilities to register, regardless if it has any.

 
But why makecall app (from jtapi example apps) does not contain terminat.register() code line?  Is it necessary to use exactly CiscoMediaTerminal or there is a simplier method to place a call with CiscoTerminal object only ?
Thanks for you replies!

Subject: RE: Re: New Message from Kostik Hvostik in Cisco JTAPI (JTAPI) - Cisco JTAP
Replied by: Kostik Hvostik on 18-09-2012 07:51:58 PM
If the device the app is controlling is a hardware Cisco IP phone (instead of a CTI port), then this phone is responsible for its own media registration with UCM automatically when it powers on, and it is not necessary (or allowed) to register media with JTAPI.  The sample app should work without .register() if you're using two desk phones.

Thanks a lot! Thanks-thanks-thanks-thanks! At last I can start develop my lib, instead of turning grey with this out-of-service error. 
I hope this thread will help anybody, who is new with jtapi, to go through this obstacles. Thanks again, all of you!

Subject: Re: New Message from Kostik Hvostik in Cisco JTAPI (JTAPI) - Cisco JTAPI Qu
Replied by: Tanner Ezell on 18-09-2012 07:32:01 PM
You must specify media capabilities to register, regardless if it has any.

Kostik Hvostik has created a new message in the forum "Cisco JTAPI
> Questions":
>
> --------------------------------------------------------------
> Hmmm, now I can to inititiate Arrdess to go into InService state. I was
> made it accidentally. I've tried to run JTrace app from example apps and
> when it was running - Addres was goin into InService mode correctly. I've
> made a little investigation and here is a neccessary line of code to make
> Addres to go InService:
>
> this.mainTerminal = (CiscoMediaTerminal)provider.getTerminals()[0];
> this.sourceDirectory = (CiscoAddress)provider.getAddress(sourceDirectory);
> this.sourceDirectory.addObserver(this);
> *this.mainTerminal.register (
> InetAddress.getLocalHost (),
> 0x4321,
> new CiscoMediaCapability [] {
> CiscoMediaCapability.G711_64K_30_MILLISECONDS }
> );*
>
> Just one question - why ? Like I understand - there is no reason to use
> CiscoMediaTerminal when I want to make a simple call. Or it's isn't so ?
> --
> To respond to this post, please click the following link:
>
> <
> http://developer.cisco.com/web/jtapi/forums/-/message_boards/view_message/6522882
> >
>
> or simply reply to this email.

Subject: RE: The famous Address is out of service
Replied by: Mohan Potluri on 18-09-2012 07:34:32 PM
CTI Port / Cisco Media Terminal is a virtual device. Applications have to register them before initiating or receiving calls. 
<strong id="aui_3_2_0_1815" style="color: #525252; font-family: arial, helvetica, sans-serif; font-size: 11px; line-height: 15px;">this.mainTerminal.register call registers the CTIPort. Addresses on the CTIPort will not go into in-service state until it is registered.
More information on CTIPort can be found in Cisco JTAPI developer guide at http://developer.cisco.com/web/jtapi/docs.
 
 

Subject: RE: Re: New Message from Kostik Hvostik in Cisco JTAPI (JTAPI) - Cisco JTAP
Replied by: David Staudt on 18-09-2012 07:44:05 PM
If the device the app is controlling is a hardware Cisco IP phone (instead of a CTI port), then this phone is responsible for its own media registration with UCM automatically when it powers on, and it is not necessary (or allowed) to register media with JTAPI.  The sample app should work without .register() if you're using two desk phones.

Subject: RE: Re: New Message from Kostik Hvostik in Cisco JTAPI (JTAPI) - Cisco JTAP
Replied by: Jayant Kohli on 06-09-2013 06:23:56 AM
David Staudt:
If the device the app is controlling is a hardware Cisco IP phone (instead of a CTI port), then this phone is responsible for its own media registration with UCM automatically when it powers on, and it is not necessary (or allowed) to register media with JTAPI.  The sample app should work without .register() if you're using two desk phones.
Hi David,

We are facing similar issue however we dont want to use hardware device. We want to work with CTI port, our application works fine with the IP phone. Our CTI port shows unknown status and that could bea possible reason that the call is not getting connected. Is there a way to make call out of it with regisgtering it?
Error:
com.cisco.jtapi.InvalidStateExceptionImpl: Address is out of service
      at com.cisco.jtapi.IntraProviderAddress.assertValidState(IntraProviderAddress.java:1140)
      at com.cisco.jtapi.CallImpl.connect(CallImpl.java:1057)
      at com.cisco.jtapi.CallImpl.connect(CallImpl.java:1007)
      at client.MakeCallTest.<init>(MakeCallTest.java:61)
      at client.MakeCallTest.main(MakeCallTest.java:220)

Please advise as it is critical for our app.
regards,
Jayant

Subject: RE: Re: New Message from Kostik Hvostik in Cisco JTAPI (JTAPI) - Cisco JTAP
Replied by: David Staudt on 06-09-2013 08:49:58 AM
Yes, a CTI Port must Register for media before it will able to come In-Service and perform any call operations.  It is possible to register media for the port using a bogus/dummy IP address/port for quick testing, however most endpoints (like phones or gateways) will detect if RTP packets are not actively flowing from such a CTI port and will automatically disconnect after a fairly short timeout.
The JTAPI test tool has an option to register media for CTI ports, which can be useful for exploring the methods/events available...

Subject: RE: Re: New Message from Kostik Hvostik in Cisco JTAPI (JTAPI) - Cisco JTAP
Replied by: Alexander Anikin on 06-09-2013 09:00:25 AM
Jayant Kohli:

Is there a way to make call out of it with regisgtering it?

regards,
Jayant
There is a way.
1) Add observer to CTI port address and terminal.
2) Register your CTI port terminal: 
Terminal phone_term = provider.getTerminal(<put CTI port name here>);
phone_term.register(<put internet address of RTP stream host>, <put port for RTP streams>, new CiscoMediaCapability [] { CiscoMediaCapability.G711_64K_30_MILLISECONDS });
3) Wait for CiscoTermInServiceEv event in terminal observer (it's class should implement CiscoTerminalObserver interface)
4) Place your call.
5) React on events to start RTP stream and start sending RTP stream if your call lasts 10 seconds or longer in connected state on CTI Port.
Create
Recognize Your Peers
Content for Community-Ad