FreeSWITCH: Add preprocessor constant for default callerid number
SWITCH_DEFAULT_CLID_NUMBER and replace all occurrences in the FreeSWITCH codebase. Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
parent
fdf7623f90
commit
416f026f8c
|
@ -108,6 +108,7 @@ SWITCH_BEGIN_EXTERN_C
|
|||
#define SWITCH_SEQ_CLEARSCR SWITCH_SEQ_ESC SWITCH_SEQ_CLEARSCR_CHAR SWITCH_SEQ_HOME
|
||||
#endif
|
||||
#define SWITCH_DEFAULT_CLID_NAME ""
|
||||
#define SWITCH_DEFAULT_CLID_NUMBER "0000000000"
|
||||
#define SWITCH_DEFAULT_DTMF_DURATION 2000
|
||||
#define SWITCH_MIN_DTMF_DURATION 400
|
||||
#define SWITCH_MAX_DTMF_DURATION 192000
|
||||
|
|
|
@ -8223,7 +8223,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
|
|||
|
||||
/* Caller ID Number */
|
||||
if (zstr(caller_id_number)) {
|
||||
caller_id_number = "0000000000";
|
||||
caller_id_number = SWITCH_DEFAULT_CLID_NUMBER;
|
||||
}
|
||||
|
||||
if (!pool) {
|
||||
|
|
|
@ -874,7 +874,7 @@ switch_call_cause_t rtmp_session_create_call(rtmp_session_t *rsession, switch_co
|
|||
|
||||
caller_profile = switch_caller_profile_new(pool, switch_str_nil(auth_user), dialplan,
|
||||
SWITCH_DEFAULT_CLID_NAME,
|
||||
!zstr(auth_user) ? auth_user : "0000000000",
|
||||
!zstr(auth_user) ? auth_user : SWITCH_DEFAULT_CLID_NUMBER,
|
||||
rsession->remote_address /* net addr */,
|
||||
NULL /* ani */,
|
||||
NULL /* anii */,
|
||||
|
|
|
@ -326,7 +326,7 @@ switch_status_t skinny_session_send_call_info(switch_core_session_t *session, li
|
|||
zstr((caller_party_number = switch_channel_get_variable(channel, "caller_id_number"))) &&
|
||||
zstr((caller_party_number = switch_channel_get_variable_partner(channel, "effective_caller_id_number"))) &&
|
||||
zstr((caller_party_number = switch_channel_get_variable_partner(channel, "caller_id_number")))) {
|
||||
caller_party_number = "0000000000";
|
||||
caller_party_number = SWITCH_DEFAULT_CLID_NUMBER;
|
||||
}
|
||||
/* Called party */
|
||||
if (zstr((called_party_name = switch_channel_get_variable(channel, "effective_callee_id_name"))) &&
|
||||
|
@ -340,7 +340,7 @@ switch_status_t skinny_session_send_call_info(switch_core_session_t *session, li
|
|||
zstr((called_party_number = switch_channel_get_variable_partner(channel, "effective_callee_id_number"))) &&
|
||||
zstr((called_party_number = switch_channel_get_variable_partner(channel, "callee_id_number"))) &&
|
||||
zstr((called_party_number = switch_channel_get_variable(channel, "destination_number")))) {
|
||||
called_party_number = "0000000000";
|
||||
called_party_number = SWITCH_DEFAULT_CLID_NUMBER;
|
||||
}
|
||||
if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
|
||||
call_type = SKINNY_INBOUND_CALL;
|
||||
|
|
|
@ -66,7 +66,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
|
|||
}
|
||||
|
||||
if (zstr(caller_id_number)) {
|
||||
caller_id_number = "0000000000";
|
||||
caller_id_number = SWITCH_DEFAULT_CLID_NUMBER;
|
||||
}
|
||||
|
||||
profile_dup_clean(username, profile->username, pool);
|
||||
|
|
|
@ -2496,7 +2496,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
cid_name_override = SWITCH_DEFAULT_CLID_NAME;
|
||||
}
|
||||
if (!cid_num_override) {
|
||||
cid_num_override = "0000000000";
|
||||
cid_num_override = SWITCH_DEFAULT_CLID_NUMBER;
|
||||
}
|
||||
|
||||
new_profile = switch_caller_profile_new(oglobals.pool,
|
||||
|
|
Loading…
Reference in New Issue