From 61245dd698114f8cc08722fafea3504d1d25c461 Mon Sep 17 00:00:00 2001 From: Robert Joly Date: Thu, 17 Sep 2009 13:48:38 +0000 Subject: [PATCH] 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 --- src/mod/endpoints/mod_opal/mod_opal.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/mod/endpoints/mod_opal/mod_opal.cpp b/src/mod/endpoints/mod_opal/mod_opal.cpp index 6003930d10..96d2fb3f7c 100644 --- a/src/mod/endpoints/mod_opal/mod_opal.cpp +++ b/src/mod/endpoints/mod_opal/mod_opal.cpp @@ -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 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; }