[Asterisk-cvs] asterisk/channels/h323 ast_h323.cpp, 1.62,
1.63 chan_h323.h, 1.30, 1.31
jeremy at lists.digium.com
jeremy at lists.digium.com
Fri Oct 22 14:59:59 CDT 2004
Update of /usr/cvsroot/asterisk/channels/h323
In directory mongoose.digium.com:/tmp/cvs-serv27430/h323
Modified Files:
ast_h323.cpp chan_h323.h
Log Message:
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
Index: ast_h323.cpp
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- ast_h323.cpp 10 Oct 2004 12:20:01 -0000 1.62
+++ ast_h323.cpp 22 Oct 2004 19:04:02 -0000 1.63
@@ -218,13 +218,13 @@
* 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 @@
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 @@
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 @@
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;
};
Index: chan_h323.h
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/chan_h323.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- chan_h323.h 10 Oct 2004 12:20:01 -0000 1.30
+++ chan_h323.h 22 Oct 2004 19:04:02 -0000 1.31
@@ -41,8 +41,6 @@
int noFastStart;
int noH245Tunneling;
int noSilenceSuppression;
- int inUse;
- int incominglimit;
int bridge;
int nat;
int dtmfmode;
@@ -61,8 +59,6 @@
int noFastStart;
int noH245Tunneling;
int noSilenceSuppression;
- int inUse;
- int outgoinglimit;
int bridge;
int nat;
int dtmfmode;
@@ -86,8 +82,8 @@
/** 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;
More information about the svn-commits
mailing list