aboutsummaryrefslogtreecommitdiffstats
path: root/channels/h323/ast_h323.cpp
diff options
context:
space:
mode:
authorjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-23 02:27:44 +0000
committerjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-23 02:27:44 +0000
commitfa4f591d788840540ec8e71804033d86e9c31e98 (patch)
treee1259b4f2df86e0808536c50f5e4dfece1f98f55 /channels/h323/ast_h323.cpp
parent94c8887482e6b023ae871b2979616a444f2e5b2c (diff)
finish that thought
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1204 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323/ast_h323.cpp')
-rwxr-xr-xchannels/h323/ast_h323.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/channels/h323/ast_h323.cpp b/channels/h323/ast_h323.cpp
index 15b7dbd8b..a3a75b299 100755
--- a/channels/h323/ast_h323.cpp
+++ b/channels/h323/ast_h323.cpp
@@ -181,7 +181,7 @@ H323Codec * H323_G7231Capability::CreateCodec(H323Codec::Direction direction) co
* port = 1720.
*/
int MyH323EndPoint::MakeCall(const PString & dest, PString & token,
- unsigned int *callReference, unsigned int port)
+ unsigned int *callReference, unsigned int port, char *callerid)
{
PString fullAddress;
MyH323Connection * connection;
@@ -195,7 +195,7 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token,
fullAddress = dest; /* host */
if (h323debug)
cout << " -- Making call to " << fullAddress << "." << endl;
- }
+ }
if (!(connection = (MyH323Connection *)H323EndPoint::MakeCallLocked(fullAddress, token))) {
if (h323debug)
@@ -204,8 +204,12 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token,
}
*callReference = connection->GetCallReference();
- connection->Unlock();
+ if (strlen(callerid))
+ connection->SetLocalPartyName(PString(callerid));
+
+ connection->Unlock();
+
if (h323debug) {
cout << " -- " << GetLocalUserName() << " is calling host " << fullAddress << 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)
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());
return res;