{"id":3130,"date":"2014-04-11T17:07:37","date_gmt":"2014-04-11T08:07:37","guid":{"rendered":"http:\/\/pchero21.com\/?p=3130"},"modified":"2014-04-11T17:07:37","modified_gmt":"2014-04-11T08:07:37","slug":"asterisk-advanced-dialplan","status":"publish","type":"post","link":"http:\/\/pchero21.com\/?p=3130","title":{"rendered":"[Asterisk] Advanced Dialplan"},"content":{"rendered":"<p><strong>Basic Expressions<\/strong><\/p>\n<p>Asterisk \uc5d0\uc11c \ubaa8\ub4e0 \ud45c\ud604\uc2dd(\uc218\uc2dd)\uc740 <strong>$ [ ] <\/strong>\ub85c<strong> <\/strong>\ud45c\uc2dc\ub41c\ub2e4.<\/p>\n<blockquote><p>$[expression]<\/p><\/blockquote>\n<p>\uadf8\ub9ac\uace0 \ub2e4\uc74c\uacfc \uac19\uc774 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4.<\/p>\n<blockquote><p>$[${COUNT} + 1]$[${COUNT} \/ 2]<\/p><\/blockquote>\n<p>Asterisk Dialplan \ub0b4\uc5d0\uc11c \ud45c\ud604\uc2dd\uc774 \uc788\ub2e4\uba74 \ud574\ub2f9 \uad6c\ubb38\uc740 \uba3c\uc800 \ubaa8\ub4e0 \ud45c\ud604\uc2dd\uc774 \uacc4\uc0b0\ub41c \uc774\ud6c4\uc5d0 \uc9c4\ud589\ub41c\ub2e4.<br \/>\n\ub2e4\uc74c\uc758 \uc608\uc81c\ub97c \uc0dd\uac01\ud574\ubcf4\uc790.<\/p>\n<pre class=\"brush:shell\">exten =&gt; 204,1,Noop()\n        same =&gt; n,Answer()\n        same =&gt; n,Set(COUNT=3)\n        same =&gt; n,Set(NEWCOUNT=$[${COUNT} + 1])\n        same =&gt; n,SayNumber(${NEWCOUNT})<\/pre>\n<p>2\ubc88\uc9f8 priority \uc5d0\uc11c COUNT \ubcc0\uc218\uc5d0 3\uc744 \uc785\ub825\ud588\ub2e4.<br \/>\n\uadf8\ub9ac\uace0 3\ubc88\uc9f8 priority \uc5d0\uc11c \ud558\ub098\uc758 Set appilication \ub9cc\uc774 \uc0ac\uc6a9\ub410\ub294\ub370, \uc0ac\uc2e4\uc740 3\uac00\uc9c0 \uc77c\uc774 \ubc8c\uc5b4\uc84c\ub2e4.<\/p>\n<blockquote><p>1. ${COUNT} \ub97c 3\uc73c\ub85c \ub300\uce58\ud55c\ub2e4. \uc989, \ud45c\ud604\uc2dd\uc740 \ub2e4\uc74c\uacfc \uac19\uc774 \ubcc0\uacbd\ub41c\ub2e4.<br \/>\nsame =&gt; n,Set(NEWCOUNT=$[3 + 1])<\/p>\n<p>2. \ud45c\ud604\uc2dd\uc744 \uacc4\uc0b0\ud55c\ub2e4. \uc989, 3\uacfc 1\uc744 \ub354\ud55c\ub2e4. \uacb0\uacfc\uac12 4\uac00 \ub098\uc628\ub2e4.<br \/>\nsame =&gt; n,Set(NEWCOUNT=4)<\/p>\n<p>3. Set() Application\uc774 NEWCOUNT \uc5d0 4\ub97c \uc785\ub825\ud55c\ub2e4.<\/p><\/blockquote>\n<p>Operators<\/p>\n<p>Boolean operators<\/p>\n<p>expr1 | expr2<br \/>\nor \uc5f0\uc0b0\uc790. expr1 \ud639\uc740 expr2 \ub458 \uc911 \ud558\ub098\ub77c\ub3c4 \ucc38\uc774\ub77c\uba74 \ucc38.<\/p>\n<p>expr1 &amp; expr2<br \/>\nand \uc5f0\uc0b0\uc790. expr1 \ud639\uc740 expr2 \ub458 \uc911 \ud558\ub098\ub77c\ub3c4 \uac70\uc9d3\uc774\uba74 \uac70\uc9d3.<\/p>\n<p>expr1 {=, &gt;, &gt;=, &lt;, &lt;=, !=} expr2\ube44\uad50 \uc5f0\uc0b0\uc790. expr1, expr2 \uac01 \uc22b\uc790\ub77c\uba74 \uc22b\uc790 \ube44\uad50\ub97c \ud558\uace0, \uc544\ub2c8\ub77c\uba74 \ubb38\uc790\uc5f4 \ube44\uad50\ub97c \ud55c\ub2e4.<\/p>\n<p>Mathematical operators<\/p>\n<p>expr1 {+, -} expr2<br \/>\n\ub354\ud558\uae30, \ube7c\uae30.<\/p>\n<p>expr1 {*, \/, %} expr2<br \/>\n\uacf1\ud558\uae30, \ub098\ub204\uae30, \ub098\uba38\uc9c0.<\/p>\n<p>Regular expression operators<\/p>\n<p>expr1 : expr2<br \/>\n\uc815\uaddc \ud45c\ud604\uc2dd \ub0b4\uc6a9 \ucc38\uc870.<\/p>\n<p>expr1 =~ expr2<br \/>\n\uc815\uaddc \ud45c\ud604\uc2dd \ub0b4\uc6a9 \ucc38\uc870.<\/p>\n<p>String<br \/>\nexten =&gt; 234,1,Set(NEWTEST=blah${TEST})<\/p>\n<p><strong>Dialplan Functions<\/strong><\/p>\n<p>Dialplan Function \ub4e4\uc740 \ub9ce\uc740 \uae30\ub2a5\ub4e4\uc744 \uac00\uc9c0\uace0 \uc788\ub2e4. \ubb38\uc790\uc5f4 \uae38\uc774 \uacc4\uc0b0, \uc2dc\uac04 \ubc0f \ub0a0\uc9dc \uacc4\uc0b0, MD5 \uccb4\ud06c\uc12c \uc624\ub958 \ud655\uc778 \ub4f1\ub4f1\uc758 \uae30\ub2a5\uc744 \uc81c\uacf5\ud55c\ub2e4.<\/p>\n<p><strong>Syntax<\/strong><\/p>\n<p>Dialplan Function \uc740 \ub2e4\uc74c\uacfc \uac19\uc740 \uae30\ubcf8 Syntax \uad6c\uc870\ub97c \uac00\uc9c4\ub2e4.<\/p>\n<blockquote><p>FUNCTION_NAME(argument)<\/p><\/blockquote>\n<p>\uadf8\ub9ac\uace0 \ub2e4\uc74c\uacfc \uac19\uc774 Function \uc790\uccb4\uac00 \ub2e4\ub978 Function \uc758 Argument \ub85c \uc0ac\uc6a9\ub418\ub294 \uac83\ub3c4 \uac00\ub2a5\ud558\ub2e4.<\/p>\n<blockquote><p>${FUNCTION_NAME(${FUNCTION_NAME(argument)})}<\/p><\/blockquote>\n<p><strong>Conditional Branching<\/strong><\/p>\n<p>Asterisk \uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \ud568\uc218\ub4e4\uc744 \uc774\uc6a9\ud558\uba74 \uc5ec\ub7ec\uac00\uc9c0 \uc870\uac74\uc5d0 \ub530\ub77c \ubd84\uae30\ub97c \uc0dd\uc131\ud560 \uc218 \uc788\ub2e4. \uc774\ub97c Conditional Branching \uc774\ub77c\uace0 \ud55c\ub2e4.<\/p>\n<p>The GotoIf() Application<\/p>\n<p>Conditional Branching \uc758 \ud575\uc2ec\uc740 GotoIf() Application \uc774\ub2e4. GotoIf() Application \uc740 \uc785\ub825\ub41c \uc870\uac74 \uc2dd\uc758 \ucc38\/\uac70\uc9d3 \uc5ec\ubd80\uc5d0 \ub530\ub77c \ud574\ub2f9 \ucf5c\uc744 \ub2e4\ub978 \uacf3\uc73c\ub85c \ubd84\ubc30\uc2dc\ud0a4\ub294 \uc5ed\ud560\uc744 \ud55c\ub2e4.<\/p>\n<blockquote><p>GotoIf(expression?destination1:destination2)<\/p><\/blockquote>\n<p>\ub9cc\uc57d expression \uc774 \ucc38\uc774\uba74 destination1\ub85c, \uac70\uc9d3\uc774\uba74 destination2 \ub85c \ud574\ub2f9 \ucf5c\uc744 \ub118\uaca8\uc900\ub2e4. \uadf8\ub807\ub2e4\uba74 \ubb34\uc5c7\uc774 \ucc38\uc774\uace0 \uac70\uc9d3\uc77c\uae4c? \ud45c\ud604\uc2dd\uc758 \uacb0\uacfc\uac12\uc774 \uacf5\ubc31 String \uc774\uac70\ub098 0\uc774\uba74 \uac70\uc9d3\uc774\uace0 \uadf8 \uc678\uc758 \uac83\ub4e4\uc740 \ubaa8\ub450 \ucc38\uc73c\ub85c \ud310\ubcc4\ud55c\ub2e4.<br \/>\ndestination \uc740 \ub2e4\uc74c\uc911 \ud55c\uac00\uc9c0\ub85c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4.<\/p>\n<blockquote><p>&#8211; weasels \uc640 \uac19\uc774\u00a0 \ub3d9\uc77c\ud55c extension \ub0b4\uc758 priority label- 123,wesels \uc640 \uac19\uc774 \ub3d9\uc77c\ud55c context \ub0b4\uc758 \ub2e4\ub978 extension \uacfc priority label<br \/>\n&#8211; incoming,123,weasels \uc640 \uac19\uc774 \ub2e4\ub978 context, \ub2e4\ub978 extension, \ub2e4\ub978 priority label<\/p><\/blockquote>\n<p>\uc785\ub825\ub418\ub294 destination \uc911 \ud558\ub098\ub294 \uc0dd\ub7b5\uc774 \uac00\ub2a5\ud558\ub2e4. \uc989, \ud558\ub098\uc758 destination \ub9cc \uc785\ub825\uc744 \ud574\ub3c4 \uad1c\ucc2e\ub2e4\ub294 \ub73b\uc774\ub2e4. \ud558\uc9c0\ub9cc \uc774\ub294 \uc5ed\uc73c\ub85c \ubc18\ub4dc\uc2dc \ud558\ub098\ub294 \uc785\ub825\ud574\uc57c \ub41c\ub2e4\ub294 \ub73b\uc774\ub2e4. \uc785\ub825\ub418\uc9c0 \uc54a\uc740 destination \uc758 \uacbd\uc6b0, \uadf8\ub0e5 \ub2e4\uc74c priority \uad6c\ubb38\uc744 \uc9c4\ud589\ud55c\ub2e4.<\/p>\n<pre class=\"brush:shell\">exten =&gt; 207,1,NoOp()\n        same =&gt; n,Set(TEST=1)\n        same =&gt; n,GotoIf($[${TEST} = 1]?weasels:iguanas)\n        same =&gt; n(weasels),Playback(weasels-eaten-phonesys)\n        same =&gt; n,Hangup()\n        same =&gt; n(iguanas),Playback(office-iguanas)\n        same =&gt; n,Hangup()<\/pre>\n<p>\uae30\ub2a5\uc740 \uc815\uc0c1\uc801\uc73c\ub85c \uc791\ub3d9\ud558\uc9c0\ub9cc \ubb54\uac00 \uc54c\uc544\ubcf4\uae30 \ud798\ub4e4\ub2e4. \ub2e4\uc74c\uacfc \uac19\uc774 \uc791\uc131\ud574\ubcf4\uc790.<\/p>\n<pre class=\"brush:shell\">exten =&gt; 208,1,NoOp()\n        same =&gt; n,Answer()\n        same =&gt; n,Set(TEST=1)\n        same =&gt; n,GotoIf($[${TEST} = 1]?weasels,1:iguanas,1)    ; now we're going to extension,priority\nexten =&gt; weasels,1,NoOp()\n        same =&gt; n,Playback(weasels-eaten-phonesys)      ; this is NOT a label. It is different extension\n        same =&gt; n,Hangup()\nexten =&gt; iguanas,1,NoOp()\n        same =&gt; n,Playback(office-iguanas)\n        same =&gt; n,Hangup()<\/pre>\n<p>\ub2e4\uc74c\uc740 10\ubd80\ud130 0\uae4c\uc9c0 \uce74\uc6b4\ud2b8 \ub2e4\uc6b4\uc744 \ud558\ub294 Dialplan \uc774\ub2e4.<\/p>\n<pre class=\"brush:shell\">exten =&gt; 209,1,NoOp()\n        same =&gt; n,Answer()\n        same =&gt; n,Set(COUNT=10)\n        same =&gt; n(start),GotoIf($[${COUNT} &gt; 0]?:goodbye)\n        same =&gt; n,SayNumber(${COUNT})\n        same =&gt; n,Set(COUNT=$[${COUNT} - 1])\n        same =&gt; n,Goto(start)\n        same =&gt; n(goodbye),Hangup()<\/pre>\n<p><strong>\u00a0Time-Based Conditional Branching with GotoIfTime()<\/strong><\/p>\n<p>GotoIf() Application \uc774 \ud45c\ud604\uc2dd\uc5d0 \ub530\ub978 \ubd84\uae30\uc600\ub2e4\uba74, GotoIfTime() Application \uc740 system time \uc5d0 \ub530\ub978 \ubd84\uae30\ub77c\uace0 \ub9d0\ud560 \uc218 \uc788\ub2e4.<\/p>\n<blockquote><p>GotoIfTime(times,days_of_week,days_of_month,months?label)<\/p><\/blockquote>\n<p>\uc9e7\uac8c \ub9d0\ud574\uc11c, GotoIfTime() \uc740 \uc9c0\uc815\ub41c \uc2dc\uac04\uc5d0 \ucf5c\uc744 \uc9c0\uc815\ub41c label \ub85c \ubcf4\ub0b4\ub294 Application \uc774\ub77c\uace0 \ud560 \uc218 \uc788\ub2e4.<\/p>\n<blockquote><p>times:<br \/>\n\uc2dc\uac04\ub300 \ubc94\uc704. \ud558\ub098 \ud639\uc740 \uc5ec\ub7ec\uac1c\ub97c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4. 24-hour \ud615\uc2dd\uc744 \uc0ac\uc6a9\ud568. \uc608\ub97c \ub4e4\uc5b4 09:00 AM \ubd80\ud130 05:00 PM \uae4c\uc9c0\uc758 \uc2dc\uac04\ub300\ub97c \uc9c0\uc815\ud55c\ub2e4\uba74 09:00-17:00 \uc73c\ub85c \ud45c\uc2dc\ud560 \uc218 \uc788\ub2e4. \ud558\ub8e8\ub97c \ud1b5\uc9f8\ub85c \uc785\ub825\ud55c\ub2e4\uba74 00:00-23:59 \ub85c \ud45c\uc2dc\ud55c\ub2e4.<\/p>\n<p>days_of_week:<br \/>\n\uc694\uc77c \ubc94\uc704. \ud558\ub098 \ud639\uc740 \uc5ec\ub7ec\uac1c\ub97c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4. mon,tue,wed,thu,fri,sat,sun \uc73c\ub85c\ub9cc \ud45c\uc2dc\uac00 \uac00\ub2a5\ud558\ub2e4. \uc6d4\uc694\uc77c\ubd80\ud130 \uae08\uc694\uc77c\uae4c\uc9c0\ub97c \ud45c\uc2dc\ud558\uace0\uc790 \ud55c\ub2e4\uba74 mon-fri \ub85c \ud45c\uc2dc\ud55c\ub2e4. \ud654\uc694\uc77c\uacfc \ubaa9\uc694\uc77c\ub9cc \ud45c\uc2dc\ud558\uace0\uc790 \ud55c\ub2e4\uba74 tue&amp;thu \ub85c \ud45c\uc2dc\ud55c\ub2e4.<\/p>\n<p>days_of_month:<br \/>\n\uc77c \ubc94\uc704. \ud558\ub098 \ud639\uc740 \uc5ec\ub7ec\uac1c\ub97c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4. 1 \ubd80\ud130 31 \uae4c\uc9c0 \uc9c0\uc815\ud558\uace0\uc790 \ud558\ub294 \ub0a0\uc9dc\ub97c \uc785\ub825\ud558\uba74 \ub41c\ub2e4. 7\uc77c\ubd80\ud130 12\uc77c\uae4c\uc9c0\ub77c\uba74 7-12, 15\uc77c\uacfc 30\uc77c \uc774\ud2c0\ub9cc \uc9c0\uc815\ud558\uace0\uc790 \ud55c\ub2e4\uba74 15&amp;30 \uc73c\ub85c \ud45c\uc2dc\ud55c\ub2e4.<\/p>\n<p>month:<br \/>\n\ub2ec \ubc94\uc704. \ud558\ub098 \ud639\uc740 \uc5ec\ub7ec\uac1c\ub97c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4. jan-apr \uacfc \uac19\uc774 \uc9c0\uc815 \uac00\ub2a5\ud558\uba70 jan&amp;mar&amp;jun \uacfc \uac19\uc740 \uc9c0\uc815\ub3c4 \uac00\ub2a5\ud558\ub2e4. \ubb3c\ub860 jan-apr&amp;jun&amp;oct-dec \uc640 \uac19\uc740 \uc9c0\uc815\ub3c4 \uac00\ub2a5\ud558\ub2e4.<\/p>\n<p><strong>\ubaa8\ub4e0 \ubc94\uc704:<br \/>\n<\/strong>\ub9cc\uc57d \ubaa8\ub4e0 \ub0a0\uc9dc(1\ub144 \ub0b4\ub0b4\uc640 \uac19\uc774..)\ub97c \uc9c0\uc815\ud558\uace0\uc790 \ud55c\ub2e4\uba74 \ud574\ub2f9 \uc785\ub825 \ubd80\ubd84\uc5d0 * \ud45c\uc2dc\ub97c \uc785\ub825\ud558\uba74 \ub41c\ub2e4.<\/p>\n<p>label:<br \/>\n\uac19\uc740 extension \ubd80\ubd84\uc5d0 \uc788\ub294 priority. ex) time_has_passed<br \/>\n\uac19\uc740 context \uc5d0 \uc788\ub294 \ub2e4\ub978 extension, priority. ex) 123,time_has_passed<br \/>\n\ub2e4\ub978 context, extension, priority. ex) incoming,123,time_has_passed<\/p><\/blockquote>\n<p>\uc608\uc81c\ub97c \ubcf4\uc790. \ub9e4\uc8fc \uc6d4\uc694\uc77c\ubd80\ud130 \uae08\uc694\uc77c\uae4c\uc9c0 \uc624\uc804 9:00 \ubd80\ud130 \uc624\ud6c4 05:59 \uc0ac\uc774\uc5d0 \uc624\ub294 \ucf5c\uc744 \ucc98\ub9ac\ud558\ub294 Dialplan \uc774\ub2e4.<\/p>\n<pre class=\"brush:shell\">exten =&gt; s,1,NoOp()\n    same =&gt; n,GotoIfTime(09:00-17:59,mon-fri,*,*?open,s,1)<\/pre>\n<p>\ub9cc\uc57d \ubc1c\uc2e0\uc790\uac00 \ud574\ub2f9 \uc2dc\uac04\uc5d0 \uc804\ud654\ub97c \ud558\uac8c \ub418\uba74 open context \ub0b4\uc758 s extension \uc758 \uccab\ubc88\uc9f8 priority \uad6c\ubb38\uc744 \uc2e4\ud589\ud55c\ub2e4.<\/p>\n<p>\uc544\ub798 \uc608\uc81c\ub294 \ucc38\uace0\ub85c \ubcf4\uae38 \ubc14\ub780\ub2e4.<\/p>\n<pre class=\"brush:shell\">exten =&gt; 212,1,NoOp()\n        same =&gt; n,GotoIfTime(09:00-17:59,mon-fri,*,*?open,s,1)\n\n; If it's any hour of the day, on any day of the week,\n; during the fourth day of the month, in the month of July,\n; we're closed\n        same =&gt; n,GotoIfTime(*,*,4,jul?closed,s,1)\n\n; During business hours, send calls to the open context\n        same =&gt; n,GotoIfTime(09:00-17:59,mon-fri,*,*?open,s,1)\n        same =&gt; n,GotoIfTime(09:00-11:59,sat,*,*?open,s,1)<\/pre>\n<p><strong>Macro<\/strong><\/p>\n<p>\ub9cc\uc57d \uc5ec\ub7ec\uac1c\uc758 Dialplan \uc744 \ud3b8\uc9d1\ud574\uc57c \ud55c\ub2e4\uba74? \uadf8 \uc218\uac00 \uad49\uc7a5\ud788 \ub9ce\ub2e4\uba74? Macro \uac00 \uadf8 \ud574\ub2f5\uc77c \uc218 \uc788\ub2e4.<\/p>\n<p>\ubaa8\ub4e0 Macro \ub294 macro- \uad6c\ubb38\uc73c\ub85c \uc2dc\uc791\ud55c\ub2e4. \ub9cc\uc57d voicemail \uc744 \uc704\ud55c Macro \ub97c \uc0dd\uc131\ud55c\ub2e4\uba74 \ub2e4\uc74c\ucc98\ub7fc \uc0dd\uc131\ud558\uba74 \ub41c\ub2e4.<\/p>\n<blockquote><p>[macro-voicemail]<\/p><\/blockquote>\n<p>\ub2e4\uc74c\uc740 \uc608\uc81c\ub85c \uc791\uc131\ub41c voicemail macro \uc774\ub2e4.<\/p>\n<pre class=\"brush:shell\">[macro-voicemail]\nexten =&gt; s,1,NoOp()\n        same =&gt; n,Dial(${JOHN},10)\n        same =&gt; n,GotoIf($[\"${DIALSTATUS}\" = \"BUSY\"]?busy:unavail)\n        same =&gt; n(unavail),VoiceMail(101@default,u)\n        same =&gt; n,Hangup()\n        same =&gt; n(busy),VoiceMail(101@default,b)\n        same =&gt; n,Hangup()<\/pre>\n<p><strong>Calling Macros from the Dialplan<\/strong><\/p>\n<p>Dialplan \uc5d0\uc11c Macro \ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574\uc11c\ub294 Macro() application \uc774 \ud544\uc694\ud558\ub2e4. Macro() application \uc740 Macro \ub97c \ud638\ucd9c\ud558\uace0 \uc778\uc790\uac12\ub4e4\uc744 \ub118\uaca8\uc8fc\ub294 \uc5ed\ud560\uc744 \ud55c\ub2e4.<br \/>\n\uc608\ub97c \ub4e4\uc5b4 \ubc29\uae08 \uc0dd\uc131\ud55c voicemail macro \ub97c \ud638\ucd9c\ud558\uae30 \uc704\ud574\uc11c\ub294 \ub2e4\uc74c\uacfc \uac19\uc774 \uc791\uc131\ud558\uba74 \ub41c\ub2e4.<\/p>\n<blockquote><p>exten =&gt; 213,1,Macro(voicemail)<\/p><\/blockquote>\n<p>Macro() application \uc740 \ud2b9\uc218 \ubcc0\uc218\ub4e4\uc744 \uac00\uc9c0\uace0 \uc788\ub2e4.<\/p>\n<blockquote><p>${MACRO_CONTEXT}<br \/>\nMacro \ub97c \ud638\ucd9c\ud55c extension \uc758 context<\/p>\n<p>${MACRO_EXTEN}Macro \ub97c \ud638\ucd9c\ud55c Extension<\/p>\n<p>${MACRO_PRIORITY}<br \/>\nMacro \ub97c \ud638\ucd9c\ud55c Priority<\/p>\n<p>${ARG n}<br \/>\nMacro \ub97c \ud638\ucd9c\ud558\uba74\uc11c \ub118\uaca8\uc9c4 \uc778\uc790 \uac12\ub4e4. \uccab\ubc88\uc9f8 \uc778\uc790\uac12\uc740 ${ARG1}, \ub450\ubc88\uc9f8 \uc778\uc790\uac12\uc740 ${ARG2} \uc640 \uac19\ub2e4.<\/p><\/blockquote>\n<p>\uc790, \uc774\uc81c \uc870\uae08\uc804 \uc0dd\uc131\ud55c voicemail macro \ub97c \uc218\uc815\ud574\ubcf4\uc790. \uc870\uae08\uc804 \uc0dd\uc131\ud55c voicemail macro \ub294 \uc624\uc9c1 101 extension \uc5d0 \ub300\ud574\uc11c\ub9cc voicemail \uc744 \uc218\ud589\ud588\uc5c8\ub2e4.<br \/>\n\uc774\ub97c \ud638\ucd9c\ub418\ub294 extension \uc758 voicemail \ub85c \uc218\uc815\ud574\ubcf4\uc790.<\/p>\n<pre class=\"brush:shell\">[macro-voicemail]\nexten =&gt; s,1,NoOp()\n        same =&gt; n,Dial(${ARG1},20)\n        same =&gt; n,Goto(s-${DIALSTATUS},1)\n\nexten =&gt; s-NOANSWER,1,VoiceMail(${MACRO_EXTEN}@default,u)\n        same =&gt; n,Goto(incoming,s,1)\n\nexten =&gt; s-BUSY,1,VoiceMail(${MACRO_EXTEN}@default,b)\n        same =&gt; n,Goto(incoming,s,1)\n\nexten =&gt; _s-.,1,NoOp()\n        same =&gt; n,Goto(s-NOANSWER,1)<\/pre>\n<p><strong>GoSub<\/strong><\/p>\n<p>GoSub() application \uc740 Macro() application \uacfc \ube44\uc2b7\ud558\ub2e4. \ud558\uc9c0\ub9cc Macro() \uc640\ub294 \ub2ec\ub9ac \ubcc4\ub3c4\uc758 Naming rule \uc774 \ud544\uc694\ud558\uc9c0 \uc54a\ub2e4. \ud558\uc9c0\ub9cc GoSub \ub8e8\ud2f4\uc784\uc744 \uc54c\ub9ac\uae30 \uc704\ud574 prefix \ub97c \ubd99\uc774\ub294 \uac83\uc774 \uad00\ub840\uc801\uc774\ub2e4.<br \/>\n\ub2e4\uc74c\uc740 Subroutine \uc608\uc81c\uc774\ub2e4.<\/p>\n<pre class=\"brush:shell\">[subVoicemail]\nexten =&gt; start,1,NoOp()\n        same =&gt; n,Dial(${ARG1},10)\n        same =&gt; n,VoiceMail(${ARG2}@default,${IF($[DIALSTATUS} = BUSY]?b:u)})\n        same =&gt; n,Hangup()\n\n[LocalSets]\nexten =&gt; 217,1,GoSub(subVoicemail,start,1(${JOHN},${EXTEN}))\nexten =&gt; 218,1,GoSub(subVoicemail,start,1(${JANE},${EXTEN}))\nexten =&gt; 219,1,GoSub(subVoicemail,start,1(${JACK},${EXTEN}))<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Basic Expressions Asterisk \uc5d0\uc11c \ubaa8\ub4e0 \ud45c\ud604\uc2dd(\uc218\uc2dd)\uc740 $ [ ] \ub85c \ud45c\uc2dc\ub41c\ub2e4. $[expression] \uadf8\ub9ac\uace0 \ub2e4\uc74c\uacfc \uac19\uc774 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4. $[${COUNT} + 1]$[${COUNT} \/ 2] Asterisk Dialplan \ub0b4\uc5d0\uc11c \ud45c\ud604\uc2dd\uc774 \uc788\ub2e4\uba74 \ud574\ub2f9 \uad6c\ubb38\uc740 \uba3c\uc800 \ubaa8\ub4e0 \ud45c\ud604\uc2dd\uc774 \uacc4\uc0b0\ub41c \uc774\ud6c4\uc5d0 \uc9c4\ud589\ub41c\ub2e4. \ub2e4\uc74c\uc758 \uc608\uc81c\ub97c \uc0dd\uac01\ud574\ubcf4\uc790. exten &hellip; <a href=\"http:\/\/pchero21.com\/?p=3130\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[103,154],"_links":{"self":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/3130"}],"collection":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3130"}],"version-history":[{"count":0,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/3130\/revisions"}],"wp:attachment":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3130"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}