Skip to content

Commit

Permalink
Merge pull request #520 from zackm0571/VATRP-3891
Browse files Browse the repository at this point in the history
VATRP-3891: Default videomail call to registered user when value not …
  • Loading branch information
kennethdick committed Apr 27, 2016
2 parents eee3f3a + 3f71879 commit b0b62c3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Classes/LinphoneUI/UIMainBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,17 @@ - (IBAction)selfPreviewButtonAction:(UIButton *)sender {

- (IBAction)videomailButtonAction:(UIButton *)sender {
NSString *address = [[NSUserDefaults standardUserDefaults] objectForKey:@"video_mail_uri_preference"];
if(address){
[[LinphoneManager instance] call:address displayName:@"Videomail" transfer:FALSE];
[[NSUserDefaults standardUserDefaults] setInteger:0 forKey:@"mwi_count"];
if(!address){
LinphoneProxyConfig *cfg = linphone_core_get_default_proxy_config([LinphoneManager getLc]);
if(!cfg) return;
const LinphoneAddress *addr = linphone_proxy_config_get_identity_address(cfg);
if(!addr)return;
address = [[NSString alloc] initWithUTF8String:linphone_address_as_string_uri_only(addr)];
}

[[LinphoneManager instance] call:address displayName:@"Videomail" transfer:FALSE];
[[NSUserDefaults standardUserDefaults] setInteger:0 forKey:@"mwi_count"];

[self hideMoreMenu];
}

Expand Down

0 comments on commit b0b62c3

Please sign in to comment.