Module: kamailio Branch: master Commit: 54c6a03704767a3dc15eb633ce1628e93c99a8ff URL: https://github.com/kamailio/kamailio/commit/54c6a03704767a3dc15eb633ce1628e9...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-03-21T14:59:29+01:00
phonenum: build cctel from formatted number
---
Modified: src/modules/phonenum/cphonenumber.cpp
---
Diff: https://github.com/kamailio/kamailio/commit/54c6a03704767a3dc15eb633ce1628e9... Patch: https://github.com/kamailio/kamailio/commit/54c6a03704767a3dc15eb633ce1628e9...
---
diff --git a/src/modules/phonenum/cphonenumber.cpp b/src/modules/phonenum/cphonenumber.cpp index 71e76ab004..b723543f55 100644 --- a/src/modules/phonenum/cphonenumber.cpp +++ b/src/modules/phonenum/cphonenumber.cpp @@ -134,7 +134,10 @@ telnum_t* telnum_parse(char* number, char* region) string descNumber = _phoneGeoCoder->GetDescriptionForNumber(parsedNumber, Locale("en")); res->ndesc = strdup(descNumber.c_str()); res->ltype = strdup(telnum_linetype(_phoneUtil.GetNumberType(parsedNumber))); - res->cctel = _phoneUtil.GetCountryCodeForRegion(regionStr); + // res->cctel = _phoneUtil.GetCountryCodeForRegion(regionStr); + string regionCode; + _phoneUtil.GetRegionCodeForNumber(parsedNumber, ®ionCode); + res->cctel = _phoneUtil.GetCountryCodeForRegion(regionCode);
return res; }