{"id":127,"date":"2016-06-03T18:39:10","date_gmt":"2016-06-03T18:39:10","guid":{"rendered":"http:\/\/symbioticindia.in\/docu\/?p=127"},"modified":"2016-06-03T18:39:10","modified_gmt":"2016-06-03T18:39:10","slug":"vicidial-or-goautodial-dialplan-entry-tutorial","status":"publish","type":"post","link":"http:\/\/symbioticindia.in\/docu\/2016\/06\/03\/vicidial-or-goautodial-dialplan-entry-tutorial\/","title":{"rendered":"vicidial or goautodial dialplan entry tutorial"},"content":{"rendered":"<h1>Asterisk \/ Vicidial \/goautodial dialplan guide<\/h1>\n<p>The Following Tutorial will help you how to write a dialplan in asterisk \/ vicidial \/ goautodial for making Outbound calls via the trunk configured<\/p>\n<p><em><u><strong>DIALPLAN<\/strong><\/u><\/em><\/p>\n<p>&nbsp;<\/p>\n<p>The dialplan defines how Asterisk handles inbound and outbound calls. It is specified in the configuration file named \u00a0extensions.conf.\u00a0The extensions.conf file usually resides in the \/etc\/asterisk\/ directory<\/p>\n<p>But in vicidial \/ goautodial \u00a0we will defining the dialplan in dialplan entry field under Carrier settings.<\/p>\n<p>&nbsp;<\/p>\n<p><strong><em><u>The Dialplan Syntax<\/u><\/em><\/strong><\/p>\n<p>The \u00a0Syntax for the Asterisk dialplan is<\/p>\n<p>exten =&gt; name,priority,application<\/p>\n<p>name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&#8211; \u00a0the name or number of the extension ie: 123 ,abcd, or pattern matching<\/p>\n<p>Priority \u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0&#8211; The priority (each extension can include multiple steps; the step number is called \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 the &#8220;priority&#8221;) ie \u00a0 1, 2, 3<\/p>\n<p>Application\u00a0 \u00a0&#8211; The application (or command) that performs some action on the call<\/p>\n<p><em>Example dialplan for understanding<\/em><\/p>\n<p><strong><u>example 1<\/u><\/strong><\/p>\n<p>exten =&gt; 123,1,Answer<\/p>\n<p>In this example the name is 123 , priority is 1 and Application is Answer<\/p>\n<p><strong><u>example 2<\/u><\/strong><\/p>\n<p>exten =&gt; 123,1,Answer<\/p>\n<p>exten =&gt; 123,2,Hangup<\/p>\n<p>Is this example the name is 123, and priorities 1 followed 2 , \u00a0Applications \u00a0Answer followed by Hangup which is the second priority.<\/p>\n<p><em><strong>Dialplan Pattern Matching<\/strong><\/em><\/p>\n<p>Before getting into the advance dialplan we need to understand the pattern matching<\/p>\n<p>Pattern Matching tells asterisk that we are matching on a pattern and not\u00a0 a explicit number<\/p>\n<p>The dialplan syntax with pattern matching is<\/p>\n<p>exten =&gt; _XZN,priority,Application<\/p>\n<p>below are the Patterns options value<\/p>\n<p>X Matches any single digit from 0 to 9<\/p>\n<p>Z Matches any single digit from 1 to 9<\/p>\n<p>N Matches any single digit from 2 to 9<\/p>\n<p>[147-9] Matches a single digit from the range of digits specified. In this case, the pattern matches a single 1, 4, 7 8 or 9<\/p>\n<p>. (period) Wildcard match; matches one or more characters, no matter what they are. If you&#8217;re not careful, wildcard matches can make your dialplans do things you&#8217;re not expecting (like matching built-in extensions such as\u00a0i\u00a0or\u00a0h). You should use the wildcard match in a pattern only after you&#8217;ve matched as many other digits as possible. For example, the following pattern match should probably never be used: _. In fact, Asterisk will warn you if you try to use it. Instead, use this one, if at all possible: _X.<\/p>\n<p>! (bang) Wildcard match; matches zero or more characters, no matter what they are.<\/p>\n<p><strong><em>Some example dialplan with pattern matching<\/em><\/strong><\/p>\n<p><strong>example 1:<\/strong><\/p>\n<p>if you want to dial \u00a0US no \u00a0ie starting with code 1 and followed by 10 digits<\/p>\n<p>exten =&gt; _1XXXXXXXXXX,1,Answer<\/p>\n<p><strong>example 2:<\/strong><\/p>\n<p>Dialling UK no ie code 44 followed by 10 digit<\/p>\n<p>exten =&gt; _44XXXXXXXXXX,1,Answer<\/p>\n<p><strong>example 3;<\/strong><\/p>\n<p>US no 7 digits followed by 1<\/p>\n<p>exten =&gt; _1XXXXXXX,1,Answer<\/p>\n<p><strong>example 4:<\/strong><\/p>\n<p>first digits should be 1,2,4 and 9 rest 10 digits many any no<\/p>\n<p>exten =&gt; _[1249]XXXXXXXXXX,1,Answer()<\/p>\n<p><strong>example 5:<\/strong><\/p>\n<p>if you are not sure about digits you can use period . \u00a0ie(dot)<\/p>\n<p>exten =&gt; _1X.,1,Answer()<\/p>\n<p>this dialplan accept any number followed by 1 ie above 2 digit<\/p>\n<p><strong><em>Vairables.<\/em><\/strong><\/p>\n<p>As of this tutorial we are not going deep into variable, only we will consider ${EXTEN} Variable<\/p>\n<p>For more detail about the variable check this <a href=\"https:\/\/wiki.asterisk.org\/wiki\/display\/AST\/Asterisk+Standard+Channel+Variables\">link<\/a><\/p>\n<p>A variable is just predefined value set by a program and defined as\u00a0 ${somename}<\/p>\n<p>He we are going use\u00a0 ${EXTEN}\u00a0 which is nothing but the number which we dial<\/p>\n<p>For eg if we dial 1234567890 in above example dialplan the value of ${EXTEN} IS 1234567890<\/p>\n<p><strong><em>VICIDIAL OR Goautodial dialplan<\/em><\/strong><\/p>\n<p><em><u>For sip trunks<\/u><\/em><\/p>\n<p>exten =&gt; _1XXXXXXXXXX,1,AGI(agi:\/\/127.0.0.1:4577\/call_log)<\/p>\n<p>exten =&gt; _1XXXXXXXXXX,2,Dial(SIP\/siptrunkname\/${EXTEN},,tTo)<\/p>\n<p>exten =&gt; _1XXXXXXXXXX,3,Hangup()<\/p>\n<p><em><u>For PSTN(PRI\/E1\/T1\/FXO) trunks<\/u><\/em><\/p>\n<p>exten =&gt; _1XXXXXXXXXX,1,AGI(agi:\/\/127.0.0.1:4577\/call_log)<\/p>\n<p>exten =&gt; _1XXXXXXXXXX,2,Dial(DAHDI\/G0\/${EXTEN},,tTo)<\/p>\n<p>xten =&gt; _1XXXXXXXXXX,3,Hangup()<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Asterisk \/ Vicidial \/goautodial dialplan guide The Following Tutorial will help you how to write a dialplan in asterisk \/ vicidial \/ goautodial for making Outbound calls via the trunk configured DIALPLAN &nbsp; The dialplan defines how Asterisk handles inbound and outbound calls. It is specified in the configuration file named \u00a0extensions.conf.\u00a0The extensions.conf file usually ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"http:\/\/symbioticindia.in\/docu\/2016\/06\/03\/vicidial-or-goautodial-dialplan-entry-tutorial\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,23],"tags":[],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-asterisk","category-vicidial"],"_links":{"self":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":1,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"predecessor-version":[{"id":128,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/127\/revisions\/128"}],"wp:attachment":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}