[OpenSIPS-Devel] [ opensips-Bugs-3556910 ] B2B and preloaded routes. Again.

2012-08-16 Thread SourceForge . net
Bugs item #3556910, was opened at 2012-08-13 04:06
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_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: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Nick Altmann (nikbyte)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: B2B and preloaded routes. Again.

Initial Comment:
Requests with preloaded routes like this (one or two per request):
Route: sip:my_domain.com:5060;lr
b2b doesn't accept as b2b session.

Previously we hack it to accept preloaded routes with self ip, but what to do 
with self domain? Any hacks?

The code, responsible for detection:
if(msg-route)
{
LM_DBG(Found route headers\n);
route_hdr = msg-route;
/* we accept Route hdrs only if preloaded route with out IPs */
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse Route HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
/* check if first route is local*/
if ( 
parse_uri(rt-nameaddr.uri.s,rt-nameaddr.uri.len,puri)!=0 ) {
LM_ERR(Route uri is not valid %.*s\n,
rt-nameaddr.uri.len,rt-nameaddr.uri.s);
return -1;
}
if (check_self( puri.host, puri.port_no?puri.port_no:SIP_PORT,
puri.proto?puri.proto:PROTO_UDP)!= 1 ) {
LM_DBG(First Route uri is not mine\n);
return 1;  /* not for b2b */
}
/* check if second route is local*/
rt = rt-next;
if (rt==NULL) {
if (msg-route-sibling) {
route_hdr = msg-route-sibling;
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse second Route 
HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
}
}


--

Comment By: Nick Altmann (nikbyte)
Date: 2012-08-15 22:08

Message:
Thank you, Bogdan. With domain module it works well.

--

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-08-15 06:17

Message:
any update here Nick ?

--

Comment By: Nick Altmann (nikbyte)
Date: 2012-08-14 08:51

Message:
Thank you. I'll try to enable domain module and write here later.

--

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-08-14 08:49

Message:
Hi Nick,

have you either added my_domain.com as alias , either placed it into
domain module ?

The check_self() looks into both aliases and domain module.

Regards,
Bogdan

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_id=232389

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [ opensips-Bugs-3556910 ] B2B and preloaded routes. Again.

2012-08-15 Thread SourceForge . net
Bugs item #3556910, was opened at 2012-08-13 04:06
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_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: Invalid
Priority: 5
Private: No
Submitted By: Nick Altmann (nikbyte)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: B2B and preloaded routes. Again.

Initial Comment:
Requests with preloaded routes like this (one or two per request):
Route: sip:my_domain.com:5060;lr
b2b doesn't accept as b2b session.

Previously we hack it to accept preloaded routes with self ip, but what to do 
with self domain? Any hacks?

The code, responsible for detection:
if(msg-route)
{
LM_DBG(Found route headers\n);
route_hdr = msg-route;
/* we accept Route hdrs only if preloaded route with out IPs */
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse Route HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
/* check if first route is local*/
if ( 
parse_uri(rt-nameaddr.uri.s,rt-nameaddr.uri.len,puri)!=0 ) {
LM_ERR(Route uri is not valid %.*s\n,
rt-nameaddr.uri.len,rt-nameaddr.uri.s);
return -1;
}
if (check_self( puri.host, puri.port_no?puri.port_no:SIP_PORT,
puri.proto?puri.proto:PROTO_UDP)!= 1 ) {
LM_DBG(First Route uri is not mine\n);
return 1;  /* not for b2b */
}
/* check if second route is local*/
rt = rt-next;
if (rt==NULL) {
if (msg-route-sibling) {
route_hdr = msg-route-sibling;
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse second Route 
HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
}
}


--

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-08-15 06:17

Message:
any update here Nick ?

--

Comment By: Nick Altmann (nikbyte)
Date: 2012-08-14 08:51

Message:
Thank you. I'll try to enable domain module and write here later.

--

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-08-14 08:49

Message:
Hi Nick,

have you either added my_domain.com as alias , either placed it into
domain module ?

The check_self() looks into both aliases and domain module.

Regards,
Bogdan

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_id=232389

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [ opensips-Bugs-3556910 ] B2B and preloaded routes. Again.

2012-08-15 Thread SourceForge . net
Bugs item #3556910, was opened at 2012-08-13 04:06
Message generated for change (Comment added) made by nikbyte
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_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: Invalid
Priority: 5
Private: No
Submitted By: Nick Altmann (nikbyte)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: B2B and preloaded routes. Again.

Initial Comment:
Requests with preloaded routes like this (one or two per request):
Route: sip:my_domain.com:5060;lr
b2b doesn't accept as b2b session.

Previously we hack it to accept preloaded routes with self ip, but what to do 
with self domain? Any hacks?

The code, responsible for detection:
if(msg-route)
{
LM_DBG(Found route headers\n);
route_hdr = msg-route;
/* we accept Route hdrs only if preloaded route with out IPs */
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse Route HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
/* check if first route is local*/
if ( 
parse_uri(rt-nameaddr.uri.s,rt-nameaddr.uri.len,puri)!=0 ) {
LM_ERR(Route uri is not valid %.*s\n,
rt-nameaddr.uri.len,rt-nameaddr.uri.s);
return -1;
}
if (check_self( puri.host, puri.port_no?puri.port_no:SIP_PORT,
puri.proto?puri.proto:PROTO_UDP)!= 1 ) {
LM_DBG(First Route uri is not mine\n);
return 1;  /* not for b2b */
}
/* check if second route is local*/
rt = rt-next;
if (rt==NULL) {
if (msg-route-sibling) {
route_hdr = msg-route-sibling;
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse second Route 
HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
}
}


--

Comment By: Nick Altmann (nikbyte)
Date: 2012-08-15 22:08

Message:
Thank you, Bogdan. With domain module it works well.

--

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-08-15 06:17

Message:
any update here Nick ?

--

Comment By: Nick Altmann (nikbyte)
Date: 2012-08-14 08:51

Message:
Thank you. I'll try to enable domain module and write here later.

--

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-08-14 08:49

Message:
Hi Nick,

have you either added my_domain.com as alias , either placed it into
domain module ?

The check_self() looks into both aliases and domain module.

Regards,
Bogdan

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_id=232389

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [ opensips-Bugs-3556910 ] B2B and preloaded routes. Again.

2012-08-14 Thread SourceForge . net
Bugs item #3556910, was opened at 2012-08-13 04:06
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_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: Invalid
Priority: 5
Private: No
Submitted By: Nick Altmann (nikbyte)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: B2B and preloaded routes. Again.

Initial Comment:
Requests with preloaded routes like this (one or two per request):
Route: sip:my_domain.com:5060;lr
b2b doesn't accept as b2b session.

Previously we hack it to accept preloaded routes with self ip, but what to do 
with self domain? Any hacks?

The code, responsible for detection:
if(msg-route)
{
LM_DBG(Found route headers\n);
route_hdr = msg-route;
/* we accept Route hdrs only if preloaded route with out IPs */
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse Route HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
/* check if first route is local*/
if ( 
parse_uri(rt-nameaddr.uri.s,rt-nameaddr.uri.len,puri)!=0 ) {
LM_ERR(Route uri is not valid %.*s\n,
rt-nameaddr.uri.len,rt-nameaddr.uri.s);
return -1;
}
if (check_self( puri.host, puri.port_no?puri.port_no:SIP_PORT,
puri.proto?puri.proto:PROTO_UDP)!= 1 ) {
LM_DBG(First Route uri is not mine\n);
return 1;  /* not for b2b */
}
/* check if second route is local*/
rt = rt-next;
if (rt==NULL) {
if (msg-route-sibling) {
route_hdr = msg-route-sibling;
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse second Route 
HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
}
}


--

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-08-14 08:49

Message:
Hi Nick,

have you either added my_domain.com as alias , either placed it into
domain module ?

The check_self() looks into both aliases and domain module.

Regards,
Bogdan

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_id=232389

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [ opensips-Bugs-3556910 ] B2B and preloaded routes. Again.

2012-08-14 Thread SourceForge . net
Bugs item #3556910, was opened at 2012-08-13 04:06
Message generated for change (Comment added) made by nikbyte
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_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: Invalid
Priority: 5
Private: No
Submitted By: Nick Altmann (nikbyte)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: B2B and preloaded routes. Again.

Initial Comment:
Requests with preloaded routes like this (one or two per request):
Route: sip:my_domain.com:5060;lr
b2b doesn't accept as b2b session.

Previously we hack it to accept preloaded routes with self ip, but what to do 
with self domain? Any hacks?

The code, responsible for detection:
if(msg-route)
{
LM_DBG(Found route headers\n);
route_hdr = msg-route;
/* we accept Route hdrs only if preloaded route with out IPs */
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse Route HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
/* check if first route is local*/
if ( 
parse_uri(rt-nameaddr.uri.s,rt-nameaddr.uri.len,puri)!=0 ) {
LM_ERR(Route uri is not valid %.*s\n,
rt-nameaddr.uri.len,rt-nameaddr.uri.s);
return -1;
}
if (check_self( puri.host, puri.port_no?puri.port_no:SIP_PORT,
puri.proto?puri.proto:PROTO_UDP)!= 1 ) {
LM_DBG(First Route uri is not mine\n);
return 1;  /* not for b2b */
}
/* check if second route is local*/
rt = rt-next;
if (rt==NULL) {
if (msg-route-sibling) {
route_hdr = msg-route-sibling;
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse second Route 
HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
}
}


--

Comment By: Nick Altmann (nikbyte)
Date: 2012-08-14 08:51

Message:
Thank you. I'll try to enable domain module and write here later.

--

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-08-14 08:49

Message:
Hi Nick,

have you either added my_domain.com as alias , either placed it into
domain module ?

The check_self() looks into both aliases and domain module.

Regards,
Bogdan

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_id=232389

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [ opensips-Bugs-3556910 ] B2B and preloaded routes. Again.

2012-08-13 Thread SourceForge . net
Bugs item #3556910, was opened at 2012-08-13 04:06
Message generated for change (Tracker Item Submitted) made by nikbyte
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_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: Nick Altmann (nikbyte)
Assigned to: Nobody/Anonymous (nobody)
Summary: B2B and preloaded routes. Again.

Initial Comment:
Requests with preloaded routes like this (one or two per request):
Route: sip:my_domain.com:5060;lr
b2b doesn't accept as b2b session.

Previously we hack it to accept preloaded routes with self ip, but what to do 
with self domain? Any hacks?

The code, responsible for detection:
if(msg-route)
{
LM_DBG(Found route headers\n);
route_hdr = msg-route;
/* we accept Route hdrs only if preloaded route with out IPs */
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse Route HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
/* check if first route is local*/
if ( 
parse_uri(rt-nameaddr.uri.s,rt-nameaddr.uri.len,puri)!=0 ) {
LM_ERR(Route uri is not valid %.*s\n,
rt-nameaddr.uri.len,rt-nameaddr.uri.s);
return -1;
}
if (check_self( puri.host, puri.port_no?puri.port_no:SIP_PORT,
puri.proto?puri.proto:PROTO_UDP)!= 1 ) {
LM_DBG(First Route uri is not mine\n);
return 1;  /* not for b2b */
}
/* check if second route is local*/
rt = rt-next;
if (rt==NULL) {
if (msg-route-sibling) {
route_hdr = msg-route-sibling;
if (parse_rr(route_hdr)  0) {
LM_ERR(failed to parse second Route 
HF\n);
return -1;
}
rt = (rr_t*)route_hdr-parsed;
}
}


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=1086410aid=3556910group_id=232389

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel