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.

MARK = "Mark"
MARK_NUM = "+123481711140"

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

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()


I think this is a restriction of Twilio. From it says that it will only display verified numbers or numbers purchased from Twilio. On 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