[OpenSER-Users] Loose route problem or misunderstanding

Watkins, Bradley Bradley.Watkins at compuware.com
Tue Jun 10 22:56:28 CEST 2008


 

> -----Original Message-----
> From: Raj Jain [mailto:rj2807 at gmail.com] 
> Sent: Monday, June 09, 2008 6:46 PM
> To: Watkins, Bradley
> Cc: users at lists.openser.org
> Subject: Re: [OpenSER-Users] Loose route problem or misunderstanding
> 
> On Mon, Jun 9, 2008 at 6:35 PM, Watkins, Bradley
> <Bradley.Watkins at compuware.com> wrote:
> > I'm having a problem using loose_route, and I'm not sure if it's a
> > bug/feature/misunderstanding.
> >
> > I have a B2BUA (Asterisk) running on the same system as 
> OpenSER, and in
> > my failure_route for voicemail I direct calls there which 
> actually sends
> > them on to the voicemail server.  If someone 'zeroes out' 
> of voicemail,
> > to be forwarded to the operator, the voicemail server 
> issues a re-INVITE
> > to redirect media.  This is where the problem comes in.
> >
> > If I try to loose_route this re-INVITE, it fails.  However, 
> putting the
> > B2BUA on a different system works fine.
> 
> I'm not sure that this is a loose routing problem. A SIP message trace
> and an Asterisk 'sip set debug' trace can help identify the issue.
> 
> --
> Raj Jain
> 
> 


I'm quite sure that it is, actually.  Mind you, it could be that I'm
expecting loose_route to do something that by RFC compliance it
shouldn't, hence the admission that I may be misunderstanding.

Here's the relevant SIP messages for a failing scenario:

U 10.3.104.104:5060 -> 10.0.12.51:5060
INVITE sip:71841 at 10.0.12.51:5062 SIP/2.0.
From: <sip:77740 at 10.0.12.51>;tag=6868030a-13c4-4848318e-d46a11b5-7671.
To: "Brad Watkins"<sip:71841 at 10.0.12.51:5062>;tag=as75bb16a1.
Call-ID: 75bd11cb40e6f85239b3bf6c525bb206 at 10.0.12.51.
CSeq: 2 INVITE.
Via: SIP/2.0/UDP
10.3.104.104:5060;branch=z9hG4bK-484831a0-d46a55df-21eb.
Supported: 100rel,sipvc,replaces,timer.
User-Agent: Nortel CS1000 SIP GW release_4.5 version_sse-4.50.88.
P-Asserted-Identity:
<sip:5077740;phone-context=udp at compuware.com;user=phone>.
Privacy: none.
Contact:
<sip:5077740;phone-context=udp at compuware.com:5060;maddr=10.3.104.104;tra
nsport=udp;user=phone>.
Route: <sip:10.0.12.51;lr;ftag=as75bb16a1>.
Allow:
INVITE,ACK,BYE,REGISTER,REFER,NOTIFY,CANCEL,PRACK,OPTIONS,INFO,SUBSCRIBE
,UPDATE.
Content-Type: application/SDP.
Content-Length: 148.
.
v=0.
o=- 121469 3 IN IP4 10.3.104.104.
s=-.
t=0 0.
m=audio 5202 RTP/AVP 0 8 18.
c=IN IP4 10.3.102.105.
a=fmtp:18 annexb=no.
a=ptime:20.
a=sendrecv.

#
U 10.0.12.51:5060 -> 10.3.104.104:5060
SIP/2.0 100 Giving a try.
From: <sip:77740 at 10.0.12.51>;tag=6868030a-13c4-4848318e-d46a11b5-7671.
To: "Brad Watkins"<sip:71841 at 10.0.12.51:5062>;tag=as75bb16a1.
Call-ID: 75bd11cb40e6f85239b3bf6c525bb206 at 10.0.12.51.
CSeq: 2 INVITE.
Via: SIP/2.0/UDP
10.3.104.104:5060;branch=z9hG4bK-484831a0-d46a55df-21eb.
Server: OpenSER (1.2.3-notls (i386/linux)).
Content-Length: 0.
.

#
U 10.0.12.51:5060 -> 10.3.104.104:5060
SIP/2.0 404 Not here.
From: <sip:77740 at 10.0.12.51>;tag=6868030a-13c4-4848318e-d46a11b5-7671.
To: "Brad Watkins"<sip:71841 at 10.0.12.51:5062>;tag=as75bb16a1.
Call-ID: 75bd11cb40e6f85239b3bf6c525bb206 at 10.0.12.51.
CSeq: 2 INVITE.
Via: SIP/2.0/UDP
10.3.104.104:5060;branch=z9hG4bK-484831a0-d46a55df-21eb.
Server: OpenSER (1.2.3-notls (i386/linux)).
Content-Length: 0.



This is with a basic loose-routing construct from the sample config:

	if (has_totag()) {
		# sequential request within a dialog should
		# take the path determined by record-routing
		if (loose_route()) {
			loose_route();
			route(1);
		} else {
			sl_send_reply("404","Not here");
		}
		exit;




And here's a working snippet, with the exact same OpenSER config and
Asterisk config (except bindport on Asterisk), except with Asterisk on a
separate machine:

U 10.3.104.104:5060 -> 10.0.12.51:5060
INVITE sip:71841 at 10.0.12.52 SIP/2.0.
From: <sip:77740 at 10.0.12.51>;tag=6868030a-13c4-484eb0f3-edcbf878-e5e.
To: "Brad Watkins"<sip:71841 at 10.0.12.52>;tag=as7c7f08f2.
Call-ID: 2058be9c5b530f237378e77f2c12f5dd at 10.0.12.52.
CSeq: 2 INVITE.
Via: SIP/2.0/UDP 10.3.104.104:5060;branch=z9hG4bK-484eb100-edcc2deb-b36.
Supported: 100rel,sipvc,replaces,timer.
User-Agent: Nortel CS1000 SIP GW release_4.5 version_sse-4.50.88.
P-Asserted-Identity:
<sip:5077740;phone-context=udp at compuware.com;user=phone>.
Privacy: none.
Contact:
<sip:5077740;phone-context=udp at compuware.com:5060;maddr=10.3.104.104;tra
nsport=udp;user=phone>.
Route: <sip:10.0.12.51;lr;ftag=as7c7f08f2>.
Allow:
INVITE,ACK,BYE,REGISTER,REFER,NOTIFY,CANCEL,PRACK,OPTIONS,INFO,SUBSCRIBE
,UPDATE.
Content-Type: application/SDP.
Content-Length: 148.
.
v=0.
o=- 126019 3 IN IP4 10.3.104.104.
s=-.
t=0 0.
m=audio 5214 RTP/AVP 0 8 18.
c=IN IP4 10.3.102.107.
a=fmtp:18 annexb=no.
a=ptime:20.
a=sendrecv.

#
U 10.0.12.51:5060 -> 10.3.104.104:5060
SIP/2.0 100 Giving a try.
From: <sip:77740 at 10.0.12.51>;tag=6868030a-13c4-484eb0f3-edcbf878-e5e.
To: "Brad Watkins"<sip:71841 at 10.0.12.52>;tag=as7c7f08f2.
Call-ID: 2058be9c5b530f237378e77f2c12f5dd at 10.0.12.52.
CSeq: 2 INVITE.
Via: SIP/2.0/UDP 10.3.104.104:5060;branch=z9hG4bK-484eb100-edcc2deb-b36.
Server: OpenSER (1.2.3-notls (i386/linux)).
Content-Length: 0.
.

#
U 10.0.12.51:5060 -> 10.3.104.104:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 10.3.104.104:5060;branch=z9hG4bK-484eb100-edcc2deb-b36.
From: <sip:77740 at 10.0.12.51>;tag=6868030a-13c4-484eb0f3-edcbf878-e5e.
To: "Brad Watkins"<sip:71841 at 10.0.12.52>;tag=as7c7f08f2.
Call-ID: 2058be9c5b530f237378e77f2c12f5dd at 10.0.12.52.
CSeq: 2 INVITE.
User-Agent: Asterisk PBX.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Supported: replaces.
Contact: <sip:71841 at 10.0.12.52>.
Content-Type: application/sdp.
Content-Length: 176.
.
v=0.
o=root 407 409 IN IP4 10.0.12.52.
s=session.
c=IN IP4 10.0.12.52.
t=0 0.
m=audio 18948 RTP/AVP 0.
a=rtpmap:0 PCMU/8000.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.





More information about the Users mailing list