Share This Post:

Debug Simple Call Application

Hi, I have installed Voicent Gateway on my PC and I’m using C# code to send calls to it (CallText and CallAudio methods).
But I have 2 problems and I hope I get your support:

1 – “CallStatus” is always empty , even if the call is made successfully or failed.

here’s the code im using:

while (true)
{
Thread.Sleep(10000); // wait for 10 seconds
string status = voicent.CallStatus(reqId);
MessageBox.Show(“Call Status: ” + status);
if (status.Length != 0)
{
break;
}
}

voicent.CallRemove(reqId);

In this case I am not able to make the call again or remove it if it failed or succeeded, because “status” is always Empty

Here is a little background info about using the simple call interface of Voicent gateway.

When you call CallText or CallAudio, a call request is sent to the gateway. The gateway saves the call request information in a .req file under the folder: C:\Program Files\Voicent\Gateway\outcall\reqs.

The call request is then processed by Voicent outbound call scheduler. The schedule first fines an available phone line and if the call time is current, makes the call. The call sheduler’s log is under C:\Program Files\Voicent\Gateway\outcall\logs.

The gateway starts the corresponding call application (Text-to-speech for CallText, for example), dials the phone number, and interactive with the callee. The gateway application logs are saved under C:\Program Files\Voicent\Gateway\logs. After the call is made, the gateway updates the .req files for the call status and changes the .req extension to .log.

When developing your application, it is usually helpful to take a look at the log files. Even though the log file contents are hard to understand, they usually provide important clues as to what went wrong. For example, you can search for “fail”, “error”, and “cannot” to see the error messages.

If you really cannot understand the log files, please send the log files to us by selecting Help > Report Problems… from the gateway main menu.

2. I’m using Volcano voice modem v.92 (PCI) , does the gateway support it?

No. That might as well be the problem. For more details about voice modem, please see Modem FAQ. You could also try Skype or any SIP based VOIP service without using a voice modem.

The status in the log file works fine (Routing, Calling, Call in Progress, Finished…) but in my C# code when call is made successfully, “CallStatus” returns Empty. It only returns “Call Will Retry” when the call is terminated in the middle.

Is there anyway to synchronize the log file “status” with the one in C# code?

If the log files look OK, you can also try the interface using a web browser. For example, to get the call status using your web browser, type in the following:

http://localhost:8155/ocall/callstatusHandler.jsp?reqId=the_ID_you_get_when_call_request_is_submitted

The details of the URL and parameters can be found from the interface code.

In the browser I typed http://localhost:8155/ocall/callstatusHandler.jsp?reqId=the_ID_you_get_when_call_request_is_submitted :

When call is diconnected I receive the following : [0^null^retry^2009 6 14 9 17^2009 6 14 9 17^Line occupied. Cancelled Try in 5 minutes.^^^^^ ]
Which means the call is failed and will retry in 5 minutes, and that is fine.

But when call is performed successfully the following appears: [ERROR: no such call record: 1247552793013]
Does this mean that there’s an error?

Looks like the call record (.req file or .log file) on the gateway is deleted once a call is made.

There is a parameter called “selfdelete” when a call is submitted to the gateway. If it is set to “1″, the gateway deletes the call record file automatically. Once the call record is removed, the gateway cannot return the call status.

Share This Post:

This entry was posted in Developer, Gateway. Bookmark the permalink.