Skip to content

Commit

Permalink
display calling/called party Number IE in PrintCallInfo (CallerID)
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Dec 14, 2017
1 parent 46ebebc commit c83d9ea
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ProxyChannel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5283,6 +5283,24 @@ void CallSignalSocket::OnSetup(SignalingMsg * msg)
}
SetCallTypePlan(&q931);

// store (rewritten) CallingPartyNumberIE, eg. for PrintCallInfo
if (q931.HasIE(Q931::CallingPartyNumberIE)) {
unsigned planIgnored = Q931::ISDNPlan, typeIgnored = Q931::InternationalType;
unsigned presentationIgnored = (unsigned)-1, screeningIgnored = (unsigned)-1;
PString callingPartyNumberIE;
q931.GetCallingPartyNumber(callingPartyNumberIE, &planIgnored, &typeIgnored, &presentationIgnored, &screeningIgnored, (unsigned)-1, (unsigned)-1);
m_call->SetCallingPartyNumberIE(callingPartyNumberIE);
}

// store (rewritten) CalledPartyNumberIE, eg. for PrintCallInfo
if (q931.HasIE(Q931::CalledPartyNumberIE)) {
unsigned planIgnored = Q931::ISDNPlan, typeIgnored = Q931::InternationalType;
unsigned presentationIgnored = (unsigned)-1, screeningIgnored = (unsigned)-1;
PString calledPartyNumberIE;
q931.GetCalledPartyNumber(calledPartyNumberIE, &planIgnored, &typeIgnored);
m_call->SetCalledPartyNumberIE(calledPartyNumberIE);
}

// add destination alias (for Swyx trunk)
if (m_call->GetCalledParty()) {
PString addAlias = m_call->GetCalledParty()->GetAdditionalDestinationAlias();
Expand Down
2 changes: 2 additions & 0 deletions RasTbl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3619,6 +3619,8 @@ PString CallRec::PrintFullInfo() const
result += "CallerAlias: " + GetCallingStationId() + "\r\n";
result += "CalledAlias: " + GetCalledStationId() + "\r\n";
result += "DialedNumber: " + m_dialedNumber + "\r\n";
result += "CallingPartyNumberIE: " + GetCallingPartyNumberIE() + "\r\n";
result += "CalledPartyNumberIE: " + GetCalledPartyNumberIE() + "\r\n";
PString vendorStr = "unknown";
PString vendor, version;
if (GetCallingVendor(vendor, version))
Expand Down
12 changes: 12 additions & 0 deletions RasTbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1394,9 +1394,17 @@ class CallRec {
void SetBindHint(const PString & ip) { m_bindHint = ip; }
PString GetBindHint() const { return m_bindHint; }

// if set, the callerID to put into calling party number IE
void SetCallerID(const PString & id) { m_callerID = id; }
PString GetCallerID() const { return m_callerID; }

// calling/called party number IE (after rewriting)
void SetCallingPartyNumberIE(const PString & ie) { m_callingPartyNumberIE = ie; }
PString GetCallingPartyNumberIE() const { return m_callingPartyNumberIE; }
void SetCalledPartyNumberIE(const PString & ie) { m_calledPartyNumberIE = ie; }
PString GetCalledPartyNumberIE() const { return m_calledPartyNumberIE; }

// if set, the display IE to set for the caller/called party
void SetCallerDisplayIE(const PString & display) { m_callerDisplayIE = display; }
PString GetCallerDisplayIE() const { return m_callerDisplayIE; }
void SetCalledDisplayIE(const PString & display) { m_calledDisplayIE = display; }
Expand Down Expand Up @@ -1665,6 +1673,10 @@ class CallRec {
WORD m_callerH239Port;
WORD m_calledH239Port;
WORD m_H239SessionID;

PString m_callingPartyNumberIE;
PString m_calledPartyNumberIE;

PBYTEArray m_radiusClass;
bool m_proceedingSent;
#ifdef HAS_H46018
Expand Down

0 comments on commit c83d9ea

Please sign in to comment.