<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IVR World &#187; Dialogic Tip</title>
	<atom:link href="http://www.ivrsworld.com/category/dialogic-tip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ivrsworld.com</link>
	<description>IVR, Interactive Voice Response System, CTI Applications</description>
	<lastBuildDate>Fri, 10 Feb 2012 09:25:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to port your IVR C++ code from Dialogic Boards to Donjin Boards</title>
		<link>http://www.ivrsworld.com/dialogic-tip/how-to-port-your-ivr-c-code-from-dialogic-boards-to-donjin-boards/</link>
		<comments>http://www.ivrsworld.com/dialogic-tip/how-to-port-your-ivr-c-code-from-dialogic-boards-to-donjin-boards/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 10:12:25 +0000</pubDate>
		<dc:creator>Uttam Pegu</dc:creator>
				<category><![CDATA[Dialogic Tip]]></category>
		<category><![CDATA[Donjin]]></category>
		<category><![CDATA[analog]]></category>
		<category><![CDATA[C++ IV source code]]></category>
		<category><![CDATA[dialogic]]></category>
		<category><![CDATA[isdn]]></category>
		<category><![CDATA[IVR C++]]></category>
		<category><![CDATA[IVR source code]]></category>
		<category><![CDATA[Porting Dialogic to Donjin]]></category>
		<category><![CDATA[ss7]]></category>
		<category><![CDATA[Telephone Interface]]></category>
		<category><![CDATA[WAV files]]></category>

		<guid isPermaLink="false">http://www.ivrsworld.com/?p=1388</guid>
		<description><![CDATA[One of the advantages of using Donjin boards is easy portability of C++ codes written for Dialogic boards to Donjin boards! It should not take more than one hour for porting C++ codes from Dialogic boards to Donjin boards. Though, recently introduced KeyGoe series of products from Donjin has totally different API than of Dialogic, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>One of the advantages of using Donjin boards is easy portability of C++ codes written for Dialogic boards to Donjin boards! It should not take more than one hour for porting C++ codes from Dialogic boards to Donjin boards. Though, recently introduced KeyGoe series of products from Donjin has totally different API than of Dialogic, but its TDMA CTI boards like DN300, DN600 etc. uses &#8216;similar&#8217; API as that of Dialogic boards!<br />
<div id="attachment_1391" class="wp-caption aligncenter" style="width: 300px">
	<a href="http://www.ivrsworld.com/wp-content/uploads/2010/06/dialogic_logo.jpg"><img src="http://www.ivrsworld.com/wp-content/uploads/2010/06/dialogic_logo-300x79.jpg" alt="" title="dialogic_logo" width="300" height="79" class="size-medium wp-image-1391" /></a>
	<p class="wp-caption-text">Dialogic </p>
</div><br />
Donjin also uses Dialogic-like Device Configuration Manager which is easier to configure than Dialogic DCM. Though I think Donjin Device Configuration manager lack many features which Dialogic DCM provides. Like Dialogic, Donjin also provides &#8216;text&#8217; file based various configuration for telephone interface, caller ID etc. depending on the protocol. Donjin has more user friendly diagnostics tools that Dialogic.<br />
 <div id="attachment_1392" class="wp-caption alignright" style="width: 187px">
	<a href="http://www.ivrsworld.com/wp-content/uploads/2010/06/donjinlogo.jpg"><img src="http://www.ivrsworld.com/wp-content/uploads/2010/06/donjinlogo.jpg" alt="" title="Donjin Boards" width="187" height="48" class="size-full wp-image-1392" /></a>
	<p class="wp-caption-text">Donjin Boards support Dialogic API</p>
</div></p>
<p>Here is the step I used for porting Dialogic C++ codes to Donjin boards in less than an hour:-<br />
<span id="more-1388"></span><br />
<strong>1. Header files</strong><br />
   Donjin SDK DJNADK is freely down loadable from Donjin website. But it does not contain header files for its LIB files! So, in order to compile your C++ code for Donjin boards, you need to include header files from Dialogic SDK and include LIB files from Donjin. Normally, Dialogic SDK files are located in Program Files\Dialogic\inc while Donjin library files are located in DJNADK\Lib. So, one has to use the correct paths for Include files and then LIB files.<br />
  Normally, the below files are needed to be referenced for compiling C++ code for Dialogic Boards<br />
  a. libdtimt.lib<br />
  b. libdxxmt.lib<br />
  c. libgc.lib<br />
  d. sctools.lib<br />
  e. libfaxmt.lib<br />
  f. libsrlmt.lib.<br />
 which are found in Lib folder of Dialogic SDK.</p>
<p>And for Donjin boards, the following LIB files need to be referenced :-<br />
 a. DNDxxx.lib<br />
 b. DNGC.lib<br />
 c. DNFax.lib<br />
 d. DNSRL.lib<br />
 e. DNSCTOOLS.lib<br />
 These files are found in DJNADK\Lib folder.</p>
<p>  Once these references are made correctly, C++ code gets compiled for Donjin boards !</p>
<p><strong>2. Audio file</strong><br />
   Dialogic uses VOX files as well as WAV files for playing back audio files on its boards. While Dialogic supports 8 Bit Mono with 11KHz sampling rate, Donjin supports only 8 Bit Mono with 8KHz sampling rate. So, if your Dialogic code plays WAV files with sampling rate 11KHz, you must change all WAV files to 8KHz sampling rate. It could be a real time consuming job as each files needs to be changed one by one. I have not found any tool/software to change format of WAV files in bulk or all files in a directory yet.</p>
<p>So, once these two processes are complete, your IVR application written in C++ could work in Donjin boards! Many people now days prefer low cost Donjin boards to save initial investment for their On-Premise IVR solutions. The developers who have written Dialogic IVR Application in C++, they can easily port their codes to Donjin CTI boards.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ivrsworld.com/dialogic-tip/how-to-port-your-ivr-c-code-from-dialogic-boards-to-donjin-boards/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Detecting Caller ID on Dialogic D4/PCI Analog card</title>
		<link>http://www.ivrsworld.com/cti-cards/detecting-caller-id-on-dialogic-d4pci-analog-card/</link>
		<comments>http://www.ivrsworld.com/cti-cards/detecting-caller-id-on-dialogic-d4pci-analog-card/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 07:52:17 +0000</pubDate>
		<dc:creator>Uttam Pegu</dc:creator>
				<category><![CDATA[CTI cards]]></category>
		<category><![CDATA[Dialogic Tip]]></category>
		<category><![CDATA[caller id]]></category>
		<category><![CDATA[cti analog card]]></category>
		<category><![CDATA[d4/pci]]></category>
		<category><![CDATA[dalogic]]></category>
		<category><![CDATA[dialogic board]]></category>
		<category><![CDATA[dialogic cti]]></category>
		<category><![CDATA[digium analog cards]]></category>
		<category><![CDATA[Donjin]]></category>
		<category><![CDATA[DTMF]]></category>
		<category><![CDATA[ring cadence]]></category>
		<category><![CDATA[ringing]]></category>
		<category><![CDATA[ringing cadence]]></category>

		<guid isPermaLink="false">http://www.ivrsworld.com/?p=1215</guid>
		<description><![CDATA[I keep getting mails by various people about detecting caller id using D4PCI and Dialogic API. I remember I too had to try hard once and finally contacted Dialogic support for getting ideas how caller ID could be detected using D4/PCI analog CTI board from Dialogic. I think the same procedure should work for Donjin [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I keep getting mails by various people about detecting caller id using D4PCI and Dialogic API. I remember I too had to try hard once and finally contacted Dialogic support for getting ideas how caller ID could be detected using D4/PCI analog CTI board from Dialogic. I think the same procedure should work for Donjin Analog boards as well as any kind of Analog CTI boards, for that matter.</p>
<p><strong>So the steps for detecting Caller ID in D4PCI board is :</strong></p>
<p>1. As soon as you detect RINGING, <strong>do not connect or answer the call</strong>. But start detecting digit using appropriate API function. For example dx_getdig();</p>
<p>2. Important part is the settings in DV_TPT structure which is used in dx_getdig() function. Here is how I have been configuring:<br />
<span id="more-1215"></span>
<ul>
<li>End of DX_MAXDTMF should be configured to be length of expected Caller ID length. </li>
<li>DX_MAXTIME should be configured to be delay between two rings.</li>
<li>Since DTMF digits for Caller ID are sent together quickly by the <a href="http://www.pabx.in">PBX</a>, one may take advantage of the option DX_IDDTIME ( Inter-digit Pause).</li>
</ul>
<p>3. As soon as one comes out of from dx_getdig() function either because of DX_MAXDTMF,DX_MAXTIME or DX_IDDTIME, one should check if Caller ID is detected or not!</p>
<p>So these are the three simple steps for detecting Caller ID using D4PCI board. Here is the C++ code snippet:-</p>
<blockquote><p>DV_TPT tpt[4];</p>
<p>       // Allocate memory<br />
       memset( tpt, 0, (sizeof( DV_TPT ) * 3) );</p>
<p>	/* Terminate GetDigits on Receiving MAXDTMF Digits, Interdigit Pause and MAxrime */<br />
	tpt[ 0 ].tp_type   = IO_CONT;<br />
	tpt[ 0 ].tp_termno = DX_MAXDTMF;<br />
	//tpt[ 0 ].tp_length = MAXDTMF;<br />
	tpt[ 0 ].tp_length = digits;  // Number of digits of expected caller ID<br />
	tpt[ 0 ].tp_flags  = TF_MAXDTMF;</p>
<p>         // Terminate dx_getdig function after 3 second Interdigit pause<br />
	tpt[ 1 ].tp_type   = IO_CONT;<br />
	tpt[ 1 ].tp_termno = DX_IDDTIME;<br />
	tpt[ 1 ].tp_length = 30;   // Gap in betwwen digits<br />
	tpt[ 1 ].tp_flags  = TF_IDDTIME;</p>
<p>		/* Terminate GetDigits after 8 Seconds */<br />
	tpt[ 2 ].tp_type   = IO_EOT;<br />
	tpt[ 2 ].tp_termno = DX_MAXTIME;<br />
	tpt[ 2 ].tp_length = 80; // Maximum time<br />
	tpt[ 2 ].tp_flags  = TF_MAXTIME;</p>
<p>	if (dx_getdig( voiceh_handle, tpt, &#038;(dtbuf),(unsigned short)ASYNC ) == -1 )<br />
        {<br />
		printf(&#8220;getdtmfs return 0x%X\n&#8221;, ATDV_LASTERR(pline->voiceh));</p>
<p>	}</p></blockquote>
<p>So here are few facts I have realised:-</p>
<p>1. D4PCI board ( or any analog board in that matter ) may not detect caller ID all the time completely (all the digits) all the time. It has nothing to do with the Dialogic CTI board though. The reason can be explained as below :</p>
<p>     Normally, caller ID is presented in the form of <a href="http://en.wikipedia.org/wiki/Dual-tone_multi-frequency">DTMF</a> ( Dual Tone Multiple Frequency)  digits after the first ring and before the second ring.</p>
<p>      I have observed that, some times, analog board fails to detect the first ring and detects the ring from the second ring only. It this case, any CTI application would miss the caller ID completely. Some other times, the analog board (D4PCI or equivalent analog CTI boards) would detect the ring at the end of first ring cadence which may result in missing first few caller ID digits.</p>
<p>  So, detecting caller id perfectly using analog board may depend on PBX being used. If any one knows any better technique, it will be great to share here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ivrsworld.com/cti-cards/detecting-caller-id-on-dialogic-d4pci-analog-card/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Playing WAV File in Dialogic Boards</title>
		<link>http://www.ivrsworld.com/dialogic-tip/playing-wav-file-in-dialogic-boards/</link>
		<comments>http://www.ivrsworld.com/dialogic-tip/playing-wav-file-in-dialogic-boards/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 08:33:25 +0000</pubDate>
		<dc:creator>Uttam Pegu</dc:creator>
				<category><![CDATA[Dialogic Tip]]></category>
		<category><![CDATA[audio file]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[dialogic api]]></category>
		<category><![CDATA[DTMF]]></category>
		<category><![CDATA[DV_TPT]]></category>
		<category><![CDATA[DX_IOTT]]></category>
		<category><![CDATA[dx_play]]></category>
		<category><![CDATA[dx_playiottdata]]></category>
		<category><![CDATA[VOX]]></category>
		<category><![CDATA[WAV file]]></category>

		<guid isPermaLink="false">http://www.ivrsworld.com/?p=278</guid>
		<description><![CDATA[Dialogic boards can play VOX files as well as WAV files. While many people use dx_playwav() function of Dialogic API to play WAV files, dx_playiottdata() function can also be used to play WAV files as shown in the code snippet below. While the most famous dialogic sample demo application does not play any audio file, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Dialogic boards can play VOX files as well as WAV files. While many people use dx_playwav() function of <strong>Dialogic API</strong> to play WAV files, dx_playiottdata() function can also be used to play WAV files as shown in the code snippet below.</p>
<p>While the most famous dialogic sample demo application does not play any audio file, found in C:\Program Files\Dialogic\demos\gc_basic_call_model ( by default), gc_basic_call_model.c is the should be the first sample program for anyone willing to develop IVR Software of IVRS Applications using Dialogic Boards.</p>
<p>Using WAV file in <strong>IVRS Software</strong> has advantage. There are many WAV file editors, some free and some licensed available to make WAV files easily. Use of many TTS engines too becomes much easier if WAV file is used for playback of voice prompts. But VOX file does not have necessarily any disadvantage! It can be just a personal choice.<br />
<span id="more-278"></span><br />
While searching internet, I tried to find some sample code snippet for playing WAV files using dx_playiottdata(), and I could not find one. So I thought I myself should put up a sample code snippet which might be useful to some beginners.</p>
<p><strong>Here is the code snippet: </strong></p>
<p>int play(char *filename)<br />
{<br />
	int retStatus = -1; // Unknown Error</p>
<p>	int handle;<br />
	char filepath[1000];</p>
<p>	strcat(filepath,filename);</p>
<p>	if ( ( handle= dx_fileopen( filepath, O_RDONLY|O_BINARY, 0666) ) == -1 )<br />
	   {<br />
	     // Errore handling here<br />
	   }</p>
<p>	/* rewind to top of file */<br />
	lseek(handle,0L,0);</p>
<p>	/*<br />
	    * Clear and Set-Up the IOTT strcuture<br />
	    */<br />
	memset( iott, 0, sizeof( DX_IOTT ) );</p>
<p>	iott[ 0 ].io_type    = IO_DEV | IO_EOT;<br />
	iott[ 0 ].io_fhandle = handle;<br />
	iott[ 0 ].io_length  = -1;</p>
<p>	/*<br />
	    * Clear and then Set the DV_TPT structures<br />
	    */<br />
	memset( tpt, 0, sizeof( DV_TPT ) );</p>
<p>	/* Terminate Play on Receiving any DTMF tone */<br />
	tpt[ 0 ].tp_type   = IO_CONT;<br />
	tpt[ 0 ].tp_termno = DX_MAXDTMF;<br />
	tpt[ 0 ].tp_length = 1;<br />
	tpt[ 0 ].tp_flags  = TF_MAXDTMF;</p>
<p>	if(dx_playiottdata(voiceh,iott,tpt,&#038;xpbWavTbl[0],EV_ASYNC)==-1)<br />
	{<br />
		// Error Handling<br />
                retStatus = 1;<br />
	}<br />
	else<br />
	{<br />
		// Playy successfully<br />
                retStatus = 0;<br />
	}</p>
<p>	return retStatus;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ivrsworld.com/dialogic-tip/playing-wav-file-in-dialogic-boards/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

