Merge branch 'master' of ssh://git.sip-router.org/sems

sayer/1.4-spce2.6
Peter Lemenkov 16 years ago
commit 02eb6a7a8d

@ -52,9 +52,6 @@ SBC - feature-wishlist
using std::map;
string SBCFactory::user;
string SBCFactory::domain;
string SBCFactory::pwd;
AmConfigReader SBCFactory::cfg;
AmSessionEventHandlerFactory* SBCFactory::session_timer_fact = NULL;

@ -66,9 +66,6 @@ class SBCFactory: public AmSessionFactory,
int onLoad();
AmSession* onInvite(const AmSipRequest& req);
static string user;
static string domain;
static string pwd;
static AmConfigReader cfg;
static AmSessionEventHandlerFactory* session_timer_fact;

@ -595,18 +595,20 @@ int AmB2BCallerSession::relayEvent(AmEvent* ev)
{
if(other_id.empty()){
if(dynamic_cast<B2BEvent*>(ev)){
B2BSipEvent* sip_ev = dynamic_cast<B2BSipEvent*>(ev);
B2BConnectEvent* co_ev = dynamic_cast<B2BConnectEvent*>(ev);
if( (sip_ev && sip_ev->forward) || co_ev ) {
createCalleeSession();
if (other_id.length()) {
MONITORING_LOG(getLocalTag().c_str(), "b2b_leg", other_id.c_str());
}
bool create_callee = false;
B2BSipEvent* sip_ev = dynamic_cast<B2BSipEvent*>(ev);
if (sip_ev && sip_ev->forward)
create_callee = true;
else
create_callee = dynamic_cast<B2BConnectEvent*>(ev) != NULL;
if (create_callee) {
createCalleeSession();
if (other_id.length()) {
MONITORING_LOG(getLocalTag().c_str(), "b2b_leg", other_id.c_str());
}
}
}
return AmB2BSession::relayEvent(ev);

@ -81,18 +81,6 @@ struct B2BSipReplyEvent: public B2BSipEvent
{ }
};
/** \brief relay a message body to other leg in B2B session */
struct B2BMsgBodyEvent : public B2BEvent {
string content_type;
string body;
B2BMsgBodyEvent(const string& content_type,
const string& body)
: B2BEvent(B2BMsgBody),
content_type(content_type), body(body) { }
~B2BMsgBodyEvent() { }
};
/** \brief trigger connecting the callee leg in B2B session */
struct B2BConnectEvent: public B2BEvent
{

@ -97,13 +97,14 @@ void AmSipDialog::updateStatus(const AmSipRequest& req)
return;
}
if ((req.method == "INVITE") && pending_invites) {
reply_error(req,500, SIP_REPLY_SERVER_INTERNAL_ERROR,
"Retry-After: " + int2str(get_random() % 10) + CRLF);
return;
}
else {
pending_invites++;
if (req.method == "INVITE") {
if (pending_invites) {
reply_error(req,500, SIP_REPLY_SERVER_INTERNAL_ERROR,
"Retry-After: " + int2str(get_random() % 10) + CRLF);
return;
}
pending_invites++;
}
r_cseq = req.cseq;

@ -182,7 +182,7 @@ void udp_trsp::run()
return;
}
DBG("Started UDP server listening to %s:%i\n",sock->get_ip(),sock->get_port());
DBG("Started UDP server listening on %s:%i\n",sock->get_ip(),sock->get_port());
while(true){

Loading…
Cancel
Save