Skip to content

Commit

Permalink
new variable %{from-parent} for SQLAuth CallQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Jul 27, 2018
1 parent 4004440 commit 3e160b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RasTbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ class CallRec {

void SetH245Routed(PBoolean routed) { m_h245Routed = routed; }
bool IsH245Routed() const { return m_h245Routed; }
bool IsToParent() const { return m_toParent; } // to _or_ from parnet
bool IsToParent() const { return m_toParent; } // to _or_ from parent
bool IsFromParent() const { return m_fromParent; } // from parent only
bool IsForwarded() const { return m_forwarded; }
bool IsSocketAttached() const { return (m_callingSocket != NULL); }
Expand Down
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Changes from 4.9 to 5.0
=======================
- new variable %{from-parent} for SQLAuth CallQuery
- new variable %{Calling-Station-Id} for SQLAuth RegQuery
- BUGFIX(Toolkit.cxx) fix route matching
- BUGFIX(ProxyChannel.cxx) fix RTP multiplexing when child calls parent
Expand Down
1 change: 1 addition & 0 deletions docs/manual/auth.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ replacement is made before each query is executed. The following parameters are
<item><tt/%{bandwidth}/ - requested bandwidth, if present in the ARQ
<item><tt/%{answer}/ - 1, if the request is an answering ARQ
<item><tt/%{arq}/ - 1 for ARQ triggered query, 0 for Setup triggered query
<item><tt/%{from-parent}/ - 1 calls from parent gatekeeper, 0 for other calls
</itemize>
<p>
If the query returns no rows, the result is undefined, which basically
Expand Down
6 changes: 4 additions & 2 deletions sqlauth.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class SQLAuth : public GkAuthenticator
#GkAuthenticator::Status enum# with the result of authentication.
*/
virtual int Check(
/// ARQ nessage to be authenticated
/// ARQ message to be authenticated
RasPDU<H225_AdmissionRequest> & arqPdu,
/// authorization data (call duration limit, reject reason, ...)
ARQAuthData & authData
Expand Down Expand Up @@ -620,7 +620,7 @@ int SQLAuth::Check(
}

int SQLAuth::Check(
/// ARQ nessage to be authenticated
/// ARQ message to be authenticated
RasPDU<H225_AdmissionRequest> & arqPdu,
/// authorization data (call duration limit, reject reason, ...)
ARQAuthData & authData
Expand Down Expand Up @@ -648,6 +648,7 @@ int SQLAuth::Check(
params["bandwidth"] = PString(arq.m_bandWidth.GetValue());
params["answer"] = arq.m_answerCall ? "1" : "0";
params["arq"] = "1";
params["from-parent"] = "0";
params["CallId"] = AsString(arq.m_callIdentifier);
params["SrcInfo"] = AsString(arq.m_srcInfo, false);
params["Vendor"] = "";
Expand Down Expand Up @@ -886,6 +887,7 @@ int SQLAuth::Check(
params["Dialed-Number"] = GetDialedNumber(setup, authData);
params["answer"] = "0";
params["arq"] = "0";
params["from-parent"] = authData.m_call->IsFromParent() ? "1" : "0";
params["CallId"] = AsString(setup.GetUUIEBody().m_callIdentifier);
params["SrcInfo"] = "";
if (setup.GetUUIEBody().HasOptionalField(H225_Setup_UUIE::e_sourceAddress)
Expand Down

0 comments on commit 3e160b0

Please sign in to comment.