mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
add some clarification
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9238 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4a278c111d
commit
4f670da192
@ -1186,7 +1186,8 @@ typedef enum {
|
|||||||
SWITCH_CAUSE_ALLOTTED_TIMEOUT = 602,
|
SWITCH_CAUSE_ALLOTTED_TIMEOUT = 602,
|
||||||
SWITCH_CAUSE_USER_CHALLENGE = 603,
|
SWITCH_CAUSE_USER_CHALLENGE = 603,
|
||||||
SWITCH_CAUSE_MEDIA_TIMEOUT = 604,
|
SWITCH_CAUSE_MEDIA_TIMEOUT = 604,
|
||||||
SWITCH_CAUSE_PICKED_OFF = 605
|
SWITCH_CAUSE_PICKED_OFF = 605,
|
||||||
|
SWITCH_CAUSE_USER_NOT_REGISTERED = 606
|
||||||
} switch_call_cause_t;
|
} switch_call_cause_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -1616,7 +1616,7 @@ SWITCH_STANDARD_API(sofia_contact_function)
|
|||||||
char *p;
|
char *p;
|
||||||
sofia_profile_t *profile = NULL;
|
sofia_profile_t *profile = NULL;
|
||||||
const char *exclude_contact = NULL;
|
const char *exclude_contact = NULL;
|
||||||
char *reply = "";
|
char *reply = "error/facility_not_subscribed";
|
||||||
|
|
||||||
if (!cmd) {
|
if (!cmd) {
|
||||||
stream->write_function(stream, "%s", "");
|
stream->write_function(stream, "%s", "");
|
||||||
@ -1696,8 +1696,14 @@ SWITCH_STANDARD_API(sofia_contact_function)
|
|||||||
if (!switch_strlen_zero(reply) && end_of(reply) == ',') {
|
if (!switch_strlen_zero(reply) && end_of(reply) == ',') {
|
||||||
end_of(reply) = '\0';
|
end_of(reply) = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (switch_strlen_zero(reply)) {
|
||||||
|
reply = "error/user_not_registered";
|
||||||
|
}
|
||||||
|
|
||||||
stream->write_function(stream, "%s", reply);
|
stream->write_function(stream, "%s", reply);
|
||||||
reply = NULL;
|
reply = NULL;
|
||||||
|
|
||||||
switch_safe_free(mystream.data);
|
switch_safe_free(mystream.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1960,7 +1966,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
|
|||||||
tech_pvt->local_url = switch_core_session_sprintf(nsession, "%s@%s", dest, host);
|
tech_pvt->local_url = switch_core_session_sprintf(nsession, "%s@%s", dest, host);
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot locate registered user %s@%s\n", dest, host);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot locate registered user %s@%s\n", dest, host);
|
||||||
cause = SWITCH_CAUSE_NO_ROUTE_DESTINATION;
|
cause = SWITCH_CAUSE_USER_NOT_REGISTERED;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
} else if (!(host = strchr(dest, '@'))) {
|
} else if (!(host = strchr(dest, '@'))) {
|
||||||
@ -1972,7 +1978,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
|
|||||||
host = profile_name;
|
host = profile_name;
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot locate registered user %s@%s\n", dest, profile_name);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot locate registered user %s@%s\n", dest, profile_name);
|
||||||
cause = SWITCH_CAUSE_NO_ROUTE_DESTINATION;
|
cause = SWITCH_CAUSE_USER_NOT_REGISTERED;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -101,6 +101,7 @@ static struct switch_cause_table CAUSE_CHART[] = {
|
|||||||
{"USER_CHALLENGE", SWITCH_CAUSE_USER_CHALLENGE},
|
{"USER_CHALLENGE", SWITCH_CAUSE_USER_CHALLENGE},
|
||||||
{"MEDIA_TIMEOUT", SWITCH_CAUSE_MEDIA_TIMEOUT},
|
{"MEDIA_TIMEOUT", SWITCH_CAUSE_MEDIA_TIMEOUT},
|
||||||
{"PICKED_OFF", SWITCH_CAUSE_PICKED_OFF},
|
{"PICKED_OFF", SWITCH_CAUSE_PICKED_OFF},
|
||||||
|
{"USER_NOT_REGISTERED", SWITCH_CAUSE_USER_NOT_REGISTERED},
|
||||||
{NULL, 0}
|
{NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -536,10 +536,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
char *loop_data = NULL;
|
char *loop_data = NULL;
|
||||||
uint32_t progress_timelimit_sec = 0;
|
uint32_t progress_timelimit_sec = 0;
|
||||||
|
|
||||||
|
*bleg = NULL;
|
||||||
|
|
||||||
|
if (!strncasecmp(bridgeto, "error/", 6)) {
|
||||||
|
*cause = switch_channel_str2cause(bridgeto + 6);
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
switch_zmalloc(write_frame.data, SWITCH_RECOMMENDED_BUFFER_SIZE);
|
switch_zmalloc(write_frame.data, SWITCH_RECOMMENDED_BUFFER_SIZE);
|
||||||
write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE;
|
write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE;
|
||||||
|
|
||||||
*bleg = NULL;
|
|
||||||
odata = strdup(bridgeto);
|
odata = strdup(bridgeto);
|
||||||
|
|
||||||
if (!odata) {
|
if (!odata) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user