* Added forgotten OpenSER version of AmSipDialog::cancel().

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@427 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Juha Heinanen 19 years ago
parent 7109ceacc6
commit 6a1bdaceb8

@ -675,6 +675,37 @@ int AmSipDialog::transfer(const string& target)
return 0;
}
#ifdef OpenSER
int AmSipDialog::cancel()
{
int cancel_cseq = -1;
TransMap::reverse_iterator t;
for(t = uac_trans.rbegin();
t != uac_trans.rend(); t++) {
if(t->second.method == "INVITE"){
cancel_cseq = t->second.cseq;
break;
}
}
if(t == uac_trans.rend()){
ERROR("could not find INVITE transaction to cancel\n");
return -1;
}
string reply_sock = "/tmp/" + AmSession::getNewId();
string msg = ":t_uac_cancel:\n"
+ callid + "\n"
+ int2str(cancel_cseq) + "\n";
return AmServer::send_msg(msg, reply_sock, 50000);
}
#else /* Ser */
int AmSipDialog::cancel()
{
int cancel_cseq = -1;
@ -702,6 +733,8 @@ int AmSipDialog::cancel()
return AmServer::send_msg(msg, reply_sock, 50000);
}
#endif
#ifdef OpenSER
int AmSipDialog::sendRequest(const string& method,

Loading…
Cancel
Save