diff options
author | pcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-29 21:05:43 +0000 |
---|---|---|
committer | pcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-29 21:05:43 +0000 |
commit | 4bc1677da14cfb0471dca160720be544eb750665 (patch) | |
tree | 5a9757a8362848cff465f7142f77ff818bd7cc96 /channels/h323 | |
parent | 62fe7dade0fb212b13fd378252367115764bf654 (diff) |
Set TON/PRESENTATION information more carefully when no CallingNumber IE available
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44042 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323')
-rw-r--r-- | channels/h323/ast_h323.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/channels/h323/ast_h323.cxx b/channels/h323/ast_h323.cxx index dfad8518f..114edbbc4 100644 --- a/channels/h323/ast_h323.cxx +++ b/channels/h323/ast_h323.cxx @@ -762,6 +762,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)) { + H225_Setup_UUIE &setup_uuie = setupPDU.m_h323_uu_pdu.m_h323_message_body + if (setup_uuie.HasOptionalField(e_presentationIndicator)) + cd->presentation = (cd->presentation & 0x9f) | (((unsigned int)setup_uuie.m_presentationIndicator.GetTag()) << 5); + if (setup_uuie.HasOptionalField(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 */ |