[sip-comm-dev] Problem with SDP for Media Session

Hi, group:

I found a problem with sip-communicator to work with Asterisk as proxy by monitoring underlying sip interaction.

Once sip-communicator(56) initializes a call to destination(205) through Astersik(22), Asterisk responses with OK including SDP. “Connection Information” in SDP is Asterisk proxy’s IP address(22) instead of destination UAS’s IP(205), so Sip-communicator directly connects the Asterisk proxy(22) to send RTP information. Actually, in RFC3261, RTP stream should be delivered directly between UAC and UAS instead of proxy.

For Asterisk, it sends back one more Invite with SDP to UAC. It is in this SDP that includes UAS’s IP address ! But sip-communicator has started RTP with proxy since it got OK response with SDP including proxy IP.

When I use x-lite to initialize a call, it can handle this situation from Asterisk as:

SIP-COMMUNICATOR(56) initialize a call to x-lite(205) through Asterisk(22):

num 56(sip-communiator) 22(Asterisk) 205(X-lite)

Invite/SDP
1 |-------------------------->|
> >
2 | 407 Auth | |
><--------------------------| |
> > >
> ACK | |
3 |-------------------------->| |
> > >
> Invite(SDP/56) | |
4 |-------------------------->| Invite(SDP/22) |
> >----------------------->|
> Trying | |
5 |<--------------------------| |
> > >
> Ringing | |
6 |<--------------------------| |
> > ACK |
> OK(SDP/22) |<-----------------------|
7 |<--------------------------| |
> > Invite(SDP/56) |
> ACK |----------------------->|
8 |-------------------------->| |
> > >
> Invite(SDP/205) | |
9 |<--------------------------| |
> > ACK |
> Trying |<-----------------------|
10 |-------------------------->| |
> > >
> > >
> [ OK(SDP/56 ) ] | |
11 |-------------------------->| |
> > >
> [ ACK ] | |
12 |<--------------------------| |
> >
> >
> RTP |
>--------------------------------------------------->|
> RTP |
><---------------------------------------------------|

Aparently, x-lite starts RTP just after it gets Invite from Asterisk, at this time, Asterisk sends UAS IP in SDP, so x-lite can directly talk to UAS.

From above, this problem bay be:

. Asterisk doesn’t abide with RFC3261

. or, SIP-communicator mishandle this situation as a bug

Regarding the above problem, call can be done when both UAC and UAS are sip-communicator, at this situation, Asterisk proxy relay RTP session. However, it doesn’t work when ether UAC or UAS is sip-communicator.

If you can tackle this glitch, please update CVS codes, meanwhile, I’m working on it now.

Thanks

Paul

···

Express yourself instantly with MSN Messenger! MSN Messenger Download today it’s FREE!

To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

Hello Paul,

RFC3261 does not actually specify that multimedia should be sent directly between UAs in an end-to-end fashion but just suggests that (In fact RTP or any other media protocol are outside the scope of SIP). So this is not in any case a bug in asterisk and is common beavior for many SIP proxies that also serve as an RTP relay agent.

Unfortunately I had a little trouble understanding your explanation. Would it be possible for you to send me a tcpdump/ethereal dump illustrating your examples?

Emil

hu ye wrote:

···

Hi, group:

I found a problem with sip-communicator to work with Asterisk as proxy by monitoring underlying sip interaction.

Once sip-communicator(56) initializes a call to destination(205) through Astersik(22), Asterisk responses with OK including SDP. "Connection Information" in SDP is Asterisk proxy's IP address(22) instead of destination UAS's IP(205), so Sip-communicator directly connects the Asterisk proxy(22) to send RTP information. Actually, in RFC3261, RTP stream should be delivered directly between UAC and UAS instead of proxy.

For Asterisk, it sends back one more Invite with SDP to UAC. It is in this SDP that includes UAS's IP address ! But sip-communicator has started RTP with proxy since it got OK response with SDP including proxy IP.

When I use x-lite to initialize a call, it can handle this situation from Asterisk as:

SIP-COMMUNICATOR(56) initialize a call to x-lite(205) through Asterisk(22):

  num 56(sip-communiator) 22(Asterisk) 205(X-lite)

                       Invite/SDP
   1 |-------------------------->|
              > >
   2 | 407 Auth | | ><--------------------------| |
             > > >
             > ACK | |
   3 |-------------------------->| |
             > > >
             > Invite(SDP/56) | |
   4 |-------------------------->| Invite(SDP/22) |
             > >----------------------->|
             > Trying | |
   5 |<--------------------------| |
             > > >
             > Ringing | |
   6 |<--------------------------| |
             > > ACK |
             > OK(SDP/22) |<-----------------------|
   7 |<--------------------------| |
             > > Invite(SDP/56) |
             > ACK |----------------------->|
   8 |-------------------------->| |
             > > >
             > Invite(SDP/205) | |
   9 |<--------------------------| |
             > > ACK |
             > Trying |<-----------------------|
  10 |-------------------------->| |
             > > >
             > [ OK(SDP/56 ) ] | |
  11 |-------------------------->| |
             > > >
             > [ ACK ] | |
  12 |<--------------------------| |
             > >
             > RTP |
             >--------------------------------------------------->|
             > RTP |
             ><---------------------------------------------------|

Aparently, x-lite starts RTP just after it gets Invite from Asterisk, at this time, Asterisk sends UAS IP in SDP, so x-lite can directly talk to UAS.

From above, this problem bay be:

. Asterisk doesn't abide with RFC3261

. or, SIP-communicator mishandle this situation as a bug

Regarding the above problem, call can be done when both UAC and UAS are sip-communicator, at this situation, Asterisk proxy relay RTP session. However, it doesn't work when ether UAC or UAS is sip-communicator.

If you can tackle this glitch, please update CVS codes, meanwhile, I'm working on it now.

Thanks

Paul

------------------------------------------------------------------------
Express yourself instantly with MSN Messenger! MSN Messenger <http://g.msn.com/8HMAEN/2728??PS=47575> Download today it's FREE!--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

Emil:

In addition, whenever sip-communicator calling is anwsered, Lots of following warning info scrolled up on Asterisk:

Mar 14 12:04:14 WARNING[19835]: chan_sip.c:1829 sip_write: Asked to transmit frame type 1, while native formats is 4 (read/write = 4/4)

Mar 14 12:08:42 NOTICE[19907]: channel.c:1691 ast_set_write_format: Unable to find a path from gsm to g723

Thanks

Paul

···

Express yourself instantly with MSN Messenger! MSN Messenger Download today it’s FREE!

To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

Emil:

Now, I know Asterisk has 2 solution for RTP:

  1. it relay RTP by confiuring it without ReInvite

  2. it can ReInvite UAC and UAS to talk end-to-end with reinvite=true

However, sip-communicator doesn’t support reInvite till now, so it needs proxy to relay RTP. Relaying RTP is not good solution for VOIP, it overloads PBX. Regarding Telecom, SS7 is independent. so sip-communicator needs end-to-end RTP.

Paul

···

Don’t just search. Find. MSN Search Check out the new MSN Search!

To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

Emil:

Now, I know Asterisk has 2 solution for RTP:

  1. it relay RTP by confiuring it without ReInvite

  2. it can ReInvite UAC and UAS to talk end-to-end with reinvite=true

However, sip-communicator doesn’t support reInvite till now, so it needs proxy to relay RTP. Relaying RTP is not good solution for VOIP, it overloads PBX. Regarding Telecom, SS7 is independent. so sip-communicator needs end-to-end RTP.

Paul

···

Don’t just search. Find. MSN Search Check out the new MSN Search!

To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

Sorry, I shouldn’t have posted this problem here, actually, for asterisk solution as following:

Asterisk does not really have support for G723. It can do passthrough,
but it will not transcode it. Make sure to do this:

iax.conf:

disallow=all
allow=ilbc
allow=gsm
allow=ulaw

sip.conf:

disallow=all
allow=ilbc
allow=gsm
allow=ulaw

Paul

···

Don’t just search. Find. MSN Search Check out the new MSN Search!