void AmB2BCallerSession::connectCallee(const string& remote_party, const string& remote_uri, bool relayed_invite) { if(callee_status != None) terminateOtherLeg(); clear_other(); if (relayed_invite) { // relayed INVITE - we need to add the original INVITE to // list of received (relayed) requests recvd_req.insert(std::make_pair(invite_req.cseq,invite_req)); // in SIP relay mode from the beginning sip_relay_only = true; } B2BConnectEvent* ev = new B2BConnectEvent(remote_party,remote_uri); ev->body = invite_req.body; ev->hdrs = invite_req.hdrs; ev->relayed_invite = relayed_invite; ev->r_cseq = invite_req.cseq; DBG("relaying B2B connect event to %s\n", remote_uri.c_str()); relayEvent(ev); callee_status = NoReply; }
void AmB2ABSession::terminateOtherLeg() { relayEvent(new B2ABEvent(B2ABTerminateLeg)); clear_other(); }