Author: rco
Date: 2008-04-15 16:43:39 +0200 (Tue, 15 Apr 2008)
New Revision: 889
Modified:
trunk/core/plug-in/sipctrl/SipCtrlInterface.cpp
trunk/core/plug-in/sipctrl/SipCtrlInterface.h
Log:
- fixes route-set passed to the core.
Modified: trunk/core/plug-in/sipctrl/SipCtrlInterface.cpp
===================================================================
--- trunk/core/plug-in/sipctrl/SipCtrlInterface.cpp 2008-04-13 16:08:15 UTC
(rev 888)
+++ trunk/core/plug-in/sipctrl/SipCtrlInterface.cpp 2008-04-15 14:43:39 UTC
(rev 889)
@@ -466,7 +466,7 @@
req.body = c2stlstr(msg->body);
req.serKey = tid;
- prepare_routes(msg->record_route, req.route);
+ prepare_routes_uas(msg->record_route, req.route);
for (list<sip_header*>::iterator it = msg->hdrs.begin();
it != msg->hdrs.end(); ++it) {
@@ -531,7 +531,7 @@
//
// reply.next_hop;
- prepare_routes(msg->record_route, reply.route);
+ prepare_routes_uac(msg->record_route, reply.route);
for (list<sip_header*>::iterator it = msg->hdrs.begin();
it != msg->hdrs.end(); ++it) {
@@ -544,7 +544,7 @@
handleSipMsg(reply);
}
-void SipCtrlInterface::prepare_routes(const list<sip_header*>& routes, string&
route_field)
+void SipCtrlInterface::prepare_routes_uac(const list<sip_header*>& routes,
string& route_field)
{
if(!routes.empty()){
@@ -560,6 +560,22 @@
}
}
+void SipCtrlInterface::prepare_routes_uas(const list<sip_header*>& routes,
string& route_field)
+{
+ if(!routes.empty()){
+
+ list<sip_header*>::const_iterator it = routes.begin();
+
+ route_field = c2stlstr((*it)->value);
+ ++it;
+
+ for(; it != routes.end(); ++it) {
+
+ route_field += ", " + c2stlstr((*it)->value);
+ }
+ }
+}
+
/** EMACS **
* Local variables:
* mode: c++
Modified: trunk/core/plug-in/sipctrl/SipCtrlInterface.h
===================================================================
--- trunk/core/plug-in/sipctrl/SipCtrlInterface.h 2008-04-13 16:08:15 UTC
(rev 888)
+++ trunk/core/plug-in/sipctrl/SipCtrlInterface.h 2008-04-15 14:43:39 UTC
(rev 889)
@@ -64,7 +64,8 @@
trans_layer* tl;
- void prepare_routes(const list<sip_header*>& routes, string& route_field);
+ void prepare_routes_uac(const list<sip_header*>& routes, string&
route_field);
+ void prepare_routes_uas(const list<sip_header*>& routes, string&
route_field);
int cancel(const AmSipRequest& req);
protected:
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev