<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>VoIPSolu: Telecommunications</title>
	<atom:link href="http://voipsolu.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://voipsolu.wordpress.com</link>
	<description>Call Center Solutions</description>
	<lastBuildDate>Sun, 11 Oct 2009 00:18:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='voipsolu.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>VoIPSolu: Telecommunications</title>
		<link>http://voipsolu.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://voipsolu.wordpress.com/osd.xml" title="VoIPSolu: Telecommunications" />
	<atom:link rel='hub' href='http://voipsolu.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Let&#8217;s design an IVR &#8211; Part 1</title>
		<link>http://voipsolu.wordpress.com/2009/10/09/design_ivr_part_1/</link>
		<comments>http://voipsolu.wordpress.com/2009/10/09/design_ivr_part_1/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 09:17:27 +0000</pubDate>
		<dc:creator>voipsolu</dc:creator>
				<category><![CDATA[Asterisk]]></category>

		<guid isPermaLink="false">http://voipsolu.wordpress.com/?p=4</guid>
		<description><![CDATA[Let’s have scenario here, then we will design an IVR according to the same. Suppose I am given a task to design and implement an IVR for my company. So that if anyone will call to my company’s number, he/she will listen a greeting “Welcome to &#60;company-name&#62;” then he/she will hear options to reach the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=voipsolu.wordpress.com&amp;blog=9772800&amp;post=4&amp;subd=voipsolu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Let’s have scenario here, then we will design an IVR according to the same.</p>
<p>Suppose I am given a task to design and implement an IVR for my company. So that if anyone will call to my company’s number, he/she will listen a greeting “Welcome to &lt;company-name&gt;” then he/she will hear options to reach the required department, like “To speak to our HR representative press 1 now”, “To speak to our Sales representative press 2 now”, “For accounts related queries press 3 now”, “To speak in our Administration Department press 4 now”, “For IT help desk press 5 now”, “To speak to our Operator press now 9 now ”, “To repeat these options press 0 now&#8221;.</p>
<p>To achieve the above mentioned scenario we need to type below code in our extensions.conf</p>
<p><strong><span style="color:#339966;">[ivr]                                                    ;Main Context</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,1,Answer()</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,Wait(1)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,Playback(greeting-company-name)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,Read(option-press|options- company-name|1|skip|3)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,GotoIf($[${option-press} = 1]?option-press-1,s,1:6)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,GotoIf($[${option-press} = 2]?option-press-2,s,1:7)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,GotoIf($[${option-press} = 3]?option-press-3,s,1:8)       </span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,GotoIf($[${option-press} = 4]?option-press-4,s,1:9)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,GotoIf($[${option-press} = 5]?option-press-5,s,1:10)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,GotoIf($[${option-press} = 9]?option-press-9,s,1:11)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,GotoIf($[${option-press} = 0]?4:12)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; _X.,n,Hangup()</span></strong></p>
<p><strong><span style="color:#339966;">[option-press-1]                              ; Sub Context 1</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,1,Dial(SIP/hr|60)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,n,Hangup()</span></strong></p>
<p><strong><span style="color:#339966;">[option-press-2]                              ; Sub Context 2</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,1,Dial(SIP/sales|60)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,n,Hangup()</span></strong></p>
<p><strong><span style="color:#339966;">[option-press-3]                              ; Sub Context 3</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,1,Dial(SIP/accounts|60)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,n,Hangup()</span></strong></p>
<p><strong><span style="color:#339966;">[option-press-4]                              ; Sub Context 4</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,1,Dial(SIP/admin|60)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,n,Hangup()</span></strong></p>
<p><strong><span style="color:#339966;">[option-press-5]                              ; Sub Context 5</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,1,Dial(SIP/it|60)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,n,Hangup()</span></strong></p>
<p><strong><span style="color:#339966;"> </span></strong></p>
<p><strong><span style="color:#339966;">[option-press-9]                              ; Sub Context 6</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,1,Dial(SIP/operator|60)</span></strong></p>
<p><strong><span style="color:#339966;">exten =&gt; s,n,Hangup()</span></strong></p>
<p><strong><span style="color:#ff6600;">Description of above code:</span></strong></p>
<p>First we have to define a context name within square brackets before writing script for extensions. For example, here we are using main context “<strong>[ivr]</strong>” and 6 sub contexts. So, let’s talk about main context first.</p>
<p><strong><span style="color:#ffff00;">Priority 1:</span></strong> Application <strong><span style="text-decoration:underline;"><span style="color:#0000ff;">Answer</span></span></strong> is used to answer the channel if a call is placed on it.</p>
<p><strong><span style="color:#ffff00;">Priority 2:</span></strong> Application <strong><span style="text-decoration:underline;"><span style="color:#0000ff;">Wait</span></span></strong> is used to let channel the wait for definite period of time before something else to be executed. Here we are using wait time equal to 1 second. This is optional here but it is good to use because sometimes when anyone calls from his/her VoIP device then he/she is not able to hear complete greeting due to delay.</p>
<p><strong><span style="color:#ffff00;">Priority 3:</span></strong><strong> </strong>Application <strong><span style="text-decoration:underline;"><span style="color:#0000ff;">Playback</span></span></strong> is used to play a sound file. Here “<strong>greeting-company-name</strong>” is the name of the sound file placed in <strong>/var/lib/asterisk/sounds/</strong> directory. This sound file will play a greeting message as per the above scenario.</p>
<p><strong><span style="color:#ffff00;">Priority 4:</span></strong> Here Application <strong><span style="text-decoration:underline;"><span style="color:#0000ff;">Read</span></span></strong> is used to play to sound file “<strong>options- company-name</strong>” and stores the option pressed by the user in a variable <strong>option-press</strong>. At the third place we are using <strong>1</strong> that informs asterisk to store only one pressed digit in the variable. By specifying <strong>skip</strong>, the application will not move further if the channel is not available and at last <strong>3</strong> indicates that if user doesn’t enter anything for 10 seconds then the sound file will play till the number of times specified.</p>
<p><strong><span style="color:#ffff00;">Priority 5,6,7,8,9,10,11:</span></strong> Application <strong><span style="text-decoration:underline;"><span style="color:#0000ff;">GotoIf</span></span></strong> is a conditional application used to check the option pressed by user and if it is true then the channel will be directed to the specified context and if it is false then it will hangup the channel.</p>
<p><strong><span style="color:#ffff00;">Priority 12:</span></strong> Application <strong><span style="text-decoration:underline;"><span style="color:#0000ff;">Hangup</span></span></strong> is used to disconnect the line.</p>
<p><strong><span style="color:#ff6600;">Let’s discuss the sub contexts code:</span></strong></p>
<p>All the sub contexts have almost same code.</p>
<p><strong><span style="color:#ffff00;">Priority 1:</span></strong> Application <strong><span style="text-decoration:underline;"><span style="color:#0000ff;">Dial</span></span></strong> is used to place calls on a channel using desired technology (SIP, IAX, MGCP, ZAP, and DADHI). Here we are using SIP as technology to send the call to the specified extension, like hr, it, accounts etc.</p>
<p><strong><span style="color:#ffff00;">Priority 2:</span></strong> Application <strong><span style="text-decoration:underline;"><span style="color:#0000ff;">Hangup</span></span></strong> is used to disconnect the line.</p>
<p> </p>
<p>Note: In the next part I&#8217;ll make this IVR more efficient. Please provide your comments and suggestions so that I can keep improving my posts.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/voipsolu.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/voipsolu.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/voipsolu.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/voipsolu.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/voipsolu.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/voipsolu.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/voipsolu.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/voipsolu.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/voipsolu.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/voipsolu.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/voipsolu.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/voipsolu.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/voipsolu.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/voipsolu.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=voipsolu.wordpress.com&amp;blog=9772800&amp;post=4&amp;subd=voipsolu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://voipsolu.wordpress.com/2009/10/09/design_ivr_part_1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14f339e2067785920492862f7720d01c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">voipsolu</media:title>
		</media:content>
	</item>
	</channel>
</rss>
