aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-29 21:13:46 +0000
committerpcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-29 21:13:46 +0000
commitdf4f71e2d6d629bfcae42e785b4e934db6207837 (patch)
treef8e880f486e9dfbc2342bebe2d86863280e06e18
parenta91dc6e0270ea16e6062297b6b6348028d6232ac (diff)
Merged revisions 44034,44042-44043 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r44034 | pcadach | 2006-09-30 02:43:13 +0600 (Сбт, 30 Сен 2006) | 1 line Fake display name by called number on incoming calls (until passing connected number/connected name is not implemented) ........ r44042 | pcadach | 2006-09-30 03:05:43 +0600 (Сбт, 30 Сен 2006) | 1 line Set TON/PRESENTATION information more carefully when no CallingNumber IE available ........ r44043 | pcadach | 2006-09-30 03:09:10 +0600 (Сбт, 30 Сен 2006) | 1 line Compile first, please ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44044 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/h323/ast_h323.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/channels/h323/ast_h323.cxx b/channels/h323/ast_h323.cxx
index 37684dd59..21be3e648 100644
--- a/channels/h323/ast_h323.cxx
+++ b/channels/h323/ast_h323.cxx
@@ -774,6 +774,16 @@ void MyH323Connection::SetCallDetails(void *callDetails, const H323SignalPDU &se
/* Construct fields back */
cd->type_of_number = (type << 4) | screening;
cd->presentation = (presentation << 5) | screening;
+ } else if (cd->call_source_e164[0]) {
+ cd->type_of_number = 0; /* UNKNOWN */
+ cd->presentation = 0x03; /* ALLOWED NETWORK NUMBER - Default */
+ if (setupPDU.GetQ931().HasIE(Q931::UserUserIE)) {
+ const H225_Setup_UUIE &setup_uuie = setupPDU.m_h323_uu_pdu.m_h323_message_body;
+ if (setup_uuie.HasOptionalField(H225_Setup_UUIE::e_presentationIndicator))
+ cd->presentation = (cd->presentation & 0x9f) | (((unsigned int)setup_uuie.m_presentationIndicator.GetTag()) << 5);
+ if (setup_uuie.HasOptionalField(H225_Setup_UUIE::e_screeningIndicator))
+ cd->presentation = (cd->presentation & 0xe0) | (((unsigned int)setup_uuie.m_screeningIndicator.GetValue()) & 0x1f);
+ }
} else {
cd->type_of_number = 0; /* UNKNOWN */
cd->presentation = 0x43; /* NUMBER NOT AVAILABLE */
@@ -791,6 +801,8 @@ void MyH323Connection::SetCallDetails(void *callDetails, const H323SignalPDU &se
}
else
cd->redirect_reason = -1;
+
+ SetDisplayName(cd->call_dest_e164);
}
/* Convert complex strings */