Return to LanScape's home page Go back a page...       Active TopicsActive Topics   Display List of Forum MembersMember List   Knowledge Base SearchSearch   HelpHelp  RegisterRegister  LoginLogin

LanScape VOIP Media Engine™ - Technical Support
 LanScape Support Forum -> LanScape VOIP Media Engine™ - Technical Support
Subject Topic: MakeCallUri returning SipInvalidHandle Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Cwilson
Intermediate
Intermediate


Joined: August 10 2012
Location: United Kingdom
Posts: 25
Posted: January 03 2013 at 9:59am | IP Logged Quote Cwilson

MakeCallUri fails with a return status of SipInvalidHandle
when the VOIP Media Engine is run on one of our live
servers.

The same application works fine in test and on a different
live server. The only major difference between the
environments is that the live server we're having problems
with has two IP addresses.

So my question is this. What causes MakeCallUri to return
a SipInvalidHandle under managed code?
Back to Top View Cwilson's Profile Search for other posts by Cwilson
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: January 04 2013 at 10:07am | IP Logged Quote support


The VoipMediaEngine::MakeCallUri() will return SipInvalidHandle if the media engine is not properly initialized for that specific .NET media engine object.

More Info:
The .NET wrapper for the media engine wraps native media engine code.

When you create an instance of the .Net media enigne by calling the VoipMediaEngine::StartSipTelephony() API procedure, an internal native instance of the media engine gets created. This native media engine instance is maintained by the .NET wrapper code as an internal handle value (it is actually a native memory pointer).

If the .NET VoipMediaEngine::StartSipTelephony() API procedure fails, this internal native handle is not properly set (it will be NULL) and any calls to other API procs such as VoipMediaEngine::MakeCallUri() will return the SipInvalidHandle value.

The first check is to make sure the return values for all calls to VoipMediaEngine::StartSipTelephony() return SipSuccess. In this case, you can verify that the native media engine has been created for your .NET media engine object by taking a look at the VoipMediaEngine::hStateMachineNative value. It will be non zero.

If all your calls to VoipMediaEngine::StartSipTelephony() return SipSuccess, then possibly the media engine is being uninitialized before you call the VoipMediaEngine::MakeCallUri() proc. Is it possible that VoipMediaEngine::StopSipTelephony() is being called prematurely?

RJ

Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 
Cwilson
Intermediate
Intermediate


Joined: August 10 2012
Location: United Kingdom
Posts: 25
Posted: January 08 2013 at 10:46am | IP Logged Quote Cwilson

Upon further investigation this problem turned out to be
due to incorrectly handling a
SipMediaEngineAlreadyInitialized return value.

After the object in charge of the SIP trunk initialises
the Media Engine for the first SIP trunk, the application
then creates another instance of the object and tries to
create a new Media Engine object. Then it tries to
initialise it in the same way causing the
SipMediaEngineAlreadyInitialized value to be returned.

This was resolved by treating
SipMediaEngineAlreadyInitialized as a SipSuccess return
value. (If the Media Engine instance is already
initialised, then we've done it once already and don't
need to do it again.)

Back to Top View Cwilson's Profile Search for other posts by Cwilson
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: January 08 2013 at 11:39am | IP Logged Quote support

Excellent...
Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum






Contact LanScape Hear what the Lawyers have to say How youm may use this site Read your privacy rights