removed some more unneeded stuff

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1153 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 18 years ago
parent 00b6f26559
commit 18d46a82bb

@ -152,11 +152,35 @@ void b2b_connectDialog::onSessionStart(const AmSipRequest& req)
void b2b_connectDialog::onB2ABEvent(B2ABEvent* ev)
{
if (ev->event_id == B2ABConnectOtherLegException) {
B2ABConnectOtherLegExceptionEvent* ex_ev =
dynamic_cast<B2ABConnectOtherLegExceptionEvent*>(ev);
if (ex_ev && dlg.getStatus() == AmSipDialog::Pending) {
DBG("callee leg creation failed with exception '%d %s'\n",
ex_ev->code, ex_ev->reason.c_str());
dlg.reply(invite_req, ex_ev->code, ex_ev->reason);
setStopped();
return;
}
}
if (ev->event_id == B2ABConnectOtherLegFailed) {
B2ABConnectOtherLegFailedEvent* f_ev =
dynamic_cast<B2ABConnectOtherLegFailedEvent*>(ev);
if (f_ev && dlg.getStatus() == AmSipDialog::Pending) {
DBG("callee leg creation failed with reply '%d %s'\n",
f_ev->code, f_ev->reason.c_str());
dlg.reply(invite_req, f_ev->code, f_ev->reason);
setStopped();
return;
}
}
if (ev->event_id == B2ABConnectAudio) {
// delayed processing of first INVITE request
AmSession::onInvite(invite_req);
}
AmB2ABCallerSession::onB2ABEvent(ev);
}
@ -241,9 +265,8 @@ AmB2ABCalleeSession* b2b_connectDialog::createCalleeSession()
}
b2b_connectCalleeSession::b2b_connectCalleeSession(const string& other_tag,
const string& user, const string& pwd)
: auth(NULL),
credentials("", user, pwd), // domain (realm) is unused in credentials
const string& user, const string& pwd)
: credentials("", user, pwd), // domain (realm) is unused in credentials
AmB2ABCalleeSession(other_tag) {
rtp_str.setPlayoutType(ADAPTIVE_PLAYOUT);
@ -251,8 +274,7 @@ b2b_connectCalleeSession::b2b_connectCalleeSession(const string& other_tag,
}
b2b_connectCalleeSession::~b2b_connectCalleeSession() {
if (auth)
delete auth;
}
inline UACAuthCred* b2b_connectCalleeSession::getCredentials() {
@ -260,34 +282,13 @@ inline UACAuthCred* b2b_connectCalleeSession::getCredentials() {
}
void b2b_connectCalleeSession::onSipReply(const AmSipReply& reply) {
AmB2ABCalleeSession::onSipReply(reply);
}
void b2b_connectCalleeSession::onSendRequest(const string& method, const string& content_type,
const string& body, string& hdrs, int flags, unsigned int cseq)
{
AmB2ABCalleeSession::onSendRequest(method, content_type,
body, hdrs, flags, cseq);
}
void b2b_connectCalleeSession::onB2ABEvent(B2ABEvent* ev)
{
// if (ev->event_id == B2ABConnectAudio) {
// // delayed processing of first INVITE request
// AmSession::onInvite(invite_req);
// }
AmB2ABCalleeSession::onB2ABEvent(ev);
}
void b2b_connectCalleeSession::process(AmEvent* ev)
{
AmAudioEvent* audio_event = dynamic_cast<AmAudioEvent*>(ev);
if(audio_event && (audio_event->event_id == AmAudioEvent::noAudio)){
DBG("connecting audio\n");
connectSession();
return;
}
AmB2ABCalleeSession::process(ev);
int status_before = dlg.getStatus();
AmB2ABCalleeSession::onSipReply(reply);
int status = dlg.getStatus();
if ((status_before == AmSipDialog::Pending)&&
(status == AmSipDialog::Disconnected)) {
DBG("status change Pending -> Disconnected. Stopping session.\n");
setStopped();
}
}

@ -89,23 +89,15 @@ class b2b_connectCalleeSession
: public AmB2ABCalleeSession, public CredentialHolder
{
UACAuthCred credentials;
AmSessionEventHandler* auth;
AmSipRequest invite_req;
protected:
void onSipReply(const AmSipReply& reply);
void onSipReply(const AmSipReply& reply);
void onSendRequest(const string& method, const string& content_type,
const string& body, string& hdrs, int flags, unsigned int cseq);
public:
public:
b2b_connectCalleeSession(const string& other_tag, const string& user, const string& pwd);
~b2b_connectCalleeSession();
void onB2ABEvent(B2ABEvent* ev);
void process(AmEvent* ev);
inline UACAuthCred* getCredentials();
void setAuthHandler(AmSessionEventHandler* h) { auth = h; }
};
#endif

Loading…
Cancel
Save