{"id":89,"date":"2016-06-01T07:31:03","date_gmt":"2016-06-01T07:31:03","guid":{"rendered":"http:\/\/symbioticindia.in\/docu\/?p=89"},"modified":"2016-06-01T12:03:19","modified_gmt":"2016-06-01T12:03:19","slug":"sample-code-for-asterisk-dailplan","status":"publish","type":"post","link":"http:\/\/symbioticindia.in\/docu\/2016\/06\/01\/sample-code-for-asterisk-dailplan\/","title":{"rendered":"Sample Code for asterisk Dailplan"},"content":{"rendered":"<p>;This context is used to handle all outbound calls.<br \/>\n[test-outbound]<\/p>\n<p>exten =&gt; 56782,1,Answer()<br \/>\nexten =&gt; 56782,n,Playback(hello-world)<br \/>\nexten =&gt; 56782,n,Goto(outbound-allroutes,${EXTEN},1)<\/p>\n<p>;This context is used to handle all inbound calls.<br \/>\n[test-inbound]<\/p>\n<p>exten =&gt; 56782,1,Answer()<br \/>\nexten =&gt; 56782,n,Playback(hello-world)<br \/>\nexten =&gt; 56782,n,Goto(ext-did,${EXTEN},1)<\/p>\n<p>&nbsp;<\/p>\n<p>============== IVR Script =====================<\/p>\n<p>&nbsp;<\/p>\n<p>;This context is used to handle all outbound calls.<br \/>\n[test-outbound]<\/p>\n<p>exten =&gt; _.,1,GotoIfTime(9:00-17:00,Mon-Fri,*,*?lbl_vdp-outbound_0)<br \/>\nexten =&gt; _.,n,Goto(self-service-ivr,s,1)<br \/>\nexten =&gt; _.,n(lbl_vdp-outbound_0),Goto(ext-did,${EXTEN},1)<\/p>\n<p>;This context is used to handle all inbound calls.<br \/>\n[test-inbound]<\/p>\n<p>exten =&gt; _.,1,GotoIfTime(9:00-17:00,Mon-Fri,*,*?lbl_vdp-inbound_0)<br \/>\nexten =&gt; _.,n,Goto(self-service-ivr,s,1)<br \/>\nexten =&gt; _.,n(lbl_vdp-inbound_0),Goto(ext-did,${EXTEN},1)<\/p>\n<p>;IVR playyed to the callers after the business hours<br \/>\n[self-service-ivr]<\/p>\n<p>exten =&gt; s,1(lbl_self-service-ivr_0),Set(TIMEOUT(response)=5)<br \/>\nexten =&gt; s,n,Set(TIMEOUT(digit)=2)<br \/>\nexten =&gt; s,n,Background(self-service-menu,m)<br \/>\nexten =&gt; s,n,WaitExten(7)<br \/>\nexten =&gt; s,n,Hangup()<br \/>\nexten =&gt; 1,1,Playback(latest_news)<br \/>\nexten =&gt; 1,n,GotoIf($[&#8220;${PLAYBACKSTATUS}&#8221; = &#8220;SUCCESS&#8221;]?:lbl_self-service-ivr_1)<br \/>\nexten =&gt; 1,n(lbl_self-service-ivr_1),Hangup()<br \/>\nexten =&gt; 0,1,Playback(working_time)<br \/>\nexten =&gt; 0,n,GotoIf($[&#8220;${PLAYBACKSTATUS}&#8221; = &#8220;SUCCESS&#8221;]?:lbl_self-service-ivr_2)<br \/>\nexten =&gt; 0,n(lbl_self-service-ivr_2),Hangup()<br \/>\nexten =&gt; i,1,Goto(s,lbl_self-service-ivr_0)<br \/>\nexten =&gt; t,1,Goto(s,lbl_self-service-ivr_0)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>;This context is used to handle all outbound calls. [test-outbound] exten =&gt; 56782,1,Answer() exten =&gt; 56782,n,Playback(hello-world) exten =&gt; 56782,n,Goto(outbound-allroutes,${EXTEN},1) ;This context is used to handle all inbound calls. [test-inbound] exten =&gt; 56782,1,Answer() exten =&gt; 56782,n,Playback(hello-world) exten =&gt; 56782,n,Goto(ext-did,${EXTEN},1) &nbsp; ============== IVR Script ===================== &nbsp; ;This context is used to handle all outbound calls. [test-outbound] exten ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"http:\/\/symbioticindia.in\/docu\/2016\/06\/01\/sample-code-for-asterisk-dailplan\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-asterisk"],"_links":{"self":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/89","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\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":3,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":92,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/89\/revisions\/92"}],"wp:attachment":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}