allow profile to be specified sep from domain user@domain.com@myprofile
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14756 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
5ff9150213
commit
7bc1c0e8d5
|
@ -2614,7 +2614,7 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
|
||||||
static switch_status_t voicemail_inject(const char *data)
|
static switch_status_t voicemail_inject(const char *data)
|
||||||
{
|
{
|
||||||
vm_profile_t *profile;
|
vm_profile_t *profile;
|
||||||
char *dup = NULL, *user = NULL, *domain = NULL;
|
char *dup = NULL, *user = NULL, *domain = NULL, *profile_name = NULL;
|
||||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
int isgroup = 0, isall = 0;
|
int isgroup = 0, isall = 0;
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
|
@ -2649,6 +2649,12 @@ static switch_status_t voicemail_inject(const char *data)
|
||||||
domain = user;
|
domain = user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((profile_name = strchr(domain, '@'))) {
|
||||||
|
*profile_name++ = '\0';
|
||||||
|
} else {
|
||||||
|
profile_name = domain;
|
||||||
|
}
|
||||||
|
|
||||||
if (switch_stristr("group=", user)) {
|
if (switch_stristr("group=", user)) {
|
||||||
user += 6;
|
user += 6;
|
||||||
isgroup++;
|
isgroup++;
|
||||||
|
@ -2662,8 +2668,10 @@ static switch_status_t voicemail_inject(const char *data)
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(profile = get_profile(domain))) {
|
if (!(profile = get_profile(profile_name))) {
|
||||||
profile = get_profile("default");
|
if (!(profile = get_profile(domain))) {
|
||||||
|
profile = get_profile("default");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
|
|
Loading…
Reference in New Issue