aboutsummaryrefslogtreecommitdiffstats
path: root/channels/h323
diff options
context:
space:
mode:
authorjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-22 19:04:02 +0000
committerjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-22 19:04:02 +0000
commit78481c32749fa575de5439bc4875293a4f9cc03b (patch)
tree3d8315d54efbcb86d7feec354759523e2037f501 /channels/h323
parent937badd3cb6536f1895808db3cc675faa5a19ade (diff)
re-implement callerid, still might not be right. Remove channel limits, in favor to app_groupcount. A lot more code cleanup. Please test and report as I am sure I broke something
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4049 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323')
-rwxr-xr-xchannels/h323/ast_h323.cpp25
-rwxr-xr-xchannels/h323/chan_h323.h8
2 files changed, 13 insertions, 20 deletions
diff --git a/channels/h323/ast_h323.cpp b/channels/h323/ast_h323.cpp
index 74de8d62d..dd8d9274a 100755
--- a/channels/h323/ast_h323.cpp
+++ b/channels/h323/ast_h323.cpp
@@ -218,13 +218,13 @@ H323Codec * AST_G729ACapability::CreateCodec(H323Codec::Direction direction) con
* transport = ip.
* port = 1720.
*/
-int MyH323EndPoint::MakeCall(const PString & dest, PString & token, unsigned int *callReference, unsigned int port, char *callerid, char *callername)
+int MyH323EndPoint::MakeCall(const PString & dest, PString & token, unsigned int *callReference, unsigned int port, char *cid_name, char *cid_name)
{
PString fullAddress;
MyH323Connection * connection;
/* Determine whether we are using a gatekeeper or not. */
- if (!GetGatekeeper()) {
+ if (GetGatekeeper()) {
fullAddress = dest;
if (h323debug) {
cout << " -- Making call to " << fullAddress << " using gatekeeper." << endl;
@@ -242,18 +242,15 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token, unsigned int
return 1;
}
*callReference = connection->GetCallReference();
- if (callerid) {
- connection->SetLocalPartyName(PString(callerid));
- }
- if (callername) {
+ if (cid_name) {
localAliasNames.RemoveAll();
- connection->SetLocalPartyName(PString(callername));
- if (callerid) {
- localAliasNames.AppendString(PString(callerid));
+ connection->SetLocalPartyName(PString(cid_name));
+ if (cid_num) {
+ localAliasNames.AppendString(PString(cid_num));
}
- } else if (callerid) {
+ } else if (cid_num) {
localAliasNames.RemoveAll();
- connection->SetLocalPartyName(PString(callerid));
+ connection->SetLocalPartyName(PString(cid_num));
}
if (h323debug) {
cout << " -- " << GetLocalUserName() << " is calling host " << fullAddress << endl;
@@ -747,8 +744,8 @@ MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection & connecti
cout << "\tERROR: on_external_rtp_create failure" << endl;
return;
} else {
- localIpAddr = (PIPSocket::Address)info->addr;
- localPort = (WORD)info->port;
+ localIpAddr = info->addr;
+ localPort = info->port;
/* tell the H.323 stack */
SetExternalAddress(H323TransportAddress(localIpAddr, localPort), H323TransportAddress(localIpAddr, localPort + 1));
/* clean up allocated memory */
@@ -1102,7 +1099,7 @@ int h323_make_call(char *host, call_details_t *cd, call_options_t call_options)
if (!h323_end_point_exist()) {
return 1;
}
- res = endPoint->MakeCall(dest, token, &cd->call_reference, call_options.port, call_options.callerid, call_options.callername);
+ res = endPoint->MakeCall(dest, token, &cd->call_reference, call_options.port, call_options.cid_num, call_options.cid_name);
memcpy((char *)(cd->call_token), (const unsigned char *)token, token.GetLength());
return res;
};
diff --git a/channels/h323/chan_h323.h b/channels/h323/chan_h323.h
index c53ee0c8c..c6acb6fd7 100755
--- a/channels/h323/chan_h323.h
+++ b/channels/h323/chan_h323.h
@@ -41,8 +41,6 @@ struct oh323_user {
int noFastStart;
int noH245Tunneling;
int noSilenceSuppression;
- int inUse;
- int incominglimit;
int bridge;
int nat;
int dtmfmode;
@@ -61,8 +59,6 @@ struct oh323_peer {
int noFastStart;
int noH245Tunneling;
int noSilenceSuppression;
- int inUse;
- int outgoinglimit;
int bridge;
int nat;
int dtmfmode;
@@ -86,8 +82,8 @@ struct oh323_alias {
/** call_option struct holds various bits
of information for each call */
typedef struct call_options {
- char *callerid;
- char *callername;
+ char *cid_num;
+ char *cid_name;
int noFastStart;
int noH245Tunneling;
int noSilenceSuppression;