mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
handle missing callerId property for anonymous calls
This commit is contained in:
@@ -92,7 +92,8 @@ router.post('/', async(req, res) => {
|
||||
* */
|
||||
if (target.type === 'phone' && !target.trunk) {
|
||||
const {lookupCarrierByPhoneNumber} = dbUtils(this.logger, srf);
|
||||
const callingNumber = restDial.from.startsWith('+') ? restDial.from.substring(1) : restDial.from;
|
||||
const str = restDial.from || '';
|
||||
const callingNumber = str.startsWith('+') ? str.substring(1) : str;
|
||||
const voip_carrier_sid = await lookupCarrierByPhoneNumber(req.body.account_sid, callingNumber);
|
||||
logger.info(
|
||||
`createCall: selected ${voip_carrier_sid} for requested phone number: ${callingNumber || 'unspecified'})`);
|
||||
|
||||
Reference in New Issue
Block a user