Skip to content
Snippets Groups Projects
Commit 3fabe900 authored by Jeremy McNamara's avatar Jeremy McNamara
Browse files

finish that thought

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent a948d041
Branches
Tags
No related merge requests found
...@@ -181,7 +181,7 @@ H323Codec * H323_G7231Capability::CreateCodec(H323Codec::Direction direction) co ...@@ -181,7 +181,7 @@ H323Codec * H323_G7231Capability::CreateCodec(H323Codec::Direction direction) co
* port = 1720. * port = 1720.
*/ */
int MyH323EndPoint::MakeCall(const PString & dest, PString & token, int MyH323EndPoint::MakeCall(const PString & dest, PString & token,
unsigned int *callReference, unsigned int port) unsigned int *callReference, unsigned int port, char *callerid)
{ {
PString fullAddress; PString fullAddress;
MyH323Connection * connection; MyH323Connection * connection;
...@@ -195,7 +195,7 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token, ...@@ -195,7 +195,7 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token,
fullAddress = dest; /* host */ fullAddress = dest; /* host */
if (h323debug) if (h323debug)
cout << " -- Making call to " << fullAddress << "." << endl; cout << " -- Making call to " << fullAddress << "." << endl;
} }
if (!(connection = (MyH323Connection *)H323EndPoint::MakeCallLocked(fullAddress, token))) { if (!(connection = (MyH323Connection *)H323EndPoint::MakeCallLocked(fullAddress, token))) {
if (h323debug) if (h323debug)
...@@ -204,8 +204,12 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token, ...@@ -204,8 +204,12 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token,
} }
*callReference = connection->GetCallReference(); *callReference = connection->GetCallReference();
connection->Unlock();
if (strlen(callerid))
connection->SetLocalPartyName(PString(callerid));
connection->Unlock();
if (h323debug) { if (h323debug) {
cout << " -- " << GetLocalUserName() << " is calling host " << fullAddress << endl; cout << " -- " << GetLocalUserName() << " is calling host " << fullAddress << endl;
cout << " -- " << "Call token is " << (const char *)token << endl; cout << " -- " << "Call token is " << (const char *)token << endl;
...@@ -969,7 +973,7 @@ int h323_make_call(char *host, call_details_t *cd, call_options_t call_options) ...@@ -969,7 +973,7 @@ int h323_make_call(char *host, call_details_t *cd, call_options_t call_options)
PString dest(host); PString dest(host);
res = endPoint->MakeCall(dest, token, &cd->call_reference, call_options.port); res = endPoint->MakeCall(dest, token, &cd->call_reference, call_options.port, call_options.callerid);
memcpy((char *)(cd->call_token), (const unsigned char *)token, token.GetLength()); memcpy((char *)(cd->call_token), (const unsigned char *)token, token.GetLength());
return res; return res;
......
...@@ -103,7 +103,7 @@ class MyH323EndPoint : public H323EndPoint { ...@@ -103,7 +103,7 @@ class MyH323EndPoint : public H323EndPoint {
public: public:
int MakeCall(const PString &, PString &, unsigned int *, unsigned int); int MakeCall(const PString &, PString &, unsigned int *, unsigned int, char *);
BOOL ClearCall(const PString &); BOOL ClearCall(const PString &);
void OnClosedLogicalChannel(H323Connection &, const H323Channel &); void OnClosedLogicalChannel(H323Connection &, const H323Channel &);
......
...@@ -84,7 +84,7 @@ struct oh323_alias { ...@@ -84,7 +84,7 @@ struct oh323_alias {
PBX application and passed through make_call PBX application and passed through make_call
function*/ function*/
typedef struct call_options { typedef struct call_options {
const char *callerid; char *callerid;
int noFastStart; int noFastStart;
int noH245Tunnelling; int noH245Tunnelling;
int noSilenceSuppression; int noSilenceSuppression;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment