Thanks for the comment. The function looks much better but the VM number in the SIM shouldn't get priority because If it is stored in the SIM the dialer won't use the one the user might set so I'd do something like this:
```
if (!number && voicemail && voicemail.number) {
  number = voicemail.number;
}
```
We cannot change the VM number in the SIM (write to the SIM register) so we have to use the one stored in the setting database to be sure the dialer uses the one the user might set.

What do you think? ;)