mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-04 04:16:54 +00:00
rollback transfer support...not properly implemented
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -407,49 +407,6 @@ H323Connection * MyH323EndPoint::CreateConnection(unsigned callReference, void *
|
||||
return new MyH323Connection(*this, callReference, options);
|
||||
}
|
||||
|
||||
H323Connection * MyH323EndPoint::SetupTransfer(const PString & token,
|
||||
const PString & callIdentity,
|
||||
const PString & remoteParty,
|
||||
PString & newToken,
|
||||
void * userData)
|
||||
{
|
||||
PString alias;
|
||||
H323TransportAddress address;
|
||||
|
||||
H323Connection * connection;
|
||||
|
||||
if (h323debug) {
|
||||
cout << " -- Setup transfer of " << callIdentity << ":" << endl;
|
||||
cout << " -- Call from " << token << endl;
|
||||
cout << " -- Remote Party " << remoteParty << endl;
|
||||
}
|
||||
|
||||
connection = FindConnectionWithLock(token);
|
||||
|
||||
if (connection != NULL) {
|
||||
unsigned int old_call_reference = connection->GetCallReference();
|
||||
|
||||
if (h323debug)
|
||||
cout << " -- Old call reference " << old_call_reference << endl;
|
||||
connection->Unlock();
|
||||
|
||||
if (on_transfer_call(old_call_reference, remoteParty)) {
|
||||
if (h323debug)
|
||||
cout << " -- Transfer succeded " << endl;
|
||||
if (connection->ClearCall(H323Connection::EndedByCallForwarded))
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (h323debug)
|
||||
cout << " -- Transfer failed " << endl;
|
||||
|
||||
if (connection != NULL) {
|
||||
return connection;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* MyH323Connection */
|
||||
MyH323Connection::MyH323Connection(MyH323EndPoint & ep,
|
||||
unsigned callReference,
|
||||
@@ -796,7 +753,6 @@ void h323_debug(int flag, unsigned level)
|
||||
/** Installs the callback functions on behalf of the PBX application */
|
||||
void h323_callback_register(setup_incoming_cb ifunc,
|
||||
setup_outbound_cb sfunc,
|
||||
setup_transfer_cb tfunc,
|
||||
on_connection_cb confunc,
|
||||
start_logchan_cb lfunc,
|
||||
clear_con_cb clfunc,
|
||||
@@ -805,7 +761,6 @@ void h323_callback_register(setup_incoming_cb ifunc,
|
||||
{
|
||||
on_incoming_call = ifunc;
|
||||
on_outgoing_call = sfunc;
|
||||
on_transfer_call = tfunc;
|
||||
on_create_connection = confunc;
|
||||
on_start_logical_channel = lfunc;
|
||||
on_connection_cleared = clfunc;
|
||||
|
||||
@@ -131,11 +131,6 @@ setup_incoming_cb on_incoming_call;
|
||||
typedef int (*setup_outbound_cb)(call_details_t);
|
||||
setup_outbound_cb on_outgoing_call;
|
||||
|
||||
/* This is a callback prototype function, called upon
|
||||
a transfer. */
|
||||
typedef int (*setup_transfer_cb)(unsigned int, const char *);
|
||||
setup_transfer_cb on_transfer_call;
|
||||
|
||||
/* This is a callback prototype function, called when the openh323
|
||||
OnStartLogicalChannel is invoked. */
|
||||
typedef void (*start_logchan_cb)(unsigned int, const char *, int);
|
||||
@@ -171,7 +166,6 @@ extern "C" {
|
||||
/* callback function handler*/
|
||||
void h323_callback_register(setup_incoming_cb,
|
||||
setup_outbound_cb,
|
||||
setup_transfer_cb,
|
||||
on_connection_cb,
|
||||
start_logchan_cb,
|
||||
clear_con_cb,
|
||||
|
||||
Reference in New Issue
Block a user