Thursday, May 15, 2014

Retransmission timeout error - SIP NAT issue

when you have this problem in the /var/log/asterisk/full as below .....

[May 15 15:29:09] WARNING[2376] chan_sip.c: Retransmission timeout reached on transmission ZTlmMDZlNjk1ODVkNWU5ZGRlNmI2ZWFhZGM5MDU5NGY. for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6401ms with no response
[May 15 15:29:09] WARNING[2376] chan_sip.c: Hanging up call ZTlmMDZlNjk1ODVkNWU5ZGRlNmI2ZWFhZGM5MDU5NGY. - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
[May 15 15:29:09] VERBOSE[2420][C-00000000] res_agi.c:     -- AGI Script a2billing.php completed, returning 4
[May 15 15:29:09] VERBOSE[2420][C-00000000] pbx.c:   == Spawn extension (PSTNOutBound, 60383215500, 9) exited non-zero on 'SIP/5106-00000000'

It was due to /var/www/html/admin/modules/core/etc/sip.conf
externip= (MUST SET TO THE CORRECT EXTERNAL IP Address)

Tuesday, May 13, 2014

How to plan order for new domain on ip serverone

Login to https://portal.ipserverone.com/customer/account/login_owner
login - checkerbox88@gmail.com
password - XXXXXXX
Buy a new domain and picking back on the existing host - RM38
Paid thru maybank2u and now waiting for their sales to revert on the domain registration

How to setup eFax and problems encountered

Refer to the google internet information to setup efax
Problem and remain unresolved - license issue, codec incompatibility especially on unifi pstn line
It seems it's working ok on the P1 trunk.

Nevertheless, in order to support multitenant in elastix, we will have to make changes on the
faxviewer, fax queue and send fax.

faxviewer files modified

/var/www/html/modules/faxviewer/libs/paloSantoFaxVisor.class.php



Friday, January 17, 2014

how does mail works in asterisk / centos ?

1. setup the postfix

cd /etc/postfix

a)download ca-bundle.crt
b)enter the following into generic

c)postmap /etc/postfix/generic
d)edit main.cf  <-- in="" key="" name="" p="" router="" server="" smtp="" the="">e) postmap /etc/postfix/sasl_passwd
/etc/init.d/postfix restart

2. Test the mail

mail -s "Hello World" XXXXXX@yahoo.com -- -f"sender address" -F"sender name"

/usr/share/a2billing/Cronjobs/a2billing_batch_autodialer.php create a lot of dummy mail to vm@vioblue.com

what is the functions of a2billing_batch_autodialer ?

1. Check on the /etc/crontab
[root@ip-10-142-157-15 cron]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

5 * * * * /usr/bin/perl /var/monitortools/checkconf.pl


and there are also schedule jobs within each of those hourly, daily, weekly and monthly. 

Other than the above, you shall also check on the /var/spool/cron
in this directory, your will find those users who has cron job setup e.g asterisk 


How to login in as owner for the happy diary and post new blog ?

Although the blog was created back in 2009 but things had changed over the past few years. including the way how you can login in as owner of your own blog.

1. access to your own blog site http://khlee-happydiary.blogspot.com/
2. Click on the top right corner - Sign In
3. You will see one google, one account, change the manage account for this device
4. key in kwonghong@yahoo and password XXXXXXXX
5. then you can start posting new blog ... Great !!

Sunday, December 22, 2013

How to create a new facebook app and to be attached to facebook tab

1) you need to register as facebook developer
a) Login as kwonghong@yahoo.com
b) Refer to the

c) create a new app and choose the Facebook app and page tab app type.

Now you need to specify the URL for your app ? next step ..

2) You need to create a new app via heroku.
Login to a ubuntu server and create a directory as show below

Since this is a free acount, you can only create up to 5 applications

cd ~/heroku/cornery4
git init
git add
git status
git commit -m "add app"
heroku create
git push heroku master

if you want upload a new code, do the following

git add
git commit -m "add app"
git push heroku master

3) one of the requirement is able to send email from heroku. The latter doesn't allow SMTP server hence you need to install "add on". For this example, I have installed "SendGrid" add on and also need to add the following into your code.

$url = 'http://sendgrid.com/';
$user = 'app20508217@heroku.com';
$pass = '9wfghcrn';
$params = array(
      'api_user' => $user,
      'api_key' => $pass,
      'to' => 'info@cornery.com.my',
      'subject' => 'Franchise Enquiry',
      'html' => $email_message,
      'text' => 'Franchise',
      'from' => $iemail,
   );
$request = $url.'api/mail.send.json';
 // Generate curl request
 $session = curl_init($request);
 // Tell curl to use HTTP POST
 curl_setopt ($session, CURLOPT_POST, true);
 // Tell curl that this is the body of the POST
 curl_setopt ($session, CURLOPT_POSTFIELDS, $params);
 // Tell curl not to return headers, but do return the response
 curl_setopt($session, CURLOPT_HEADER, false);
 curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
 // obtain response
 $response = curl_exec($session);
 curl_close($session);
4) I have created two facebook tabs - franchise and special events.
Franchise is at ~heroku/cornery3
Special Event ~heroku/cornery4