mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
caller id works both ways w00t
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@240 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
@@ -620,12 +620,11 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
||||
if ((p = strchr(outbound_profile->destination_number, '/'))) {
|
||||
dest = p + 1;
|
||||
span_id = atoi(outbound_profile->destination_number);
|
||||
if ((p = strchr(dest, '/'))) {
|
||||
chan_id = atoi(dest);
|
||||
dest = p + 1;
|
||||
}
|
||||
chan_id = atoi(dest);
|
||||
}
|
||||
|
||||
dest = outbound_profile->destination_number;
|
||||
|
||||
if (!dest) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid dial string\n");
|
||||
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
|
||||
@@ -643,6 +642,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (status != ZAP_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No channels available\n");
|
||||
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
|
||||
@@ -667,6 +667,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
||||
snprintf(name, sizeof(name), "OPENZAP/%s", dest);
|
||||
switch_channel_set_name(channel, name);
|
||||
zap_set_string(zchan->caller_data.ani, dest);
|
||||
zap_set_string(zchan->caller_data.cid_name, outbound_profile->caller_id_name);
|
||||
zap_set_string(zchan->caller_data.cid_num, outbound_profile->caller_id_number);
|
||||
caller_profile = switch_caller_profile_clone(*new_session, outbound_profile);
|
||||
switch_channel_set_caller_profile(channel, caller_profile);
|
||||
tech_pvt->caller_profile = caller_profile;
|
||||
@@ -681,6 +683,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
||||
}
|
||||
|
||||
zap_channel_outgoing_call(zchan);
|
||||
|
||||
return SWITCH_CAUSE_SUCCESS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user