<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;AkIERX4yeip7ImA9WhRWF0g.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315</id><updated>2012-01-05T18:15:04.092+08:00</updated><category term="Overall call flow" /><title>Asterisk In Practice</title><subtitle type="html">Tips of the day: 
Setup local presence in Hong Kong, China or Singapore using DID via SIP trunk.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>55</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/AsteriskInPractice--ShareAndLearn" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="asteriskinpractice--shareandlearn" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUAAQH05cCp7ImA9WhRREU8.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-3235009108987205899</id><published>2011-11-24T17:45:00.000+08:00</published><updated>2011-11-24T17:42:21.328+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-24T17:42:21.328+08:00</app:edited><title>A simple IVR and Queue example where customer listens to marketing materials and also can leave voice message by '*'</title><content type="html">A customer asks for an automated greeting system where callers     listen to marketing messages before being picked up by agents.&amp;nbsp; They     can also press '*' anytime to quit waiting in the queue and leave     voice message.&lt;br&gt;     &lt;br&gt;     1.&amp;nbsp;&amp;nbsp;&amp;nbsp; In the dial plan, we use the option 'Hn' in the Queue     command.&amp;nbsp; The 'H' allows caller to hangup a ringing call by whatever     defined as the disconnect sequence in features.conf.&amp;nbsp; Note that we     also need 'n' such that the retry cycle is skipped and the Queue     command exits.&lt;br&gt;     &lt;u&gt;&lt;br&gt;       extensions.conf&lt;br&gt;     &lt;/u&gt;&lt;br&gt;     [custom-ivr]&lt;br&gt;     exten =&amp;gt; 12345,1,noop&lt;br&gt;     ; answer before playing the sound files&lt;br&gt;     exten =&amp;gt; 12345,n,answer&lt;br&gt;     exten =&amp;gt; 12345,n,wait(1)&lt;br&gt;     exten =&amp;gt; 12345,n,Set(TIMEOUT(digit)=2)&lt;br&gt;     exten =&amp;gt; 12345,n,Set(TIMEOUT(response)=10)&lt;br&gt;     exten =&amp;gt; 12345,n,Background(custom-ivr/custom-welcome)&lt;br&gt;     ;exten =&amp;gt; 12345,n,Set(TIMEOUT(digit)=5)&lt;br&gt;     ; use H to let caller hangup a ringing call to agent by disconnect     key seq in features.conf&lt;br&gt;     ; use n such that caller skips the retry cycle and exits the queue     command&lt;br&gt;     ; otherwise, caller still stays in the queue redialing to agent&lt;br&gt;     exten =&amp;gt; 12345,n,Queue(custom-queue,Hn,,,300)&lt;br&gt;     ; customer leaves voice message by keying '*' or upon wait timeout     of 300s&lt;br&gt;     exten =&amp;gt; 12345,n,VoiceMail(custom-vm@custom-ivr)&lt;br&gt;     &lt;br&gt;     ; we still need this extension to handle '*' pressed during the     welcome greeting&lt;br&gt;     exten =&amp;gt; *,1,noop(i quit waiting)&lt;br&gt;     exten =&amp;gt; *,n,VoiceMail(custom-vm@custom-ivr)&lt;br&gt;     &lt;br&gt;     To verify the current disconnect sequence, we can use 'feature show'     in the CLI.&lt;br&gt;     &lt;u&gt;&lt;br&gt;     &lt;/u&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; The marketing messages are specified as a MOH class     'custom-ivr' in the queue definition.&amp;nbsp;&amp;nbsp; &lt;br&gt;     &lt;u&gt;&lt;br&gt;       queues.conf&lt;br&gt;     &lt;/u&gt;&lt;br&gt;     [custom-queue]&lt;br&gt;     strategy = ringall&lt;br&gt;     musicclass = custom-ivr&lt;br&gt;     ringinuse = no&lt;br&gt;     wrapuptime = 30&lt;br&gt;     joinempty = yes&lt;br&gt;     &lt;br&gt;     &lt;br&gt;     &lt;br&gt;     3.&amp;nbsp;&amp;nbsp;&amp;nbsp; Then we can put the marketing messages in a directory     /var/lib/asterisk/moh/custom-ivr.&amp;nbsp; These sound files are preferably     formatted to minimize transcoding.&amp;nbsp; &lt;br&gt;     &lt;br&gt;     &lt;u&gt;musiconhold.conf&lt;br&gt;     &lt;/u&gt;&lt;br&gt;     [custom-ivr]&lt;br&gt;     mode=files&lt;br&gt;     directory=/var/lib/asterisk/moh/custom-ivr&lt;br&gt;     &lt;br&gt;     We can use 'core show translation' in CLI to show how costly     Asterisk performs the transcoding.&lt;br&gt;     &lt;br&gt;     4.&amp;nbsp;&amp;nbsp;&amp;nbsp; Alternatively, the queue 'context=' also allows caller to quit     by keying a defined extension.&amp;nbsp; For example, with below     configurations, caller can also quit the queue by '*'.&lt;br&gt;     &lt;br&gt;     &lt;u&gt;queues.conf&lt;br&gt;     &lt;/u&gt;&lt;br&gt;     [custom-queue]&lt;br&gt;     context = custom-ivr&lt;br&gt;     &lt;br&gt;     &lt;u&gt;extensions.conf&lt;br&gt;     &lt;/u&gt;&lt;br&gt;     [custom-ivr]&lt;br&gt;     ; no need for Hn &lt;br&gt;     exten =&amp;gt; 12345,n,Queue(custom-queue,,,,300)&lt;br&gt;     &lt;br&gt;     exten =&amp;gt; *,1,noop(i quit waiting)&lt;br&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-3235009108987205899?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/3235009108987205899/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/11/simple-ivr-and-queue-example-where.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/3235009108987205899?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/3235009108987205899?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/11/simple-ivr-and-queue-example-where.html" title="A simple IVR and Queue example where customer listens to marketing materials and also can leave voice message by '*'" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;AkEDQXk6eCp7ImA9WhdaEEw.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-2375526907819671049</id><published>2011-10-19T18:07:00.000+08:00</published><updated>2011-10-19T18:04:30.710+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-19T18:04:30.710+08:00</app:edited><title>Blind Transfer and Ring back in Elastix</title><content type="html">The followings apply to Elastix 2.0.0-36 &amp;amp;&amp;nbsp; Asterisk 1.6.2.10 on     CentOS release 5.5.&lt;br&gt;     &lt;br&gt;     In Elastix, we can perform blind transfer and ring back us if the     transferee does not answer.&amp;nbsp; Note that here assumes you are     transferring call using Asterisk feature, not the IP phone's own     transfer function.&amp;nbsp;&amp;nbsp; &lt;br&gt;     &lt;br&gt;     Firstly, we have to setup a TRANSFER_CONTEXT.&amp;nbsp; Dialplan execution     will jump to here on transfer.&lt;br&gt;     &lt;br&gt;     &lt;u&gt;/etc/asterisk/globals_custom.conf       &lt;br&gt;     &lt;/u&gt;TRANSFER_CONTEXT = blindxfer_ringback     &lt;br&gt;     &lt;br&gt;     Next, we make use of the BLINDTRANSFER variable to ring back in the     context [blindxfer_ringback]&lt;br&gt;     &lt;br&gt;     &lt;u&gt;/etc/asterisk/extensions_custom.conf     &lt;/u&gt;&lt;br&gt;     &amp;nbsp;&lt;br&gt;     [blindxfer_ringback]     &lt;br&gt;     ; the destination ext should not have vm enabled     &lt;br&gt;     exten =&amp;gt; _X.,1,NOOP(${BLINDTRANSFER})     &lt;br&gt;     exten =&amp;gt; _X.,n,set(timeoutd=15) ; set timeout in seconds to dial     the transferee     &lt;br&gt;     exten =&amp;gt; _X.,n,set(extLeng=${LEN(${EXTEN})})     &lt;br&gt;     exten =&amp;gt; _x.,n,dial(local/${EXTEN}@from-internal,${timeoutd})     &lt;br&gt;     exten =&amp;gt; _X.,n,Gotoif($["${DIALSTATUS}" =     "ANSWER"]?hangup:callback)     &lt;br&gt;     ; strip the 'SIP/' and ring back&lt;br&gt;     exten =&amp;gt; _X.,n(callback),dial(local/${BLINDTRANSFER:4:${extLeng}}@from-internal,,tr)&lt;br&gt;     exten =&amp;gt; _X.,n(hangup),hangup()     &lt;br&gt;     &lt;br&gt;     &lt;u&gt;How does it work&lt;br&gt;     &lt;/u&gt;     &lt;ol&gt;       &lt;li&gt;During a conversation, when you want to transfer caller, you         press '##' followed by the transferee extension and '#'.&lt;/li&gt;       &lt;li&gt;You can hangup your phone. &lt;/li&gt;       &lt;li&gt;The caller now hears music while being connected to the         transferee. &lt;/li&gt;       &lt;li&gt;If the transferee does not answer, Asterisk will ring back         you.&lt;/li&gt;     &lt;/ol&gt;     &lt;u&gt;Asterisk feature&lt;br&gt;     &lt;/u&gt;The '##' is the key sequence to initiate blind transfer in     Asterisk.&amp;nbsp; You can verify the actual sequence defined in your     Elastix.&lt;br&gt;     &lt;br&gt;     &lt;ol&gt;       &lt;li&gt;PBX&amp;gt;PBX Configuration&amp;gt;Feature Codes&lt;/li&gt;       &lt;li&gt;Or you can check it in CLI.&lt;/li&gt;     &lt;/ol&gt;     *CLI&amp;gt; features show&lt;br&gt;     Builtin Feature&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default Current&lt;br&gt;     ---------------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------- -------&lt;br&gt;     Pickup&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *8&lt;br&gt;     Blind Transfer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ##&lt;br&gt;     &lt;br&gt;     &lt;br&gt;     &lt;br&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-2375526907819671049?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/2375526907819671049/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/10/blind-transfer-and-ring-back-in-elastix.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/2375526907819671049?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/2375526907819671049?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/10/blind-transfer-and-ring-back-in-elastix.html" title="Blind Transfer and Ring back in Elastix" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0UBQn44cSp7ImA9WhdUGUs.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-3943886639110706483</id><published>2011-10-07T12:23:00.000+08:00</published><updated>2011-10-07T12:20:53.039+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-07T12:20:53.039+08:00</app:edited><title>Tips of using Elastix in Business Center/Virtual Office</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;Business center usually gives its client a business contact number to  receive inbound calls.&amp;nbsp; Caller is greeted properly using the client's name  and then forwarded to the client who is probably located remotely.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;It is desirable that the agent can identify which client is being called  before picking up the phone.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Here describes the steps taken to accomplish it using Elastix. &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;The PBX&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;The scenario applies to Elastix 2.0.0-36 and most common IP Phones with LCD  display.&amp;nbsp; The business center subscribes a T1 trunk (bundled with 200 local  numbers) from a local telephone provider.&amp;nbsp; The local numbers are allocated  to its clients.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;Steps&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a queue of agents &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;PBX &amp;gt; PBX Configuration &amp;gt; Inbound Call Control &amp;gt; Queues&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;You can simply enter the agent extensions in the 'Static Agents'  field.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Add inbound route &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;PBX &amp;gt; PBX Configuration &amp;gt; Inbound Call Control &amp;gt; Inbound  Routes&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;SPAN style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;Input the 'DID Number' and  the corresponding company name in the 'CID name prefix' field.&amp;nbsp; The DID  number is the business contact number that is given to the client.&lt;/SPAN&gt;&lt;/DIV&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;Direct incoming call to the call  queue created above.&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Create inbound route for each DID number you assigned to clients.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;What would the agent see?&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;When a call comes in, the agent can see the corresponding company name on  the phone LCD display.&amp;nbsp; Note that the display length varies with phone  models.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-3943886639110706483?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/3943886639110706483/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/10/tips-of-using-elastix-in-business.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/3943886639110706483?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/3943886639110706483?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/10/tips-of-using-elastix-in-business.html" title="Tips of using Elastix in Business Center/Virtual Office" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUcARns4fip7ImA9WhdUEUo.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-8372919174307009486</id><published>2011-09-28T09:26:00.000+08:00</published><updated>2011-09-28T09:24:07.536+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-28T09:24:07.536+08:00</app:edited><title>Start Asterisk as service</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;After going through the Asterisk installation steps, we usually want to  start it as a service.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;Usual steps of Asterisk Installation&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;./configure&amp;nbsp;&amp;nbsp; -- check if our system is suitable for Asterisk  installation&lt;/DIV&gt; &lt;DIV&gt;make menuselect&amp;nbsp; -- it is an optional step, allowing you to select  additional module, eg, mysql_cdr&lt;/DIV&gt; &lt;DIV&gt;make – the compilation process&lt;/DIV&gt; &lt;DIV&gt;make install – setup the paths, copy files to asterisk directory,  etc.&lt;/DIV&gt; &lt;DIV&gt;make samples – an optional step to put a set of sample config in your  installation (it will over-write existing config)&lt;/DIV&gt; &lt;DIV&gt;make progdocs – also an optional step to setup the documentation&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;At this  stage, you should be able to run Asterisk as 'asterisk –cvvvvvv' in  foreground.&amp;nbsp; But it is more desirable to setup a service and it can be  achieved easily by:&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&lt;U&gt;Setup  Asterisk Service&lt;/U&gt;&lt;/DIV&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;make  config&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;There is a  set of platform-specific templates in &amp;lt;asterisk-src-dir&amp;gt;/contrib/init.d,  designed to be used for service startup script.&amp;nbsp; The 'make config' will  base on one of these templates to create the Asterisk startup script in  /etc/init.d.&amp;nbsp; To verify the result:&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;#chkconfig  –list asterisk&lt;/DIV&gt; &lt;DIV&gt;#asterisk&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:off&amp;nbsp;&amp;nbsp;  1:off&amp;nbsp;&amp;nbsp; 2:on&amp;nbsp;&amp;nbsp;&amp;nbsp; 3:on&amp;nbsp;&amp;nbsp;&amp;nbsp;  4:on&amp;nbsp;&amp;nbsp;&amp;nbsp; 5:on&amp;nbsp;&amp;nbsp;&amp;nbsp; 6:off&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;Then, you  can start asterisk by 'service asterisk start'.&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-8372919174307009486?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/8372919174307009486/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/09/start-asterisk-as-service.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/8372919174307009486?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/8372919174307009486?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/09/start-asterisk-as-service.html" title="Start Asterisk as service" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0UAQ305eip7ImA9WhdUEE8.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-8597297917014398440</id><published>2011-09-26T16:22:00.000+08:00</published><updated>2011-09-26T16:20:42.322+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-26T16:20:42.322+08:00</app:edited><title>Group Pickup in Elastix</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;The following steps apply to Elastix 2.0.0-36 on CentOS 5.5.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; edit /etc/asterisk/features_featuremap_custom.conf by  adding "pickupexten = *8" &lt;/DIV&gt; &lt;DIV&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; restart Elastix by 'amportal restart' &lt;/DIV&gt; &lt;DIV&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; in PBX &amp;gt; Extensions &amp;gt; field 'callgroup', assign  each extension to a call group (each extension can belong to only one  group;&amp;nbsp; group range is 0-63)&lt;/DIV&gt; &lt;DIV&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; in PBX &amp;gt; Extensions &amp;gt; field 'pickupgroup',  specify the call groups an extension is authorized to pick-up (you can enter a  range and/or discrete group number, e.g., 1-3,5,9,etc)&lt;/DIV&gt; &lt;DIV&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; when you want to pick up a ringing call, off hook and  then *8.&lt;/DIV&gt; &lt;DIV&gt;6.&amp;nbsp;&amp;nbsp;&amp;nbsp; however, if there is more than one ringing call, it is  up to Asterisk to deliver which one to you.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;You can verify the pickup key in asterisk as below.&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;*CLI&amp;gt; features show&lt;/DIV&gt; &lt;DIV&gt;Builtin Feature&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  Default Current&lt;/DIV&gt; &lt;DIV&gt;---------------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  ------- -------&lt;/DIV&gt; &lt;DIV&gt;Pickup&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  *8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *8&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-8597297917014398440?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/8597297917014398440/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/09/group-pickup-in-elastix.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/8597297917014398440?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/8597297917014398440?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/09/group-pickup-in-elastix.html" title="Group Pickup in Elastix" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;Dk4NSXw5eip7ImA9WhdWGUQ.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-6483442178067054164</id><published>2011-09-14T18:11:00.000+08:00</published><updated>2011-09-14T18:09:58.222+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-14T18:09:58.222+08:00</app:edited><title>IP PBX vs Legacy PBX</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV  style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"&gt; &lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV  style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"&gt; &lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV  style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"&gt; &lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV  style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"&gt; &lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;A customer asked for the differences between IP PBX and legacy PBX.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;IP PBX is usually a powerful linux/unix server with an Asterisk-based PBX  software.&amp;nbsp; Examples are Elastix and Trixbox.&amp;nbsp; A PRI T1/E1 or FXO card  is required to connect the telco side. &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Vendors such as Digium, Snom and Grandstream also manufacture all-in-one  appliances that simplifies the installation and configuration.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;Features and flexibility&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Being a software, IP PBX&amp;nbsp; is more feature-rich and customizable than a  traditional PBX.&amp;nbsp;&amp;nbsp; For instance, we can customize IVR, call queues,  ring groups, followme, voice recording and many other features in the IP  PBX.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;The IP PBX also provides a web-based utility for IT staff to conveniently  perform daily tasks.&amp;nbsp;&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;Transmit audio over internet to save money&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Voice is transmitted over a packet network (Internet, LAN) rather than  phone lines.&amp;nbsp; Though it sounds trivial, it has important  implications:&amp;nbsp; it can help to save money.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;The main office can communicate with remote branch offices over internet  and enjoy free calling among the extensions.&amp;nbsp; No IDD charge is  incurred.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;Handset&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Note that we need to use IP phones with IP PBX.&amp;nbsp;&amp;nbsp; These phones  are connected to your company LAN, rather than telephone lines.&amp;nbsp; There are  many brands of IP phones and they are inter-changeable.&amp;nbsp; There is basically  no vendor lock-in.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;The IP nature also enables remote extensions whereas we can have extensions  outside office, such as home, trip or even our mobiles* as long as internet  access is available.&amp;nbsp; It is an extra convenience that legacy PBX cannot  offer.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;*a sip client app is required&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;Voice quality&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;You will find voice quality the same.&amp;nbsp;&amp;nbsp; The company LAN is a  10/100M ethernet, which is a pretty sufficient bandwidth for voip  conversation.&amp;nbsp; A typical two-way call merely consumes around 150kbps.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Nevertheless, IT administrator should pay more attention to conditions that  could saturate the LAN, e.g packets sent from infected PC or lengthy  download/upload. &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Separating voice and data into two subnets is suggested.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;Ongoing support&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;In the long run, customer will see savings in maintenance costs as the IP  PBX configuration is self-serviced.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;When your business grow, you need to add more extensions.&amp;nbsp;&amp;nbsp; It  can be accomplished easily in IP PBX without adding ports as legacy PBX  requires.&amp;nbsp; You will find IP PBX more scalable. &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;Buying considerations : Replacement or parallel run&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Customer is generally more interested in IP PBX when starting a new office  or the legacy PBX is almost fully depreciated.&amp;nbsp; Some customers also chooses  to install the IP PBX in front of the legacy PBX such that they can start using  the new features while keeping the old investment.&amp;nbsp; In this scenario, the  IP PBX has a 2-port T1 card, one port connecting to telco and the other  connecting to the legacy PBX via a cross cable. &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-6483442178067054164?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/6483442178067054164/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/09/ip-pbx-vs-legacy-pbx.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/6483442178067054164?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/6483442178067054164?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/09/ip-pbx-vs-legacy-pbx.html" title="IP PBX vs Legacy PBX" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0YAR3g6eyp7ImA9WhdWEEs.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-7720389913058420838</id><published>2011-09-03T22:45:00.001+08:00</published><updated>2011-09-03T22:45:46.613+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-03T22:45:46.613+08:00</app:edited><title>How to read mbox file in Thunderbird</title><content type="html">&lt;DIV&gt;&lt;FONT face=Calibri&gt;In linux/unix based email systems, we usually archive  mails in mbox format.&amp;nbsp; Although it is a common format, our Microsoft email  clients such as Outlook just does not read mbox straightforwardly.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;Now, we can use Thunderbird to recover&amp;nbsp;emails out  of the archives easily. The below steps apply to version 6.0.1.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Download Thunderbird from &lt;A  title="http://www.mozilla.org/en-US/thunderbird/&amp;#10;CTRL + Click 開啟連結"  href="http://www.mozilla.org/en-US/thunderbird/"&gt;http://www.mozilla.org/en-US/thunderbird/&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;After installation, we have to  setup an email account.&amp;nbsp; This is just like how we configure an account in  Outlook.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Next, we need to &lt;/FONT&gt;&lt;FONT  face=Calibri&gt;find out the folder location in Thunderbird.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;Edit&amp;gt;Folder Properties&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Close Thunderbird and place  our mbox archive&amp;nbsp;in the folder.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Restart Thunderbird and you  should see the contents.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-7720389913058420838?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/7720389913058420838/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/09/how-to-read-mbox-file-in-thunderbird.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/7720389913058420838?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/7720389913058420838?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/09/how-to-read-mbox-file-in-thunderbird.html" title="How to read mbox file in Thunderbird" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CkIBQHo7eSp7ImA9WhdXEkk.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-1274415838840718224</id><published>2011-08-25T10:50:00.000+08:00</published><updated>2011-08-25T10:49:11.401+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-25T10:49:11.401+08:00</app:edited><title>Housekeep Asterisk Log Files</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV  style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"&gt; &lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;Asterisk log files can grow very large unawared, eventually leading to disk  space problems.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;We can take a few measures to maintain log history and housekeep old ones  automatically.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; Review the /etc/asterisk/logger.conf&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;This file specifies the logging level of asterisk.&amp;nbsp; In a production  system, it is sufficient to turn on message log only while keeping the others  disabled.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;;debug =&amp;gt; debug&lt;/DIV&gt; &lt;DIV&gt;console =&amp;gt; notice,warning,error,debug&lt;/DIV&gt; &lt;DIV&gt;messages =&amp;gt; notice,warning,error&lt;/DIV&gt; &lt;DIV&gt;;full =&amp;gt; notice,warning,error,debug,verbose&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;The modified logging level is made effective by:&lt;/DIV&gt; &lt;DIV&gt;asterisk –rx 'logger reload'&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Use logrotate to rotate and remove historical  files&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;This utility is helpful in housekeeping outdated log files.&amp;nbsp; The  logrotate is usually invoked from /etc/cron.daily and it looks for how and what  to process in the /etc/logrotate.conf.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;As illustrated in the logrotate.conf below, we rotate log files on weekly  basis and keep 4 weeks.&amp;nbsp; Rotated log would have a timestamp as  suffix.&amp;nbsp; Older files would be deleted automatically.&amp;nbsp; Note that we can  compress rotated files to further reduce disk usage.&amp;nbsp; Individual rotation  information are put in /etc/logrotate.d.&lt;/DIV&gt; &lt;BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr&gt;   &lt;DIV&gt;&lt;U&gt;logrotate.conf&lt;/U&gt;&amp;nbsp; &lt;/DIV&gt;&lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr&gt;   &lt;DIV&gt;# see "man logrotate" for details&lt;/DIV&gt;   &lt;DIV&gt;# rotate log files weekly&lt;/DIV&gt;   &lt;DIV&gt;weekly&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;   &lt;DIV&gt;# keep 4 weeks worth of backlogs&lt;/DIV&gt;   &lt;DIV&gt;rotate 4&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;   &lt;DIV&gt;# create new (empty) log files after rotating old ones&lt;/DIV&gt;   &lt;DIV&gt;create&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;   &lt;DIV&gt;# use date as a suffix of the rotated file&lt;/DIV&gt;   &lt;DIV&gt;dateext&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;   &lt;DIV&gt;# uncomment this if you want your log files compressed&lt;/DIV&gt;   &lt;DIV&gt;compress&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;   &lt;DIV&gt;# RPM packages drop log rotation information into this directory&lt;/DIV&gt;   &lt;DIV&gt;include /etc/logrotate.d&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;In /etc/logrotate.d/, we can create a file (eg, named as 'asterisk') to  specify which asterisk log files we want to housekeep. &lt;/DIV&gt; &lt;BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr&gt;   &lt;DIV&gt;&lt;U&gt;/etc/logrotate.d/asterisk&lt;/U&gt;&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;   &lt;DIV&gt;/var/log/asterisk/messages&amp;nbsp; {&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sharedscripts&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; postrotate&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /bin/kill -HUP `cat    /var/run/syslogd.pid 2&amp;gt; /dev/null` 2&amp;gt; /dev/null || true&lt;/DIV&gt;   &lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endscript&lt;/DIV&gt;   &lt;DIV&gt;}&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-1274415838840718224?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/1274415838840718224/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/08/housekeep-asterisk-log-files.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/1274415838840718224?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/1274415838840718224?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/08/housekeep-asterisk-log-files.html" title="Housekeep Asterisk Log Files" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CkQARns5fip7ImA9WhdQFkk.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-6111708012666960500</id><published>2011-08-18T12:07:00.000+08:00</published><updated>2011-08-18T12:05:47.526+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-18T12:05:47.526+08:00</app:edited><title>Asterisk Native Bridge vs SIP External Native Bridge</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;The difference can be illustrated by below scenario:&lt;/DIV&gt; &lt;OL type=1&gt;   &lt;LI&gt;&lt;FONT face=Arial&gt;&lt;FONT style="FONT-SIZE: 10.5pt"&gt;Dial creates an outbound    PBX channel and asks one of the channel drivers to create a call&lt;/FONT&gt;&lt;/FONT&gt;     &lt;LI&gt;&lt;FONT face=Arial&gt;&lt;FONT style="FONT-SIZE: 10.5pt"&gt;When the call is    answered, Asterisk bridges the media streams so the caller on the first    channel can speak with the callee on the second, outbound    channel&lt;/FONT&gt;&lt;/FONT&gt;    &lt;LI&gt;&lt;FONT face=Arial&gt;&lt;FONT style="FONT-SIZE: 10.5pt"&gt;In some cases where we    have the same technology on both&lt;SPAN class=Apple-converted-space&gt;    &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 10.5pt"&gt;&lt;A    style="COLOR: ; TEXT-DECORATION: " class=el    href="http://www.asterisk.org/doxygen/asterisk1.4/structchannels.html"&gt;&lt;FONT    color=#1a41a8&gt;&lt;STRONG&gt;&lt;FONT style="TEXT-DECORATION: " face=Arial&gt;&lt;FONT    style="TEXT-DECORATION: none"&gt;channels&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;FONT    face=Arial&gt;&lt;FONT style="FONT-SIZE: 10.5pt"&gt;&lt;SPAN class=Apple-converted-space&gt;    &lt;/SPAN&gt;and compatible codecs, a native bridge is used. In a native bridge, the    channel driver handles forwarding of incoming audio to the outbound stream    internally, without sending audio frames through the PBX.&lt;/FONT&gt;&lt;/FONT&gt;    &lt;LI&gt;&lt;FONT face=Arial&gt;&lt;FONT style="FONT-SIZE: 10.5pt"&gt;In SIP, theres an    "external native bridge" where Asterisk redirects the endpoint, so audio flows    directly between the caller's phone and the callee's phone. Signalling stays    in Asterisk in order to be able to provide a proper CDR record for the    call&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Arial&gt;&lt;FONT    style="FONT-SIZE: 10.5pt"&gt;.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt; &lt;DIV&gt;&lt;FONT face=Arial&gt;The above information is taken from &lt;A  href="http://www.asterisk.org/doxygen/asterisk1.4/index.html"&gt;http://www.asterisk.org/doxygen/asterisk1.4/index.html&lt;/A&gt;.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-6111708012666960500?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/6111708012666960500/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/08/asterisk-native-bridge-vs-sip-external.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/6111708012666960500?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/6111708012666960500?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/08/asterisk-native-bridge-vs-sip-external.html" title="Asterisk Native Bridge vs SIP External Native Bridge" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck4BQXY_cSp7ImA9WhdSGUw.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-7796491505295612172</id><published>2011-07-29T11:43:00.000+08:00</published><updated>2011-07-29T11:42:30.849+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-29T11:42:30.849+08:00</app:edited><title>Add Google +1 button to PhpBB</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;The Google +1 button is analogous to the Facebook Like.&amp;nbsp; With a few  steps, we could add this feature to our PhpBB-based forum.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;In the first place, edit two files : overall_header.html and  viewtopic_body.html in the template folder as below.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;overall_header.html&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; find &amp;lt;/head&amp;gt;&lt;/DIV&gt; &lt;DIV&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; in front of it, insert &amp;lt;script  type="text/javascript" src="&lt;A  href='https://apis.google.com/js/plusone.js"'&gt;https://apis.google.com/js/plusone.js"&lt;/A&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;viewtopic_body.html&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; find &amp;lt;div class="postbody"&amp;gt;&lt;/DIV&gt; &lt;DIV&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; inline add to the appropriate position to show the +1  button&lt;/DIV&gt; &lt;DIV&gt;&amp;lt;div&amp;gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;lt;g:plusone size="medium"&amp;gt;&amp;lt;/g:plusone&amp;gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;lt;/div&amp;gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;It is advisable to refresh to template if the +1 button does not  appear.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; Open PhpBB Administration Control Panel&lt;/DIV&gt; &lt;DIV&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Click the 'STYLES' tab&lt;/DIV&gt; &lt;DIV&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; Click 'Templates' and 'Refresh'&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-7796491505295612172?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/7796491505295612172/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/add-google-1-button-to-phpbb.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/7796491505295612172?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/7796491505295612172?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/add-google-1-button-to-phpbb.html" title="Add Google +1 button to PhpBB" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEIAQ34-fSp7ImA9WhdSEkk.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-7150142143313619407</id><published>2011-07-21T18:03:00.000+08:00</published><updated>2011-07-21T18:02:22.055+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-21T18:02:22.055+08:00</app:edited><title>Asterisk dialer with Outlook 2010</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;It would be convenient if we just merely point and click a contact in our  Outlook address book and our Asterisk PBX would make the call.&amp;nbsp; This  article outlines the steps taken to enable an Asterisk dialer in Outlook  2010.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;These steps are tested under below environment.&lt;/DIV&gt; &lt;DIV&gt;Microsoft Outlook 2010&lt;/DIV&gt; &lt;DIV&gt;Windows 7 (32-bit)&lt;/DIV&gt; &lt;DIV&gt;Asterisk 1.6.2.10&lt;/DIV&gt; &lt;DIV&gt;Elastix 2.0.0-36&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;The office  extensions are managed by Elastix/Asterisk.&amp;nbsp; They are configured as sip  peers and physically vary from IP Phones, analogue phones via ATA and Xlite  softphones.&amp;nbsp; &lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&lt;STRONG&gt;Concept&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;In essence,  we need a windows TAPI driver that can talk with Asterisk via Asterisk Manager  Interface(AMI).&amp;nbsp; When we click to dial an Outlook contact, the TAPI driver  sends an Originate command to our Asterisk PBX which performs the dialing.&amp;nbsp;  It dials to our phone extension first and then to the contact, bridging both  parties in a conversation.&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;FONT face="Times New Roman"&gt;&lt;FONT  style="FONT-SIZE: 10.5pt"&gt;&lt;FONT size=3 face=Calibri&gt;&lt;STRONG&gt;TAPI  Driver&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;An open source TAPI drvier is  selected.&amp;nbsp; It is available from&amp;nbsp; &lt;A  href="http://sourceforge.net/projects/activa/files"&gt;http://sourceforge.net/projects/activa/files&lt;/A&gt;.&amp;nbsp;  The version we tested is v.1.6.4&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;STRONG&gt;Steps&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; In the first  place, we need to enable AMI and define an AMI account in the Asterisk  box.&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;AMI is configured in  /etc/asterisk/manager.conf.&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;;The general section below enables  Asterisk to listen for AMI connection in port 5038.&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;[general]&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;enabled=yes&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;port=5038&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;bindaddr=0.0.0.0&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;;It defines an AMI account –  astdialer – to be used by the TAPI driver&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;;It is advisable to only permit  connections from internal ip, as accomplished by the 'deny and  permit'&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;[astdialer]&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;secret=xxxxxxxx&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;FONT face="Times New Roman"&gt;&lt;FONT  style="FONT-SIZE: 10.5pt"&gt;read =  system,call,log,verbose,command,agent,user,originate&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;FONT face="Times New Roman"&gt;&lt;FONT  style="FONT-SIZE: 10.5pt"&gt;write =  system,call,log,verbose,command,agent,user,originate&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;FONT face="Times New Roman"&gt;&lt;FONT  style="FONT-SIZE: 10.5pt"&gt;deny = 0.0.0.0/0.0.0.0&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;FONT face="Times New Roman"&gt;&lt;FONT  style="FONT-SIZE: 10.5pt"&gt;permit =  192.168.0.1/255.255.255.0&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;To make the changes effective, we  can reload manager module by:&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;asterisk –rx 'manager  reload'&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Next, we  install the TAPI driver in our PC.&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;The installation process will  present a screen to capture &lt;/SPAN&gt;a) our phone extension and b) AMI connection  parameters.&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;Line DN&amp;nbsp;&amp;nbsp;&amp;nbsp;  :&amp;nbsp;&amp;nbsp;&amp;nbsp; It refers to our phone extension;&amp;nbsp; it becomes the 1st  leg SIP/&amp;lt;Line DN&amp;gt; in the Originate command&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;Line Prefix&amp;nbsp;&amp;nbsp;&amp;nbsp;  :&amp;nbsp;&amp;nbsp;&amp;nbsp; What input here would be stripped when sending to Asterisk  as the dial string.&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;Context&amp;nbsp;&amp;nbsp;&amp;nbsp;  :&amp;nbsp;&amp;nbsp;&amp;nbsp; It refers to the dialplan context in Asterisk for incoming  and outgoing calls&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;Host IP&amp;nbsp;&amp;nbsp;&amp;nbsp;  :&amp;nbsp;&amp;nbsp;&amp;nbsp; It refers to the ip/dns of our Asterisk PBX&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;Port&amp;nbsp;&amp;nbsp;&amp;nbsp;  :&amp;nbsp;&amp;nbsp;&amp;nbsp; refer to the AMI above&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;User&amp;nbsp;&amp;nbsp;&amp;nbsp;  :&amp;nbsp;&amp;nbsp;&amp;nbsp; refer to the AMI above; in our example, we should input  'astdialer'&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;Password&amp;nbsp;&amp;nbsp;&amp;nbsp; :refer  to the AMI above&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; We also need  to add a key in Windows 7 registry for TAPI support (ref to&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;U&gt;&lt;SPAN style="COLOR: blue"  lang=EN-US&gt;&lt;A href="http://support.microsoft.com/kb/959625/"&gt;&lt;SPAN  style="COLOR: blue"&gt;&lt;FONT  face="Times New Roman"&gt;http://support.microsoft.com/kb/959625/&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;SPAN  lang=EN-US&gt;&lt;FONT face="Times New Roman"&gt; )&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;The registry subkey required is:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;KEY_LOCAL_MACHINE\Software\Microsoft\Office\Outlook\Call  Integration&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;with a DWORD value:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;TAPIOVERRIDE&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;With the above done, we should see a 'call' icon on right  clicking an Outlook contact.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;&lt;STRONG&gt;Go&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;Asterisk will firstly ring our extension and, upon  connected, dial the other number.&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt" lang=EN-US&gt;&lt;FONT face="Times New Roman"&gt;The  callee would have seen incoming call from us (or what configured as the proper  caller id to present) as if we manually dialed the number.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT  face="Times New Roman"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt; &lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN  style="mso-bidi-font-size: 10.0pt"  lang=EN-US&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-7150142143313619407?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/7150142143313619407/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/asterisk-dialer-with-outlook-2010.html#comment-form" title="2 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/7150142143313619407?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/7150142143313619407?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/asterisk-dialer-with-outlook-2010.html" title="Asterisk dialer with Outlook 2010" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DEUDRHk8eyp7ImA9WhdTFU8.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-6757579805000966083</id><published>2011-07-13T11:05:00.000+08:00</published><updated>2011-07-13T11:04:35.773+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-13T11:04:35.773+08:00</app:edited><title>Why we receive spam not attending to us?</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;Recently, a client asks why she receive emails not attending to her.&amp;nbsp;  &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;The internet email system is responsible for delivery.&amp;nbsp; It functions  like our post office.&amp;nbsp; As long as we write a correct postal address, our  post office can deliver a letter to the address.&amp;nbsp; The letter contents (who  wrote the letter and who should receive the letter) is not under strict  control.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Similarly, the internet email delivery mechanism (which is a number of  computers running smtp services) only deals with routing and delivery of email  messages.&amp;nbsp; The 'from: to:', etc. are part of the contents and therefore not  under control by the smtp delivery.&amp;nbsp; Spammers can alter or fake these  fields so as to broadcast purposely and hide their real identity. It explains  why we receive so many spams, some with forged sender and some are not even  attending to us.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;It is our system administrator (who is in charge of our company email  server) to take care of spam filtering.&amp;nbsp; Common measures are checking the  sending ip against DNSBL (eg spamcot, spamhaus) and deploying some kind of  anti-spam appliance.&amp;nbsp; The administrator also needs to ensure his email  server is NOT acting as open relay which could otherwise make the server itself  a spam source.&amp;nbsp; It is also advisable to disable smtp connection from  internal LAN PC to outside because the smtp connection is usually initiated by  the company email server only.&amp;nbsp; If there is some other PC making the  connection, then it is likely from an infected one.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-6757579805000966083?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/6757579805000966083/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/why-we-receive-spam-not-attending-to-us.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/6757579805000966083?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/6757579805000966083?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/why-we-receive-spam-not-attending-to-us.html" title="Why we receive spam not attending to us?" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkUDRno9eSp7ImA9WhdRF0o.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-3194859804078953537</id><published>2011-07-07T16:30:00.002+08:00</published><updated>2011-08-08T10:24:37.461+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-08T10:24:37.461+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Overall call flow" /><title>Make VOIP call from Android phones</title><content type="html">&lt;div dir="ltr"&gt;&lt;div style="color: black; font-family: 'Calibri'; font-size: 12pt;"&gt;&lt;div&gt;The following applies to Android 2.2 on Motorola Milestone 2.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;We can dial out and receive VOIP calls from our smartphone (eg Nokia,  Android, etc.).&amp;nbsp; The primary benefit is saving IDD and roaming charges when  we travel abroad.&amp;nbsp; &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://edm.zonetel.com/zoneedm/android-sipdroid/make-voip-call-from-android.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="269" src="http://edm.zonetel.com/zoneedm/android-sipdroid/make-voip-call-from-android.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;The prerequisite is that we have subscribed an VOIP account from a Internet  Telephony Service Provider (ITSP) and ideally have public internet access for  free (eg, wifi in coffee shops).&amp;nbsp; To make an IDD call (eg to our home town)  at low cost, we dial over the internet to the ITSP that eventually routes our  call to the destination, bypassing part of the telephone network and thus saving  call charges.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;The ITSP is usually a telecom sevice provider that operates a VOIP gateway  to serve calls from the internet side and routes to the telephone switch  network.&amp;nbsp; They usually charge account maintenance fee monthly and  termination fee per call basis.&amp;nbsp; Local termination is usually free while  overseas termination are almost charged the same as if calls were originated  locally.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;The term VOIP (voice over IP) describes the mechanism and protocol we send  voice over the internet.&amp;nbsp; It centers around SIP (session initiation  protocol) which is now the industry protocol standard of transmitting voice over  packet switched network.&amp;nbsp; Our smartphone has to become a sip compliant  device in order to make VOIP calls.&amp;nbsp; It is surprisingly easy as installing  an SIP client apps would suffice.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;There are a number of SIP client apps on Android.&amp;nbsp; I installed  Sipdroid (&lt;a href="http://sipdroid.org/"&gt;&lt;span style="font-family: 新細明體;"&gt;http://sipdroid.org/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: 新細明體;"&gt; &lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;) on my MS2 because it is free and simple to use.&amp;nbsp; I take a  VOIP account from ZONETEL (&lt;a href="http://www.zonetel.com/"&gt;www.zonetel.com&lt;/a&gt;)  (one of the HK based ITSP) as illustration.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;In the first place, I configure the VOIP account in Sipdroid.&amp;nbsp; The  VOIP account just consists of three information: 1) the ITSP server address, 2)  account username, 3) account password&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://edm.zonetel.com/zoneedm/android-sipdroid/sipdroid-scr-2.png"&gt;Screen  1. Input VOIP account in Sipdroid&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://edm.zonetel.com/zoneedm/android-sipdroid/sipdroid-scr-4.png"&gt;Screen  2. Input VOIP account in Sipdroid (continued)&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;To make a call, we type the destination number and enter to proceed.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://edm.zonetel.com/zoneedm/android-sipdroid/sipdroid-scr-idd.png"&gt;Screen  3. Make a VOIP call&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;This VOIP account is bundled with a HK local telephone number for receiving  call.&amp;nbsp; It means we can be reached via this number even when we are abroad  and the Sipdroid apps is running.&amp;nbsp; In other words, it helps to save roaming  charge.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://edm.zonetel.com/zoneedm/android-sipdroid/sipdroid-scr-incoming.png"&gt;Screen  4. Incoming call&lt;/a&gt;&amp;nbsp; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div style="color: black; font-family: 'Calibri'; font-size: 12pt;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-3194859804078953537?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/3194859804078953537/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/make-voip-call-from-android-phones.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/3194859804078953537?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/3194859804078953537?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/make-voip-call-from-android-phones.html" title="Make VOIP call from Android phones" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DE8GRng5eip7ImA9WhdTEE0.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-2104834316656740361</id><published>2011-07-07T10:47:00.001+08:00</published><updated>2011-07-07T10:47:07.622+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-07T10:47:07.622+08:00</app:edited><title>Fight spam with MailScanner</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;One of our clients is using MailScanner (&lt;A  href="http://www.mailscanner.info/"&gt;&lt;FONT  face=新細明體&gt;http://www.mailscanner.info/&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=新細明體&gt; &lt;/FONT&gt;&lt;FONT  face=Calibri&gt;) as anti-spam filter on a fedora system.&amp;nbsp; The ms provides  many options to fine tune how to handle spam emails.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;In the first place, we have to enable the spam check feature in  /etc/mail/MailScanner.conf and tells ms which spam filter to use.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;# Spam Detection and Spam Lists (DNS blocklists)&lt;/DIV&gt; &lt;DIV&gt;# ----------------------------------------------&lt;/DIV&gt; &lt;DIV&gt;Spam Checks = yes&lt;/DIV&gt; &lt;DIV&gt;Spam List = spamhaus-ZEN spamcop.net&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;The information we provided to the directive 'Spam List' is a reference to  the spam filter definitions in spam.lists.conf.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;The default installation of spam.lists.conf already includes some common  spam filter definitions and we can add further as necessary.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;spam.lists.conf&lt;/DIV&gt; &lt;DIV&gt;--------------------&lt;/DIV&gt; &lt;DIV&gt;spamhaus.org&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  sbl.spamhaus.org.&lt;/DIV&gt; &lt;DIV&gt;spamhaus-XBL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  xbl.spamhaus.org.&lt;/DIV&gt; &lt;DIV&gt;spamhaus-PBL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  pbl.spamhaus.org.&lt;/DIV&gt; &lt;DIV&gt;spamhaus-ZEN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  zen.spamhaus.org.&lt;/DIV&gt; &lt;DIV&gt;SBL+XBL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  sbl-xbl.spamhaus.org.&lt;/DIV&gt; &lt;DIV&gt;spamcop.net&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  bl.spamcop.net.&lt;/DIV&gt; &lt;DIV&gt;NJABL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  dnsbl.njabl.org.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Next, we need to define how to handle spam emails in  /etc/MailScanner/MailScanner.conf: &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Spam Actions = store forward &lt;A  href="mailto:admin@mydomain.com"&gt;admin@mydomain.com&lt;/A&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;The above instructs ms to store a copy of the incoming spam in quarantine  and also forward to &lt;A  href="mailto:admin@mydomain.com"&gt;admin@mydomain.com&lt;/A&gt;.&amp;nbsp; Alternatively, we  can simple discard them as below:&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Spam Actions = delete&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;To make the changes effective, we have to restart ms.&amp;nbsp; Mailscanner  will also restart itself regularly (see the 'Restart Every =' in  mailscanner.conf). &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-2104834316656740361?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/2104834316656740361/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/fight-spam-with-mailscanner.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/2104834316656740361?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/2104834316656740361?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/fight-spam-with-mailscanner.html" title="Fight spam with MailScanner" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEUCQHk4fCp7ImA9WhZaGUw.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-4810643531366228165</id><published>2011-07-06T09:38:00.000+08:00</published><updated>2011-07-06T09:37:41.734+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-06T09:37:41.734+08:00</app:edited><title>Difference between 800 and 400 toll-free numbers in China</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&lt;SPAN  style="LINE-HEIGHT: normal; WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; FONT-FAMILY: ; WHITE-SPACE: normal; ORPHANS: 2; COLOR: ; WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"  class=Apple-style-span&gt;&lt;SPAN style="TEXT-ALIGN: left; FONT-FAMILY: "  class=Apple-style-span&gt; &lt;DIV  style="PADDING-BOTTOM: 0px; LINE-HEIGHT: 11.1pt; MARGIN: 0px; PADDING-LEFT: 0px; WIDTH: 668px; PADDING-RIGHT: 0px; FLOAT: left; COLOR: ; CLEAR: both; PADDING-TOP: 0px"  class=postbody&gt; &lt;DIV  style="PADDING-BOTTOM: 1px; LINE-HEIGHT: 13.65pt; OVERFLOW-X: hidden; OVERFLOW-Y: hidden; MARGIN: 0px; MIN-HEIGHT: 38px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: ; COLOR: ; PADDING-TOP: 0px"  class=content&gt;&lt;FONT face="Trebuchet MS"&gt;&lt;FONT color=#333333&gt;&lt;SPAN  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; TEXT-DECORATION: ; PADDING-TOP: 0px"&gt;&lt;SPAN  style="PADDING-BOTTOM: 0px; LINE-HEIGHT: 23px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;&lt;FONT  style="FONT-SIZE: 15pt"&gt;&lt;U&gt;800 toll-free numbers&lt;/U&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT  face="Trebuchet MS"&gt;&lt;FONT color=#333333&gt;&lt;FONT style="FONT-SIZE: 9.8pt"&gt;800  toll-free numbers are commonly called "800 免费电话"， the official name is  "被叫集中付费业务" (called party collect paid service), which means the cost of the call  is borne not by the caller but by the party receiving the call.&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;800  toll-free numbers in China are ten-digit numbers beginning with "800". Three is  no prefix before "800". (In US, "1" must be used before "800" when dialing from  a landline).&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;800  toll-free numbers are not accessible to some mobile network  subscribers.&lt;/FONT&gt;&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;&lt;SPAN  style="PADDING-BOTTOM: 0px; LINE-HEIGHT: 23px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;&lt;SPAN  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; TEXT-DECORATION: ; PADDING-TOP: 0px"&gt;&lt;FONT  style="FONT-SIZE: 15pt"&gt;&lt;U&gt;400 toll-free numbers&lt;/U&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;&lt;/FONT&gt;&lt;FONT  style="FONT-SIZE: 9.8pt" color=#333333&gt;400 service is called "主被叫分摊付费业务"  (calling party and called party split-paid service), which means the calling  party pays for the local access fee and the called party pays the toll (long  distance) fee.&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;400  toll-free numbers in China are ten-digit numbers beginning with "400".&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;400  toll-free numbers can be accessed by all fixed-line and mobile phones.&lt;BR  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px"&gt;Callers  have to bear local access charges from their service  providers.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt; &lt;DIV  style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 11px; CLEAR: both; PADDING-TOP: 0px"  class=back2top align=right&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-4810643531366228165?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/4810643531366228165/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/difference-between-800-and-400-toll.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/4810643531366228165?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/4810643531366228165?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/07/difference-between-800-and-400-toll.html" title="Difference between 800 and 400 toll-free numbers in China" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUcCRn47fip7ImA9WhZbEU8.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-4739923351417115966</id><published>2011-06-15T15:31:00.001+08:00</published><updated>2011-06-15T15:31:07.006+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-15T15:31:07.006+08:00</app:edited><title>Archive both incoming and outgoing emails in Sendmail/MailScanner</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;With MailScanner, we can archive incoming or outgoing or both easily.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Firstly, we indicate a ruleset file in the 'Archive and Monitoring' section  of MailScanner.conf.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;/etc/MailScanner/MailScanner.conf:&lt;/DIV&gt; &lt;DIV&gt;#&lt;/DIV&gt; &lt;DIV&gt;# Mail Archiving and Monitoring&lt;/DIV&gt; &lt;DIV&gt;# -----------------------------&lt;/DIV&gt; &lt;DIV&gt;#&lt;/DIV&gt; &lt;DIV&gt;Archive Mail = %rules-dir%/archive.rules&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;In the ruleset file, we specify a location to where emails are  archived.&amp;nbsp; We can use 'From:/FromOrTo:/To:' to tell MS the scope of emails  to archive.&amp;nbsp; In this example, all incoming and outgoing emails are archived  to one single mbox file on daily basis. &lt;/DIV&gt; &lt;DIV&gt;/etc/MailScanner/rules/archive.rules:&lt;/DIV&gt; &lt;DIV&gt;FromOrTo:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  /path_of_the_storage_location/_DATE_.mbox&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;The mbox format is accessible by many email clients.&amp;nbsp; Please see &lt;A  href="http://kb.wisc.edu/wiscmail/page.php?id=6436"&gt;&lt;FONT  face=新細明體&gt;http://kb.wisc.edu/wiscmail/page.php?id=6436&lt;/FONT&gt;&lt;/A&gt;&lt;FONT  face=新細明體&gt; &lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-4739923351417115966?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/4739923351417115966/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/06/archive-both-incoming-and-outgoing.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/4739923351417115966?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/4739923351417115966?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/06/archive-both-incoming-and-outgoing.html" title="Archive both incoming and outgoing emails in Sendmail/MailScanner" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Dk4FRHszfSp7ImA9WhZUEEQ.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-6218906284508279247</id><published>2011-06-03T17:42:00.002+08:00</published><updated>2011-06-03T17:55:15.585+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-03T17:55:15.585+08:00</app:edited><title>Send fax over internet</title><content type="html">&lt;div dir=ltr&gt;&lt;div style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&lt;div&gt;Reasons:&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;There are a couple of reasons to send long-distance fax over  internet.&amp;nbsp; Cost saving should be the primary one.&amp;nbsp; As fax data is  transmitted over public internet, we do not need to pay IDD charge to telephone  company.&amp;nbsp; In other cases, we just want to bypass the premise-provided  telephone network, for instance, when we need to fax out from hotels or business  centers.&amp;nbsp; &lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;Apart from outbound fax, it can work in the reverse path; you can receive  fax over internet.&amp;nbsp; Some internet fax service providers offer national fax  numbers and forward incoming faxes over internet to you.&amp;nbsp; In other words,  it gives your sender the impression of faxing to a local number.&amp;nbsp; Isn't it  a beautiful feature?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;Nevertheless, you still have to pay some recurring charges such as  subscription and rental fees to the internet fax service provider.&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;How to put things together:&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;&lt;img  style="BACKGROUND-IMAGE: none; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px"  title=greenshot_2011-06-03_12-25-44 border=0 alt=fax-ip-explain  src="http://edm.zonetel.com/zoneedm/fax-ip-explain.png" width=644  height=310&gt;&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;A typical scenario of sending and receiving fax over internet is shown  above.&amp;nbsp; The fax machine on the left is the one you use for internet  faxing.&amp;nbsp; It connects to a small networked device (we call it ATA) instead  of a telephone socket on the wall.&amp;nbsp; The fax machine on the right is just an  ordinary one.&amp;nbsp; The diagram basically involves four elements.&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;ITSP – Internet telephony service provider&lt;/DIV&gt;&lt;div&gt;This is the company that routes fax calls over internet to and from your  fax machine.&amp;nbsp; You need to obtain a service account (we call it a SIP  account) from them and configure it in a small device (ATA) to work with your  fax machine.&amp;nbsp; The ITSP usually provides you a fax number for receiving  fax.&amp;nbsp; Some examples of such ITSP are &lt;a  href="http://www.didforsale.com"&gt;www.didforsale.com&lt;/A&gt;, &lt;a  href="http://www.didww.com"&gt;www.didww.com&lt;/A&gt;, &lt;a  href="http://www.zonetel.com"&gt;www.zonetel.com&lt;/A&gt;.&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;Telephone network – the part A above&lt;/DIV&gt;&lt;div&gt;It refers to the public switched telephone network (PSTN) that we use from  day to day.&amp;nbsp; Our mobiles, landlines and fax machines are communicated  within the PSTN.&amp;nbsp; The ITSP is usually a gateway (or it lines up another in  behind) to PSTN and therefore could terminate your fax to and receive from an  ordinary fax machine (the one on the right).&amp;nbsp; &lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;Internet – the part B above&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;ATA – analogue terminal adatpor&lt;/DIV&gt;&lt;div&gt;It is provided by the ITSP and its purpose is connect your fax machine to  them.&amp;nbsp; It is a small device that provides two ports, one for connecting  your fax machine and one for internet connection.&amp;nbsp; Usually, the ATA device  is pre-configured with a SIP account. The SIP account identifies you as a  customer to them.&amp;nbsp; &lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;Now, you operate your fax machine as usual and the internet part is handled  by the ITSP.&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;More...:&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;We all heard or used Skype or similar products that transmit voice over  internet to save phone bills.&amp;nbsp; We might not aware that the internet is not  a stable and controllable environment in respect of bandwidth and latency.&amp;nbsp;  Nowadays, voice over internet could be optimized by various techniques such as  lossy codecs and jitter buffer to control the demand of bandwidth and handle  network delay.&amp;nbsp; These are practical solutions because we are talking about  voice&amp;nbsp; -- in fact, our ears still perceive good quality even there is data  loss technically.&amp;nbsp; However, fax is different.&amp;nbsp; Fax machines need much  better accuracy in order to handshake, to negotiate speed and to successfully  transmit.&amp;nbsp; To tackle problems of fax over IP, a protocol named T.38 is  developed by ITU.&amp;nbsp; The virtue of this protocol is it encapsulates the  original T.30 fax protocol in IP packets.&amp;nbsp; Both sending and receiving fax  machines are then thinking they are talking to a genuine fax.&amp;nbsp; T.38 is  supported by many ITSP and ATA.&amp;nbsp; It is by now the industry standard of  FOIP.&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;Yet the world is no perfect.&amp;nbsp; Even with T.38 enabled, we sometimes see  failed transmission when internet bandwidth is unstable.&amp;nbsp; In addition, high  speed transmission (such as the V.34 33.6kpbs) is not well supported in  practice.&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-6218906284508279247?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/6218906284508279247/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/06/send-fax-over-internet.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/6218906284508279247?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/6218906284508279247?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/06/send-fax-over-internet.html" title="Send fax over internet" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEQBRX46cCp7ImA9WhZWFU8.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-9110149733646225590</id><published>2011-05-16T14:15:00.000+08:00</published><updated>2011-05-16T14:12:34.018+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-16T14:12:34.018+08:00</app:edited><title>Answer monitoring when the PSTN side does not support reverse polarity</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;In many circumstances, we need to know whether a pstn call is answered or  not after dial out, for example, to start billing.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;It would be a simple case when both pstn side and our fxo gateway support  reverse polarity such that we could literally obtain a correct asterisk variable  ${DIALSTATUS}.&amp;nbsp; As illustrated below,&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;exten =&amp;gt; _X,n,dial(sip/gw/${EXTEN},g)&lt;/DIV&gt; &lt;DIV&gt;exten =&amp;gt; _X.n,noop(${DIALSTATUS}&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;After the call is finished (use of the 'g' option), in the next priority in  the dial plan, we check the ${DIALSTATUS} for ANSWER,BUSY,NOANSWER,CONGESTION,  etc.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;However, we sometimes see cases where DIALSTATUS is always ANSWER because  reverse polarity is not supported in either parties and the fxo gateway just  returns 200 OK at every callout regardless whether call is actually answered.  &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;To circumvent this situation, we could use BackgroundDetect as an  approximate answer detection mechanism.&amp;nbsp; It is approximate because call  answer is not determined by circuit signal, but by detecting human answer  pattern.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;For instance, If we initiate outbound calls via call file, we could bridge  the always answered call to BackgroundDetect.&lt;/DIV&gt; &lt;DIV&gt;Channel: SIP/gw/XXXXXXXX&lt;/DIV&gt; &lt;DIV&gt;Context: outbound&lt;/DIV&gt; &lt;DIV&gt;Extension: answer_monitor&lt;/DIV&gt; &lt;DIV&gt;Priority:1&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;exten =&amp;gt;  answer_monitor,n,BackgroundDetect(silence/10,1000,50,4000)&lt;/DIV&gt; &lt;DIV&gt;exten =&amp;gt; answer_monitor,n,noop('machine')&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;exten =&amp;gt; talk,1,noop('human')&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;In our  scenario, the application BackgroundDetect plays a silence of 10s during which  noise is monitored in the receiving direction.&amp;nbsp; If it detects any noise  period of length between 50ms and 4000ms, followed by a silence of 1000ms, it  jumps to the talk extension.&amp;nbsp; The figures above are assumed to reflect  typical human 'hello'.&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-9110149733646225590?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/9110149733646225590/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/05/answer-monitoring-when-pstn-side-does.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/9110149733646225590?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/9110149733646225590?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/05/answer-monitoring-when-pstn-side-does.html" title="Answer monitoring when the PSTN side does not support reverse polarity" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEEBRHwzcSp7ImA9WhZQGEU.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-2949166331736731268</id><published>2011-04-27T14:46:00.000+08:00</published><updated>2011-04-27T14:44:15.289+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-27T14:44:15.289+08:00</app:edited><title>How to setup Elastix SIP trunk with ZONETEL's DID service.</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;There are increasing number  of Elastix customers connecting to ZONE's DID service.&amp;nbsp; Here below  highlights the major steps.&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;First, we need to define the  SIP trunk for inbound/outbound calls.&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;  Basic&amp;gt;Trunks&amp;gt;Add Trunk&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;General Settings&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;----------------------&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Outbound callerid =  5804xxxx&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Outgoing Settings&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;------------------------&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Peer details at least  contains below:&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;host=&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A  href="http://1511.zonetel.com"&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; TEXT-DECORATION: ; mso-spacerun: 'yes'"&gt;&lt;FONT  color=#0000ff&gt;1511.zonetel.com&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;type=peer&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;permit=&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A  href="http://202.130.146.96/255.255.255.224"&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; TEXT-DECORATION: ; mso-spacerun: 'yes'"&gt;&lt;FONT  color=#0000ff&gt;202.130.146.96/255.255.255.224&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Defaultexpiry=600&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;We also need to define the  register information for incoming call.&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Incoming Settings&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;-----------------------&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Register string has to  contains:&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;5804xxxx:your sip  pwd@&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="http://1511.zonetel.com"&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; TEXT-DECORATION: ; mso-spacerun: 'yes'"&gt;&lt;FONT  color=#0000ff&gt;1511.zonetel.com&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Then we need to define a  route to use the outbound SIP trunk.&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;  Basic&amp;gt;Outbound Routes&amp;gt;Add Routes&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;;; if you dial 9 to call out  via sip, etc.&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Dial Patterns=&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;9|.&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Trunk Sequence=&amp;lt;the trunk  created in 1&amp;gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;And a route for incoming  call.&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;3.Inbound Call  Control&amp;gt;Inbound Routes&amp;gt;Add Incoming Route&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;DID  number=5804xxxx&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt; TEXT-AUTOSPACE: " class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;Extensions=&amp;lt;the extension  to answer inbound call from 5804xxxx&amp;gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; COLOR: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-2949166331736731268?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/2949166331736731268/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/04/how-to-setup-elastix-sip-trunk-with.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/2949166331736731268?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/2949166331736731268?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/04/how-to-setup-elastix-sip-trunk-with.html" title="How to setup Elastix SIP trunk with ZONETEL's DID service." /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DE8AR3kzcSp7ImA9WhZQEUw.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-2372280774791914203</id><published>2011-04-18T16:56:00.000+08:00</published><updated>2011-04-18T16:54:06.789+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-18T16:54:06.789+08:00</app:edited><title>Local Channel</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;Asterisk provides an easy way to turn any extension into a device such that  we can Dial to and therefore can make use of the dial plan processing.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;One example use is with call file.&amp;nbsp; We can create callfiles to  telebroadcast a range of numbers with some processing (eg least cost  routing).&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Channel: &lt;A  href="mailto:Local/XXXXXXXXXXX@lcr/n"&gt;Local/XXXXXXXXXXX@lcr/n&lt;/A&gt;&lt;/DIV&gt; &lt;DIV&gt;Applcation:&amp;nbsp;&amp;nbsp;&amp;nbsp; Playback&lt;/DIV&gt; &lt;DIV&gt;Data:greetings_msg&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;in our context [lcr],&amp;nbsp; we can choose different sip/dahdi routes  depending on the destination.&lt;/DIV&gt; &lt;DIV&gt;exten =&amp;gt; _852XXXXXXXX, 1, Dial(SIP/${EXTEN},S(10))&lt;/DIV&gt; &lt;DIV&gt;exten =&amp;gt; _853XXXXXXXX, 1, Dial(DAHDI/g1/${EXTEN},S(10))&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Under many circumstances, we include '/n' in the local channel.&amp;nbsp; This  switch instructs the local channel NOT to optimize out from the call path,  otherwise, the channel variables and parameters used in the destination Dial()  would not be available.&amp;nbsp; As in the case above, if '/n' is not used, the  'S(10)' is not effective.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-2372280774791914203?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/2372280774791914203/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/04/local-channel.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/2372280774791914203?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/2372280774791914203?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/04/local-channel.html" title="Local Channel" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0MBSX84fip7ImA9WhZSFEU.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-4102449660597318855</id><published>2011-03-30T18:39:00.000+08:00</published><updated>2011-03-30T18:37:38.136+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-30T18:37:38.136+08:00</app:edited><title>MailScanner Mail Archiving</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV  style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"&gt; &lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;System administrators usually face requests from user departments to  retrieve backups of incoming or even outgoing emails.&amp;nbsp; The MailScanner  provides some powerful options to archive both incoming and outgoing emails to  email, directory or mbox files.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;To turn on mail archiving, we use the 'Archive Mail' option.&amp;nbsp; It  accepts a archive destination or a ruleset file as value.&amp;nbsp; For  example:&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Archive Mail = %rules-dir%/archive.rules&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Ruleset allows more control on which and how emails are archived.&amp;nbsp; In  the ruleset below.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;FromOrTo:&amp;nbsp;&amp;nbsp;&amp;nbsp; user1&lt;A  href="mailto:user1@yourdomain.com"&gt;@yourdomain.com&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  /var/spool/mailarchive/_DATE_.mbox&lt;/DIV&gt; &lt;DIV&gt;To:&amp;nbsp;&amp;nbsp;&amp;nbsp; user2&lt;A  href="mailto:user2@yourdomain.com"&gt;@yourdomain.com&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A  href="mailto:backupemail@yourdomain.com"&gt;backupemail@yourdomain.com&lt;/A&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;* Emails sent to &lt;A  href="mailto:user2@yourdomain.com"&gt;user2@yourdomain.com&lt;/A&gt; will be bcc to &lt;A  href="mailto:backupemail@yourdomain.com"&gt;backupemail@yourdomain.com&lt;/A&gt;.&lt;/DIV&gt; &lt;DIV&gt;* Emails originated from or sending to &lt;A  href="mailto:user1@yourdomain.com"&gt;user1@yourdomain.com&lt;/A&gt; will be archived as  one mbox file per day in /var/spool/mailarchive.&amp;nbsp; The _DATE_ token will be  replaced with current day in yyyymmdd format.&amp;nbsp; There are other tokens  available: _HOUR_, _TOUSER_, _TODOMAIN_, _FROMUSER_, _FROMDOMAIN_.&lt;/DIV&gt; &lt;DIV&gt;* Note that mbox file is created when 'Missing Mail Archive Is = file' is  specified in the MailScanner.conf.&amp;nbsp; Otherwise, ms assumes that the location  is a directory and archives emails as queue files under it.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;To make changes effective, we need to restart MailScanner.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;service sendmail stop&lt;/DIV&gt; &lt;DIV&gt;service MailScanner stop&lt;/DIV&gt; &lt;DIV&gt;service MailScanner start&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;We stop sendmail manually to ensure that it is brought up by MailScanner so  that ms can intercepts and filters emails before the smtp  daemon.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-4102449660597318855?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/4102449660597318855/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/03/mailscanner-mail-archiving.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/4102449660597318855?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/4102449660597318855?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/03/mailscanner-mail-archiving.html" title="MailScanner Mail Archiving" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0YDSXo8eip7ImA9WhZTFkQ.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-5155971931325603307</id><published>2011-03-21T17:21:00.000+08:00</published><updated>2011-03-21T17:19:38.472+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-21T17:19:38.472+08:00</app:edited><title>Guideline to setup SIP trunk with ZONETEL</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;It is quite often to have customers inquiring the sip trunk configuration  issues with ZONETEL.&amp;nbsp; Here is some useful information for reference.&amp;nbsp;  Usually the tricky part is with NAT and firewall ports, which leads to one-way  audio or no audio at all.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;H2 style="LINE-HEIGHT: 28pt; MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt"&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT face=Arial&gt;&lt;FONT  style="FONT-SIZE: 16pt"&gt;Sample sip.conf (it applies to asterisk  1.4.x)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/H2&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;[general]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Defaultexpiry=600&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;[zonetel]&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Username=&amp;lt;provided by zonetel&amp;gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Fromuser=&amp;lt;provided by zonetel&amp;gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Secret=&amp;lt;provided by zonetel&amp;gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Host=&amp;lt;the sip register server  provided&amp;gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Type=friend&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Qualify=yes&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Insecure=very&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;canreinvite=no&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Disallow=all&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Allow=alaw&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face="Times New Roman"&gt;Allow=ulaw&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&amp;nbsp;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&amp;nbsp;&lt;/P&gt; &lt;H2 style="LINE-HEIGHT: 28pt; MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt"&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT face=Arial&gt;&lt;FONT  style="FONT-SIZE: 16pt"&gt;Ports required&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/H2&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT face="Times New Roman"&gt;Of  course, your firewall needs to allow 5060 tcp/udp for sip  signaling&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="MARGIN: 0pt" class=p0&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT face="Times New Roman"&gt;And have  to make sure that UDP ports are also allowed to the zonetel  subnet&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;FONT  face=SimSun&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN  style="FONT-FAMILY: ; mso-spacerun: 'yes'"&gt;&lt;/SPAN&gt;&lt;/P&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-5155971931325603307?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/5155971931325603307/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/03/guideline-to-setup-sip-trunk-with.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/5155971931325603307?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/5155971931325603307?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/03/guideline-to-setup-sip-trunk-with.html" title="Guideline to setup SIP trunk with ZONETEL" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkANSXY5fip7ImA9Wx9VEEw.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-5139180380750651809</id><published>2011-01-26T12:07:00.000+08:00</published><updated>2011-01-26T12:06:38.826+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-26T12:06:38.826+08:00</app:edited><title>AgentLogin vs AgentCallbackLogin</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;Asterisk call queue provides the mechansim to deliver incoming calls to a  group of agents.&amp;nbsp; Before agent can receive calls, he/she must login the  queue.&amp;nbsp; There are two types of agent login commands: AgentLogin() and  AgentCallbackLogin()&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;Here below shows the differences between these two commands.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;Purpose&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;AgentCallbackLogin&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Allows agent to tell Asterisk where he is located (ie the extension).&amp;nbsp;  He will be called back by the Queue() application later and there is no need to  keep the phone off-hook. &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;AgentLogin&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Agent phone is permanently off-hook.&amp;nbsp; Agent just waits to be called  and does not need key press to answer calls.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;How agent login&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;AgenCallbackLogin&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Call AgentCallbackLogin().&amp;nbsp; Asterisk will ask for agent id, password  and extension if these are not provided.&amp;nbsp; Agent phone is then hangup,  waiting to be called back.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;AgentLogin&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Call AgentLogin() and note that agent phone is then off-hook until agent  logoff.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;How agent receive calls&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;AgentCallbackLogin&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Agent phone will ring upon incoming call.&amp;nbsp;&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;AgentLogin&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Agent phone is permanently off-hook (online).&amp;nbsp; When call comes in,  agent will hear 'beep' sound and is then connected to the customer.&amp;nbsp; Agent  can press * to dump the call.&amp;nbsp; One advantage of using AgentLogin() is that  agent does not need to operate the handset to answer/hangup calls.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;How agent logout&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;AgentCallbackLogin&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;Needs to call again the AgentCallbackLogin().&amp;nbsp; Asterisk will prompt to  logout.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;U&gt;AgentLogin&lt;/U&gt;&lt;/DIV&gt; &lt;DIV&gt;When agent hangups, he is logged out automatically&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;STRONG&gt;Callerid&lt;/STRONG&gt;&lt;/DIV&gt; &lt;DIV&gt;Customer callerid is not shown when using AgentLogin().&amp;nbsp; It is  available only with AgentCallbackLogin(). &lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-5139180380750651809?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/5139180380750651809/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/01/agentlogin-vs-agentcallbacklogin.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/5139180380750651809?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/5139180380750651809?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/01/agentlogin-vs-agentcallbacklogin.html" title="AgentLogin vs AgentCallbackLogin" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUQBQXs9eip7ImA9Wx9WFE0.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-8250394574946058237</id><published>2011-01-19T10:16:00.000+08:00</published><updated>2011-01-19T10:15:50.562+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-19T10:15:50.562+08:00</app:edited><title>Agent log off sometimes does not work</title><content type="html">&lt;DIV dir=ltr&gt; &lt;DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt; &lt;DIV&gt;Some of our clients are using asterisk 1.4.x and occasionally find that  agent logoff could not successfully log off an agent.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;asterisk –rvvv&lt;/DIV&gt; &lt;DIV&gt;cli&amp;gt; agent logoff agent/xxxx&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;even the logoff command is executed, calls are still delivered to the  agent.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;in this situation, we could take a step further to unset the asterisk  variable of agent/extension binding.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;asterisk –rvvv&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;CLI&amp;gt;core show globals&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&lt;FONT face=新細明體&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;then we look for &lt;FONT size=2 face=Arial&gt;global variables :  AGENTBYCALLERID_&amp;lt;ext&amp;gt; = agentid&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;and clear the corresponding variable as  below:&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&lt;FONT face=新細明體&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;CLI&amp;gt;core set global AGENTBYCALLERID_&amp;lt;ext&amp;gt;  ""&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;FONT face=新細明體&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;We've implemented the above logic in an ivr option for a few call center  administrators to force logout agent.&amp;nbsp; &lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV  style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"&gt;www.zonetel.com&lt;BR&gt;VOIP/SIP&lt;BR&gt;DID&lt;BR&gt;ASTERISK  PBX&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-8250394574946058237?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/8250394574946058237/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/01/agent-log-off-sometimes-does-not-work.html#comment-form" title="2 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/8250394574946058237?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/8250394574946058237?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2011/01/agent-log-off-sometimes-does-not-work.html" title="Agent log off sometimes does not work" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DU8MRXwzeyp7ImA9Wx9SFk0.&quot;"><id>tag:blogger.com,1999:blog-6577033807106384315.post-5119941591483445744</id><published>2010-12-06T12:02:00.000+08:00</published><updated>2010-12-06T11:58:04.283+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-06T11:58:04.283+08:00</app:edited><title>How to use dovecot expire plugin</title><content type="html">&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Here I explain how to configure and use the expire  plugin with dovecot.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;We have a platform as below.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Fedora release 13 (Goddard)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT  face=Arial size=2&gt;dovecot&amp;nbsp;1.2.16:&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;1.In the first place, in /etc/dovecot.conf, we have  to enable the use of expire plugin.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;protocol pop3 {&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp; mail_plugins = expire&lt;BR&gt;}&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;protocol lda {&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp; mail_plugins = expire&lt;BR&gt;}&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;protocol imap {&lt;/DIV&gt; &lt;DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp; mail_plugins =  expire&lt;BR&gt;}&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;dict {&lt;BR&gt;&amp;nbsp; expire = mysql:/etc/dovecot-dict-expire.conf&lt;/DIV&gt; &lt;DIV&gt;}&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;# it specifies that mails saved in INBOX, Trash and Spam are to be expired  after 15 days&lt;/DIV&gt; &lt;DIV&gt;plugin {&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp; expire = Trash 15 Spam 15 INBOX 15&lt;BR&gt;&amp;nbsp; expire_dict =  proxy::expire&lt;BR&gt;}&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;2.Secondly, we tell the plugin&amp;nbsp;where to keep the timestamp.&amp;nbsp; In  this example,&amp;nbsp;we use a mysql table named&amp;nbsp;mails.expires.&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;cat /etc/dovecot-dict-expire.conf&lt;BR&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;connect = host=localhost dbname=mails user=username  password=password&lt;BR&gt;map {&lt;BR&gt;&amp;nbsp; pattern =  shared/expire/$user/$mailbox&lt;BR&gt;&amp;nbsp; table = expires&lt;BR&gt;&amp;nbsp; value_field =  expire_stamp&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp; fields {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; username =  $user&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mailbox = $mailbox&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;}&lt;BR&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;The&amp;nbsp;table would look like this.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;mysql&amp;gt; show create table  expires&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;  ;&lt;BR&gt;+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;BR&gt;|  Table&amp;nbsp;&amp;nbsp; | Create  Table&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  |&lt;BR&gt;+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;BR&gt;|  expires | CREATE TABLE `expires` (&lt;BR&gt;&amp;nbsp; `username` varchar(75) NOT  NULL,&lt;BR&gt;&amp;nbsp; `mailbox` varchar(255) NOT NULL,&lt;BR&gt;&amp;nbsp; `expire_stamp`  int(11) NOT NULL,&lt;BR&gt;&amp;nbsp; PRIMARY KEY (`username`,`mailbox`)&lt;BR&gt;)  ENGINE=MyISAM DEFAULT CHARSET=latin1  |&lt;BR&gt;+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;BR&gt;1  row in set (0.03 sec)&lt;BR&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;3.We have to make sure that mysql is supported by  dovecot.&amp;nbsp; &lt;/DIV&gt;&lt;/FONT&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;yum install dovecot-mysql&lt;BR&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;4.After restarting dovecot, we shall soon see some  entries in the table expires upon&amp;nbsp;emails being saved to INBOX, Trash and  Spam.&amp;nbsp; They represent the timestamp before which emails should be  expunged.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;mysql&amp;gt; select * from  expires;&lt;BR&gt;+----------------+---------+--------------+&lt;BR&gt;|  username&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | mailbox | expire_stamp  |&lt;BR&gt;+----------------+---------+--------------+&lt;BR&gt;|&amp;nbsp;tina&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  | INBOX&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; 1294191607 |&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;|&amp;nbsp;louise&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |  INBOX&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; 1294197182 |&lt;BR&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/FONT&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;5.The plugin is responsible to keep track of  timestamp.&amp;nbsp; The actual expungement is carried out by:&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;/usr/sbin/dovecot --exec-mail ext  /usr/libexec/dovecot/expire-tool&lt;BR&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Usually, we&amp;nbsp;run&amp;nbsp;this command in daily  cron job.&lt;/DIV&gt;&lt;/FONT&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;What if we have emails in mbox before the plugin is  enabled?&amp;nbsp; They will be expunged accordingly&amp;nbsp;when the first expungement  takes place.&amp;nbsp; The expire-tool finds satisfying emails according to the  timestamp in mysql and that will include those emails exist there  before&amp;nbsp;our expire plugin is implemented.&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;Note that&amp;nbsp;we can use /usr/sbin/dovecot --exec-mail ext  /usr/libexec/dovecot/expire-tool --test to verify what would be executed before  change is made.&amp;nbsp;&lt;BR&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;6.It is a good idea to turn on dovecot logging if  you find the plugin not working.&lt;/DIV&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Arial  size=2&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;# Log file to use for error messages, instead of  sending them to syslog.&lt;BR&gt;# /dev/stderr can be used to log into  stderr.&lt;BR&gt;log_path = /var/log/dovecot.err&lt;BR&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;For example, if you see something like  '&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;dict: Error: Unknown dict module: mysql' in the  log, then you know that dovecot-mysql is not installed.&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6577033807106384315-5119941591483445744?l=asterisk-in-practice.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://asterisk-in-practice.blogspot.com/feeds/5119941591483445744/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://asterisk-in-practice.blogspot.com/2010/12/how-to-use-dovecot-expire-plugin.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/5119941591483445744?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6577033807106384315/posts/default/5119941591483445744?v=2" /><link rel="alternate" type="text/html" href="http://asterisk-in-practice.blogspot.com/2010/12/how-to-use-dovecot-expire-plugin.html" title="How to use dovecot expire plugin" /><author><name>Derek LAM</name><uri>http://www.blogger.com/profile/18117605282868765530</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/_3nrxkI_FX6I/S7is1u2RqWI/AAAAAAAAAF4/lY3e8d57Vm8/S220/IMG_0401.JPG" /></author><thr:total>0</thr:total></entry></feed>

