* 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;
fullAddress = dest; /* host */
if (h323debug)
cout << " -- Making call to " << fullAddress << "." << endl;
- }
+ }
if (!(connection = (MyH323Connection *)H323EndPoint::MakeCallLocked(fullAddress, token))) {
if (h323debug)
}
*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;
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;
public:
- int MakeCall(const PString &, PString &, unsigned int *, unsigned int);
+ int MakeCall(const PString &, PString &, unsigned int *, unsigned int, char *);
BOOL ClearCall(const PString &);
void OnClosedLogicalChannel(H323Connection &, const H323Channel &);