rp.CheckAndRequest(rp.PERMISSION_READ_PHONE_STATE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
'we have permission!
Dim pi As PhoneId
Log("number: " & pi.GetLine1Number)
End If
See Runtime Permissions tutorial for more information.