Get number

@return Phone number in E.164 format | null on error
195387
@SuppressWarnings("unused")
    public String getNumber() {
        Phonenumber.PhoneNumber phoneNumber = getPhoneNumber();

        if (phoneNumber == null) {
            return null;
        }

        return mPhoneUtil.format(phoneNumber, PhoneNumberUtil.PhoneNumberFormat.E164);
    }
1176129
public static final PhoneNumberServiceAsync getPhoneNumberService() { // NOPMD it's thread save!
    if (ServiceFactory.phoneNumberService == null) {
      synchronized (PhoneNumberServiceAsync.class) {
        if (ServiceFactory.phoneNumberService == null) {
          ServiceFactory.phoneNumberService = GWT.create(PhoneNumberServiceAsync.class);
        }
      }
      final PathDefinitionInterface pathDefinition = GWT.create(PathDefinitionInterface.class);
      ((RestServiceProxy) ServiceFactory.phoneNumberService)
          .setResource(new Resource(pathDefinition.getRestBasePath() + "/" + PhoneNumber.ROOT));
    }
    return ServiceFactory.phoneNumberService;
  }
392265
public String getNumber() {
    if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_number == null)
      jcasType.jcas.throwFeatMissing("number", "de.julielab.jules.types.PronounFeats");
    return jcasType.ll_cas.ll_getStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_number);}
606929
public String
getErrorString() {
	checkDone();
	if (error != null)
		return error;
	switch (result) {
		case SUCCESSFUL:	return "successful";
		case UNRECOVERABLE:	return "unrecoverable error";
		case TRY_AGAIN:		return "try again";
		case HOST_NOT_FOUND:	return "host not found";
		case TYPE_NOT_FOUND:	return "type not found";
	}
	throw new IllegalStateException("unknown result");
}
174444
public function format($my_number = '', $my_format = '')
    {
        if (empty($my_number)) {
            return NULL;
        }
        try {
            $phoneNumber = new PhoneNumber();
            $phoneNumber->setDebugStatus($this->DEBUG);
            $phoneNumber->setLoggerPath($this->loggerPath);
            $phoneNumber->__construct();
            $result = $phoneNumber->format(trim($my_number), trim($my_format));
            $this->_debug->info(__FUNCTION__, 'Result: ' . $result);

            return $result;
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            if (function_exists('log_message')) {
                log_message('error', $message);
            }
            $this->_debug->error(__FUNCTION__, $message);

            return $my_number;
        }
    }
1256629
private synchronized String getCallerId10()
    {
        final String[] parsedCallerId;

        if (!callerIdCreated)
        {
            rawCallerId = request.get("callerid");
            callerIdCreated = true;
        }

        parsedCallerId = AstUtil.parseCallerId(rawCallerId);
        if (parsedCallerId[1] == null)
        {
            return parsedCallerId[0];
        }
        return parsedCallerId[1];
    }
896032
public function getReasonCode()
    {
        $code = null;

        if (isset($this->data['messages'])) {
            // In case of a successful transaction, a "messages" element is present
            $code = (string)$this->data['messages']['message']['code'];
        }

        return $code;
    }
449319
@JsonValue
	@SuppressWarnings("unchecked")
	public <T> T get(){
		return (T) (this.isString ? (String)this.value : (Number)this.value);
	}
25320
@Override
    public String getMessage() {
        String message = super.getMessage();

        if (message == null) {
            message = "";
        }

        if (hexdump != null) {
            return message + (message.length() > 0 ? " " : "") + "(Hexdump: "
                    + hexdump + ')';
        }

        return message;
    }
708340
public String getResponseCodeDetail() {
    if( this.responseCode == null )
      return null;

    if( this.responseCode == 10001 )
      return "General undefined response";
    if( this.responseCode == 10002 )
      return "Still waiting on something.";
    if( this.responseCode == 20000 )
      return "General success response.";
    if( this.responseCode == 40000 )
      return "General problem with data.";
    if( this.responseCode == 40001 )
      return "General problem with payment data.";
    if( this.responseCode == 40100 )
      return "Problem with credit card data.";
    if( this.responseCode == 40101 )
      return "Problem with cvv.";
    if( this.responseCode == 40102 )
      return "Card expired or not yet valid.";
    if( this.responseCode == 40103 )
      return "Limit exceeded.";
    if( this.responseCode == 40104 )
      return "Card invalid.";
    if( this.responseCode == 40105 )
      return "Expiry date not valid.";
    if( this.responseCode == 40106 )
      return "Credit card brand required.";
    if( this.responseCode == 40200 )
      return "Problem with bank account data.";
    if( this.responseCode == 40201 )
      return "Bank account data combination mismatch.";
    if( this.responseCode == 40202 )
      return "User authentication failed.";
    if( this.responseCode == 40300 )
      return "Problem with 3d secure data.";
    if( this.responseCode == 40301 )
      return "Currency / amount mismatch";
    if( this.responseCode == 40400 )
      return "Problem with input data.";
    if( this.responseCode == 40401 )
      return "Amount too low or zero.";
    if( this.responseCode == 40402 )
      return "Usage field too long.";
    if( this.responseCode == 40403 )
      return "Currency not allowed.";
    if( this.responseCode == 50000 )
      return "General problem with backend.";
    if( this.responseCode == 50001 )
      return "Country blacklisted.";
    if( this.responseCode == 50002 )
      return "IP address blacklisted.";
    if( this.responseCode == 50003 )
      return "Anonymous IP proxy used.";
    if( this.responseCode == 50100 )
      return "Technical error with credit card.";
    if( this.responseCode == 50101 )
      return "Error limit exceeded.";
    if( this.responseCode == 50102 )
      return "Card declined by authorization system.";
    if( this.responseCode == 50103 )
      return "Manipulation or stolen card.";
    if( this.responseCode == 50104 )
      return "Card restricted.";
    if( this.responseCode == 50105 )
      return "Invalid card configuration data.";
    if( this.responseCode == 50200 )
      return "Technical error with bank account.";
    if( this.responseCode == 50201 )
      return "Card blacklisted.";
    if( this.responseCode == 50300 )
      return "Technical error with 3D secure.";
    if( this.responseCode == 50400 )
      return "Decline because of risk issues.";
    if( this.responseCode == 50500 )
      return "General timeout.";
    if( this.responseCode == 50501 )
      return "Timeout on side of the acquirer.";
    if( this.responseCode == 50502 )
      return "Risk management transaction timeout.";
    if( this.responseCode == 50600 )
      return "Duplicate transaction.";

    return null;
  }
44730
public function parseNumber()
    {
        $tel = [
            'Original' => $this->value,
        ];

        // remove brackets
        $str = str_replace(['(', ')'], '', $this->value);

        // replace characters with space
        $str = trim(
            preg_replace('/\s+/', ' ', preg_replace('/[^a-z0-9\#\+]/i', ' ', strtolower($str)))
        );

        // try detect if number starts with a + or international dialing code
        if (preg_match('/^(\+\d{1,3}\b)/', $str, $matches)) {
            $tel['CountryCode'] = substr($matches[1], 1);
            $str = trim(substr($str, strlen($matches[0])));
        } elseif (preg_match('/^(00|010|011|0011|810|0010|0011|0014)\s?(\d{1,3})\b/', $str, $matches)) {
            $tel['CountryCode'] = $matches[2];
            $str = trim(substr($str, strlen($matches[0])));
        }

        // try detect if an extension is included
        if (preg_match('/(#|ext|extension)\s?(\d)+$/', $str, $matches)) {
            $tel['Extension'] = $matches[2];
            $str = trim(preg_replace('/' . preg_quote($matches[0], '/') . '$/', '', $str));
        }

        // set default country code if none detected
        if (empty($tel['CountryCode'])) {
            $tel['CountryCode'] = $this->config()->get('default_country_code');
        }

        // remove leading 0
        if (substr($str, 0, 1) == '0') {
            $str = trim(substr($str, 1));
        }

        // remaining number must contain at least 6 digits
        if (preg_match('/[a-z]/', $str) || preg_match_all('/\d/', $str) < 6) {
            return false;
        }

        // generate a RFC3966 link
        $tel['RFC3966'] = 'tel:+' . $tel['CountryCode'] . '-' . preg_replace('/[^0-9]/', '-', $str);
        if (!empty($tel['Extension'])) {
            $tel['RFC3966'] .= ';ext=' . $tel['Extension'];
        }

        return $tel;
    }
484080
private static String getDeviceSerialNumber() {
        // We're using the Reflection API because Build.SERIAL is only available
        // since API Level 9 (Gingerbread, Android 2.3).
        try {
            return (String) Build.class.getField("SERIAL").get(null);
        } catch (Exception ignored) {
            return null;
        }
    }
1207206
public String getMessage() 
   {
      String msg = super.getMessage();
      String ec = getErrorCode();
      if ((msg == null) && (ec == null)) 
      {
         return null;
      }
      if ((msg != null) && (ec != null)) 
      {
         return (msg + ", error code: " + ec);
      }
      return ((msg != null) ? msg : ("error code: " + ec));
   }
573776
public function getILN ()
    {
        $ilnField = $this->getFirstMatchingField('101@/00');
        if ($ilnField) {
            $ilnSubfield = $ilnField->getNthSubfield('a', 0);
            if ($ilnSubfield) {
                return $ilnSubfield->getValue();
            }
        }
        return null;
    }
1220798
public function getPhoneNumbersFormatted()
    {
        $formattedArray = [];
        foreach ($this->phoneNumbers as $key => $phoneNumber)
        {
            $formattedArray[$key] = [
                'number' => $phoneNumber->getNumber(),
                'extension' => null
            ];
        }

        return $formattedArray;
    }
702370
public function getErrorMessage()
    {
        if (array_key_exists('error', $this->responseData?: [])) {
            if (is_string($this->responseData['error'])) {
                return json_encode($this->responseData['error']);
            } elseif(array_key_exists('error', $this->responseData['error'])) {
                return json_encode($this->responseData['error']['error']);
            } else {
                return json_encode($this->responseData['error']);
            }
        } else {
            return null;
        }
    }
287671
public function getTelcos()
    {
        try {
            $telco = $this->phoneDetect->getTelcos();
            $this->logger->info(__FUNCTION__, 'Current Telcos: ', $telco);

            return $telco;
        }
        catch (\Exception $e) {
            $this->logger->info(__FUNCTION__, 'Error: ' . json_encode($e->getMessage()));

            return NULL;
        }
    }