Delicious      Technorati      Blinklist      Furl      Reddit

TimeTrex Time and Attendance

TimeTrex Time and Attendance


* FAQ    * Search
* Login   * Register

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Jul 06, 2016 2:17 am 
Offline

Joined: Mon Dec 01, 2014 7:12 am
Posts: 2
As given below this currently onyl works for the North Americal numbering plan:
Code:
//Caller ID numbers can come in in all sorts of forms:
// 2505551234
// 12505551234
// +12505551234
// (250) 555-1234
//Parse out just the digits, and use only the last 10 digits.
//Currently this will not support international numbers
static function parseCallerID( $number ) {
   $validator = new Validator();
   $retval = substr( $validator->stripNonNumeric( $number ), -10, 10 );
   return $retval;
}

Per the following:
http://stackoverflow.com/questions/7235 ... n-sql-varc
http://www.itu.int/ITU-T/recommendation ... ?rec=E.164
this worked for me:
Code:
static function parseCallerID( $number ) {
   $validator = new Validator();
   $retval = substr( $validator->stripNonNumeric( $number ), -15);
   return $retval;
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Time and Attendance




Powered by phpBB® Forum Software © phpBB Group