VoiceGuide IVR Software Main Page
Jump to content

Callerid Retrieval With D/4pciu

Recommended Posts

I want to set my D/4PCIU to report a new call at 0 rings to have VoiceGuide start its script immediately, so it can choose to answer before it rings after hours, or in a Do Not Disturb mode. But for other calls, I need to route based on Caller ID, which is not available in my area until after the first ring.

 

Best I can tell, by default VoiceGuide retrieves CID information from the initial report sent by the Dialogic card, loads its result variables from that report, and doesn't check again with the card afterwards to see if CID has been received. All of the documented VBScript COM methods expose this VoiceGuide interface, but don't seem to expose the Dialogic card either. However, the Dialogic API seems to indicate the card will support repeated Caller ID queries even after the initial report, and will return the Caller ID when queried after it has been received.

 

How can I send such a secondary query to the D/4PCIU after my script is already running, to pick up the CID once it becomes available? Does VoiceGuide have some kind of a VB script command set to talk directly to the Dialogic card? I would really appreciate any ideas for making this work.

Share this post


Link to post

If you want to receive the CallerID then you need to wait until the second ring.

 

Caller ID will not be sent by the phone company if the call is answered immediately after the first ring.

 

Once the Caller ID arrives it is immediately available within the script and can be also retrieved using the COM interface.

Share this post


Link to post

Actually, I want to start the VoiceGuide script immediately, but wait to answer until later in the script. Depending on the circumstances, I might answer shortly after the script starts, or I might wait until after the first ring to get the CID and then choose what to do.

 

This scenario is consistent with the way the phone company, VoiceGuide scripts, and the Dialogic card works. The only question is how to query the CID from the Dialogic card within a VoiceGuide script, if the CID was not yet present when the script started. How can I do that?

Share this post


Link to post

I tried that. But when the Dialogic card started the VoiceGuide script before CID came through, $RV_CIDNUMBER was never populated. I'll try again and send you a log later tonight if you like.

 

How and when does $RV_CIDNUMBER get set, if it doesn't happen to be in the initial string passed through from the card when the script starts? Is Dialogic supposed to interrupt VoiceGuide with the CID when it comes through, and the interrupt handler sets $RV_CIDNUMBER? Is VoiceGuide supposed to continue querying Dialogic in the background for the CID? Or is VoiceGuide supposed to query Dialogic for the CID every time I access $RV_CIDNUMBER?

Share this post


Link to post
Is Dialogic supposed to interrupt VoiceGuide with the CID when it comes through, and the interrupt handler sets $RV_CIDNUMBER?

Yes. That's how it should work.

 

Could you please post a copy of VoiceGuide's Debug Printout which captures the problem, this will allow us to see what is going wrong.

Share this post


Link to post

Please also post a log of a call during which the script does not start unitl after the second ring.

Share this post


Link to post

I ran this two ways, with Dialogic providing the delay (worked), and with VoiceGuide waiting until the 2nd ring to respond (did not work). I replaced the phone numbers with <caller> and <called>, since this is a public forum.

 

I also included a listing of software versions and all the configuration options I could find, in case that helps. Thanks very much for looking into this!

Test2.zip

Share this post


Link to post

Traces show the Dialogic card supplies the Caller ID in the trace where the script starts immediately without answering the call:

105954.63  6 Waiting for a call...
105954.66  6 dlgc  bus switching not supported
110024.84  6 linedevstate 2048 0 0
110024.84  6 callstate OFFERING 66116 0 4
110024.86  6 Start without answering the call
110024.86  6 StartLoadedVgs at 1/18/2005 11:00:24 AM
110024.86  6 AddRVns [ScriptsPath]{C:\Documents and Settings\Greg Sallee\My Documents\VoiceGuide\}
110024.88  6 AddRVns [ScriptPath]{C:\Documents and Settings\Greg Sallee\My Documents\VoiceGuide}
110024.88  6 rv    add [$RV_STARTTIME]{1/18/2005 11:00:24 AM}
110024.88  6 rv    add [$RV_DEVICEID]{6}
110024.88  6 rv    add [$RV_CIDNAME]{}
110024.88  6 AddRVns [PathApp]{C:\Program Files\VoiceGuide\}
110024.88  6 rv    add [$RV_CIDNUMBER]{}
110024.89  6 Lev_CallerID [<caller>,,<called>]
110024.89  6 rv    add [DNIS]{<called>}
110024.89  6 callinfo CALLEDID
110024.89  6 callinfo ORIGIN
110024.89  6 ring 0
110024.89  6 timer clear
110024.91  6 [Test] Running VB Script...

But for some reason Caller ID is not supplied if VoiceGuide waits a few rings first before starting the script (still without answering the call).

110638.78  6 Waiting for a call...
110638.78  6 dlgc  bus switching not supported
110652.73  6 linedevstate 2048 0 0
110652.73  6 callstate OFFERING 65996 0 4
110652.75  6 callinfo CALLEDID
110652.75  6 callinfo ORIGIN
110652.75  6 ring 0
110658.72  6 ring 2
110658.72  6 Start without answering the call
110658.73  6 StartLoadedVgs at 1/18/2005 11:06:58 AM
110658.73  6 AddRVns [ScriptsPath]{C:\Documents and Settings\Greg Sallee\My Documents\VoiceGuide\}
110658.73  6 AddRVns [ScriptPath]{C:\Documents and Settings\Greg Sallee\My Documents\VoiceGuide}
110658.73  6 rv    add [$RV_STARTTIME]{1/18/2005 11:06:58 AM}
110658.73  6 rv    add [$RV_DEVICEID]{6}
110658.73  6 rv    add [$RV_CIDNAME]{}
110658.73  6 AddRVns [PathApp]{C:\Program Files\VoiceGuide\}
110658.73  6 rv    add [$RV_CIDNUMBER]{}
110658.75  6 timer clear

It's pretty strange that the card sometimes supplies the caller ID and sometimes it does not. Were both calls made from the same telephone?

 

Anyway, the first trace shows the system working just the way you want it to work (start script, wait for CID then decide what to do when it arrives).

 

I guess what you should be concentrating on is why the Dialogic card sometimes does not seem to supply the Caller ID - the usual cause of this is that it's just not sent by the phone company. I would use an external CallerID monitoring device to confirm this.

 

Also, the trace shows that you are supplied the DNIS (dialed number) information!

 

This is the first time I've seen DNIS supplied by a phone company on analog lines...

What phone company is supplying you the lines?

What options did you ask them to enable on those lines that allow you to receive DNIS information?

Share this post


Link to post

All calls were made the same way, from the same telephone. Unfortunately, none is displaying the behavior I want.

 

The difference between the tests is that the first script I sent (log.zip) was made with the Dialogic/TAPI ring count threshold set to 0 rings, the second script (Test2:Dialogic2.zip) was made with the Dialogic/TAPI ring count threshold set to 2 rings, and the third (Test2:VG2.zip) had the Dialogic/TAPI threshold at 0 rings and the VG threshold set at 2 rings.

 

In both of the tests (1 and 3) that had Dialogic report the call immediately (0 rings), VoiceGuide never received the CID information. In the second test that had Dialogic wait until it received CID to report the call to VoiceGuide, VG received the CID correctly...but having it wait to start the script until the phone has rung twice defeats the purpose of using VoiceGuide to set Do Not Disturb timeframes. All three tests started the script as soon as Dialogic reported the call, but none of them allowed me to *both* start the script as soon as the call arrived *and* still retrieve CID.

 

Clearly there's a problem with the interrupt mechanism. Either Dialogic is not sending the CID if received after it reports the call, or VoiceGuide isn't handling the signal appropriately after the script is off and running. How can we tell which is true? And if the problem is my (new) Dialogic card or configuration, how should I go about resolving it? The problem is definitely not CID not being sent, because I'm seeing it show up consistently on our phone-based CID displays.

 

Our phone service is coming from Vonage (VoIP), by the way. No special options; apparently DNIS is a freebie. Cool, huh?

Share this post


Link to post

So to recap, the sequence of events should be:

* Dialogic detects the call immediately (first ring) and starts the script

* Script starts without answering, and waits until Dialogic receives CID

* Dialogic sends CID

* VG receives CID and sets $RV_CIDNUMBER

* Script checks $RV_CIDNUMBER and handles the call

 

What is happening is that if Dialogic is set to detect the call immediately, CID is never found in $RV_CIDNUMBER. In order to receive CID in my script (like the test you highlighted), I have to set Dialogic to detect the call after 2 rings. Of course, by the time I've waited 2 rings to even start the script, the Do Not Disturb horse is long gone.

 

I'm just getting started with the Dialogic API, and I'm not sure about the role of TAPI in your application, but it seems the problem might be in the way you're requesting the CID. The dx_wtcallid() function behaves exactly like my tests: it takes a number of rings (presumably the TAPI ring count I'm setting to 0 or 2), waits that long, and then reports a CID event afterwards. The doc is a little vague, but specifically, it looks like it's calling dx_setevtmsk() and dx_getevt() to set up notification for a ring event, then immediately calling dx_gtcallid() one time afterward to report the CID. If one were to use a 0-1 ring count with a CLASS-based CID, this would result in the dx_gtcallid() call occurring before the CID had been received, and the documentation does in fact point out that the Nrings parameter must be 2+ for this function to work in CLASS and ACLIP environments. I suspect this is the function that VG is using, and the reason my script isn't working.

 

However, the documentation also says that the CID information continues to be available upon request (by calling dx_gtcallid() or dx_gtextcallid()) until the call is disconnected, either by hanging up or because the rings stop coming from the CO. So there is no reason to suppose that my Dialogic card isn't working or that Dialogic could not support this scenario...we just have to make sure the VoiceGuide script asks Dialogic for the CID after it's actually been received, if Dialogic hasn't already transmitted it.

 

Could you please check the source code to confirm that this is what's happening? And could you please recommend a course of action...either a code change, or a way for me to call dx_gtcallid() and dx_gtextcallid() directly in my script?

 

Thanks!

Share this post


Link to post

I've just checked and the 'VoiceGuide for Dialogic' application will be able to do what you want.

 

Please send an email to support@voiceguide.com and we will forward you 'VoiceGuide for Dialogic'.

Share this post


Link to post

Are my emails getting through? I've sent two emails to support@voiceguide.com and gotten no response. Is there anything special I need to put in the email?

Share this post


Link to post

Yea!! Thank you - I have (re)installed, and now the CID information comes through as it is sent, even when the script starts immediately.

 

One thing puzzles me. With this version of the software, I don't get the DNIS information anymore. Same script, same calling phone, same CO, same hardware...but now DNIS isn't coming through.

 

The tw log (attached) seems very clear that VoiceGuide is asking Dialogic for the MCLASS_DDN parameter, but nothing's being returned. Yet I was getting DNIS with the TAPI version of VoiceGuide, so we know it's being sent.

 

What's different about the way VoiceGuide for Dialogic is asking for DNIS?

 

 

 

[Attachment was removed and saved localy by SupportTeam]

Edited by gregsallee

Share this post


Link to post

No to sure why Vonage's DNIS information is not being picked up - the way in which Caller ID information is being retrieved should be the same.

 

Can you find out from Vonage any technical details on how their VoIP<->analog converter device sends the DNIS information? We'd need in particular info on what data packet type is sent which contains the DNIS, how is it encoded, and is it sent before or after the CallerID information.

Share this post


Link to post

I've asked. Still waiting for Vonage to answer the question. Is it possible that something was picking up the text string I entered in the TAPI configuration "phone number" field for the line, and passing it back as DNIS (i.e. assuming that the number receiving the call was the same one originally dialed)? I can't remember if I entered the full number or not, but that's the only other place I can think of that it might have been getting it from.

Share this post


Link to post

Sounds like that could be it - you can try reverting back to the TAPI version for a while and just experimenting with this setting and seeing if changing it affects the DNIS reported by the Dialogic card.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×