Author |
|
plynham Intermediate
Joined: October 29 2005 Location: United Kingdom Posts: 7
|
Posted: October 29 2005 at 7:17am | IP Logged
|
|
|
Hi.
I am making a non-syncronized call to MakeCall which places a sip->pstn call via an asterisk server.
If I disconnect the Eternet cable from the back of my computer to simulate a connection problem with the server I expect to get some sort of error when the call is made via the event call-back system. But I don't seem to.... I do however start getting sip registration error events but these take about a minute to start coming through.
I wonder if there is any way to determine if there was a problem in making the call due to server connection failure or do I have to wait for ages for the registration to timeout.
Cheers,
Paul Lynham
|
Back to Top |
|
|
lsadmin Administrator
Joined: October 01 2003 Location: United States Posts: 19
|
Posted: October 29 2005 at 9:48am | IP Logged
|
|
|
Hi Paul,
You make an excellent point. We are looking into it but will most likely not have an answer until Monday 10/31/05. Until then hold tight.
By the way, happy Halloween. :)
Support
|
Back to Top |
|
|
lsadmin Administrator
Joined: October 01 2003 Location: United States Posts: 19
|
Posted: October 31 2005 at 3:02pm | IP Logged
|
|
|
Hi Paul,
This question has come up before. We wanted to re-research a bit to make sure the answer we give here is accurate and consistent with a previous response we gave another customer.
At the moment, the VOIP Media Engine does not indicate to the application any hardware related network failures (network cable unplugged, etc). This is due to current Windows Winsock2 behavior. We will be including new functionality to help address this but it is not yet available. However , there are a few things you can do in your app that may give you satisfactory results:
1)
If a phone call is not connected within a specific amount of time, assume your network cable is dead or your Asterisk box has died.
2)
Before each call, quickly enumerate all available IP addresses in your application. If the IP address your code has assigned to the VOIP Media Engine does not exist, then you know your NIC is unplugged or has been disabled. If the IP address you assigned to the VOIP Media Engine exists, make the call, otherwise handle the error.
3)
Before you make a phone call, try to “ping” the destination yourself in your application code. Use ICMP ping packets and wait up X milliseconds for a response. If the ping is OK, make the call otherwise handle the error.
Note: Item 2 and 3 above may still miss a network cable unplugged situation if the call’s SIP INVITE message gets transmitted just before the NIC cable gets unplugged and before the first response is received from the far end. Then the only thing to do is to fall back to item #1.
Here is a link to an article on the web that explains this problem in more detail:
Q. How can I detect if my internet connection is active at this moment?
http://www.ndis.com/faq/QA05040101.htm
Make sure you read the following:
http://www.ndis.com/faq/inetactive.txt
Also, you might want to Google for information on Microsoft’s “Media Sense” as supported on Windows 2000 and XP.
If you have other information for us that may be useful, repost as required.
Support
|
Back to Top |
|
|
plynham Intermediate
Joined: October 29 2005 Location: United Kingdom Posts: 7
|
Posted: November 04 2005 at 3:05am | IP Logged
|
|
|
Thanks - there are plenty of options to try.
Regards
Paul
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: February 22 2007 at 1:09pm | IP Logged
|
|
|
Note: Here is another local link to the text document sited above:
http://www.lanscapecorp.com/support/voipmediaengine/inetacti ve.txt
Support
|
Back to Top |
|
|