How to set CallerID when call out through Twilio

If I dial in to Asterisk from a sip phone, the callerID is the caller ID I set in the sip phone. If I then dial out through Twilio, all I get is a call from a varying number in Malaysia with no caller information. Is there any way I can set this so Twilio will pass the Caller ID along to my cell phone?

Here is my dialplan Dial function.

[globals]
MARK = "Mark"
MARK_NUM = "+123481711140"

[extensions]
exten => 5555,1,Playback(/srv/asterisk/sounds/voicemail/mark)
    same =>, GoSub(subVoicemail,start,1(${MARK},${MARK_NUM},${EXTEN}))

[subVoicemail]
exten => start,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to ${ARG1} through Twilio)
   same => n,Dial(PJSIP/${ARG2}@twilio0,30)
   same => n,VoiceMail(${ARG3}@default,${IF($[${DIALSTATUS} = BUSY]?b:u)})
   same => n,Hangup()

Hi!

I think this is a restriction of Twilio. From https://support.twilio.com/hc/en-us/articles/223180148-Displaying-a-business-name-or-custom-text-as-Caller-ID it says that it will only display verified numbers or numbers purchased from Twilio. On https://support.twilio.com/hc/en-us/articles/223180048-Adding-a-verified-outbound-caller-ID-with-Twilio they explain how to get a number verified.

In other words, I don’t think it’s going to be possible for arbitrary caller ID to be passed through Twilio unless you get each individual number verified.

1 Like