write to sms history DB table