Added setting of outgoing number and display name from extension number so H.323/Q.931 fields are set correctly in ALERTING and CONNECT messages sent for incoming calls.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14900 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Robert Joly 2009-09-17 13:48:38 +00:00
parent 958da22330
commit 61245dd698

View File

@ -983,6 +983,25 @@ switch_status_t FSConnection::receive_message(switch_core_session_message_t *msg
case SWITCH_MESSAGE_INDICATE_AUDIO_SYNC:
switch_channel_set_private_flag(channel, CF_NEED_FLUSH);
break;
case SWITCH_MESSAGE_INDICATE_RINGING:
case SWITCH_MESSAGE_INDICATE_PROGRESS:
case SWITCH_MESSAGE_INDICATE_ANSWER:
{
switch_caller_profile_t * profile = switch_channel_get_caller_profile(channel);
if (profile != NULL && profile->caller_extension != NULL)
{
PSafePtr<OpalConnection> other = GetOtherPartyConnection();
if (other != NULL) {
other->SetLocalPartyName(profile->caller_extension->extension_number);
other->SetDisplayName(profile->caller_extension->extension_name);
}
SetLocalPartyName(profile->caller_extension->extension_number);
SetDisplayName(profile->caller_extension->extension_name);
}
}
break;
default:
break;
}