[OpenSIPS-Devel] [ opensips-Bugs-3519665 ] drouting: improper handling for address in dr_gateways
SourceForge.net
noreply at sourceforge.net
Fri Apr 20 00:35:48 CEST 2012
Bugs item #3519665, was opened at 2012-04-19 15:35
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3519665&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.8.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: drouting: improper handling for address in dr_gateways
Initial Comment:
The documentation specify that the address field in dr_gateways table is a SIP URI.
When a SIP URI is populated into the table, drouting fails to load.
The first thing that needs to be fixed is creating the URI that needs to be parsed in routing.c:add_dst():
@@ -491,8 +491,9 @@
pgw->type = type;
/* add address in the list */
- if(pgw->ip_str.len<5 || (strncasecmp("sip:", ip, 4)
- && strncasecmp("sips:", ip, 5)))
+ if(pgw->ip_str.len<5 ||
+ (strncasecmp("sip:",ip,4) != 0 &&
+ strncasecmp("sips:",ip,5) != 0))
{
if(pgw->ip_str.len+4>=GWABUF_MAX_SIZE) {
LM_ERR("GW address (%d) longer "
But after that, the code still expects an IP:port in pgw->ip_str (but we have a SIP URI).
When the new destination URI is created, the resulting SIP URI is bogus because the host part of the new URI is startin with "sip:"
drouting:push_gw_for_usage: adding gw [blah] as "sip:username at sip:host" in order 0
Regards,
Ovidiu Sas
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3519665&group_id=232389
More information about the Devel
mailing list