So when I converted to PJSIP this feature seems to have broke. On chan_sip if I setup something like this, it would ring an internal line and also send out to a cell phone.
exten => 214xxxxxxx,1,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?blacklisted,s,1)
exten => 214xxxxxxx,2,Set(ORIG_CID=${CALLERID(all)})
exten => 214xxxxxxx,3,Set(CALLERID(all)=${ORIG_CID})
exten => 214xxxxxxx,4,Dial(PJSIP/303&PJSIP/VoIPms/972xxxxxxx,16)
exten => 214xxxxxxx,5,VoiceMail(301@internal,u)
exten => 214xxxxxxx,6,Hangup()
The internal extension rings, but for the remote dial out, PJSIP gripes like this:
[Aug 14 18:35:36] ERROR[8075]: res_pjsip.c:3605 ast_sip_create_dialog_uac: Endpoint 'VoIPms': Could not create dialog to invalid URI '972xxxxxxx'. Is endpoint registered and reachable?
[Aug 14 18:35:36] ERROR[8075]: chan_pjsip.c:2681 request: Failed to create outgoing session to endpoint 'VoIPms'
[Aug 14 18:35:36] WARNING[8080][C-00000030]: app_dial.c:2576 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)