[sip-comm-dev] sound receiving (or playing?) problem with asterisk


#1

Hi,

I am trying to setup SIPCOM on asterisk.

My problem is that it stopps playing received audio after 9-10
seconds - when transmitter is started. If I switch transmitter off,
then player is not stopped.

When I make a call directly to another SIPCOM, then audio is played
fine both ways.

Can you provide me some help in this area and explain what should be
done to get audio both ways via asterisk and what can be the cause of
such problems?

Has anyone got SIPCOM working with asterisk?

···

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


#2

This is a problem, I've faced the same problem. But the tests and bug hunting :slight_smile: was left because of the new release of the Sip-Communictor. This will be tested as soon as there is new SIP provider and media services running.

As I saw when I tested it it was connected to the ports of the media.
And I found that was connected somehow to NAT. When SC is not behind NAT no such problem.

Is your SC behind NAT ?

Nick Bilak wrote:

···

Hi,

I am trying to setup SIPCOM on asterisk.

My problem is that it stopps playing received audio after 9-10
seconds - when transmitter is started. If I switch transmitter off,
then player is not stopped.

When I make a call directly to another SIPCOM, then audio is played
fine both ways.

Can you provide me some help in this area and explain what should be
done to get audio both ways via asterisk and what can be the cause of
such problems?

Has anyone got SIPCOM working with asterisk?

---------------------------------------------------------------------
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


#3

Damian,

I think the problem is with RTP and particularyly with it's TimeBase.
I'll continue researches and let you know if I get it working.

24.03.2006, 15:33:28 you wrote:

···

This is a problem, I've faced the same problem. But the tests and bug
hunting :slight_smile: was left because of the new release of the Sip-Communictor.
This will be tested as soon as there is new SIP provider and media
services running.

As I saw when I tested it it was connected to the ports of the media.
And I found that was connected somehow to NAT. When SC is not behind NAT
no such problem.

Is your SC behind NAT ?

Nick Bilak wrote:

Hi,

I am trying to setup SIPCOM on asterisk.

My problem is that it stopps playing received audio after 9-10
seconds - when transmitter is started. If I switch transmitter off,
then player is not stopped.

When I make a call directly to another SIPCOM, then audio is played
fine both ways.

Can you provide me some help in this area and explain what should be
done to get audio both ways via asterisk and what can be the cause of
such problems?

Has anyone got SIPCOM working with asterisk?

--
WBR,
Nick mailto:beluck@gmail.com

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


#4

Damian,

Finally I traced this bug down, found the problem and fixed it. :slight_smile:

The reason was that SIPC opens 2 RTP streams, first receiver and then
transmitter. This works fine if we just connect to another SIPC
directly, but asterisk uses just one RTP stream and switches sending
to a new stream (our transmitter) as soon as it is created and stops
playing to our receiver.

So what I made was changed the order of calling
MediaManager.startTransmitter() and MediaManager.startReceiver() in
MediaManager.openMediaStreams() and in AVReceiver.initialize() instead
of creating new RTPManager just took existing RTPManager of
transmitter:

if (mediaManager.activeRtpManagers != null) {
    Object[] activeRtpManagers = mediaManager.activeRtpManagers.values().toArray();
    for (int j = 0; j < activeRtpManagers.length; j++)
        mgrs[i] = (RTPManager)activeRtpManagers[j];
} else
  mgrs[i] = mediaManager.getRtpManager(new SessionAddress(mediaManager.getLocalHost(),session.port));

If someone can suggest better solution, please do so.
I tried the other way (in transmitter use RTPManager of receiver, but
can't get it working, perhaps I miss some detail).

The only problem that still remains is that startTransmitter() takes
about 5 seconds to start and this is not acceptable in telephony,
however startReceiver() was (and is) starting reasonably fast.

So I need help again :slight_smile: - now with this problem.

24.03.2006, 15:33:28 you wrote:

···

This is a problem, I've faced the same problem. But the tests and bug
hunting :slight_smile: was left because of the new release of the Sip-Communictor.
This will be tested as soon as there is new SIP provider and media
services running.

As I saw when I tested it it was connected to the ports of the media.
And I found that was connected somehow to NAT. When SC is not behind NAT
no such problem.

Is your SC behind NAT ?

Nick Bilak wrote:

Hi,

I am trying to setup SIPCOM on asterisk.

My problem is that it stopps playing received audio after 9-10
seconds - when transmitter is started. If I switch transmitter off,
then player is not stopped.

When I make a call directly to another SIPCOM, then audio is played
fine both ways.

Can you provide me some help in this area and explain what should be
done to get audio both ways via asterisk and what can be the cause of
such problems?

Has anyone got SIPCOM working with asterisk?

---------------------------------------------------------------------
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

--
WBR,
Nick mailto:beluck@gmail.com

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


#5

The only problem that still remains is that startTransmitter() takes
about 5 seconds to start and this is not acceptable in telephony,
however startReceiver() was (and is) starting reasonably fast.

Hi Nick,

I assume you are now talking about the old SIPCom? Well, I had also a problem with audio startup which I traced to the fact that SIPcomm tries to resolve the name of an IP address when it opens the audio stream. If the IP doesn't have a name, then the audio stream starts only after the DNS request has timed out. Maybe you have a similar issue?

Regards,

Johan Paul

···

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


#6

Johan,

28.03.2006, 13:04:18 you wrote:

The only problem that still remains is that startTransmitter() takes
about 5 seconds to start and this is not acceptable in telephony,
however startReceiver() was (and is) starting reasonably fast.

Hi Nick,

I assume you are now talking about the old SIPCom? Well, I had also a
problem with audio startup which I traced to the fact that SIPcomm tries
to resolve the name of an IP address when it opens the audio stream. If
the IP doesn't have a name, then the audio stream starts only after the
DNS request has timed out. Maybe you have a similar issue?

Exactly! Thanks for the hint, it is working without delays on server
with DNS entry.
Now, if you or someone else could quickly point me to the place where
I can disable this backresolving, I'd be very thankful :slight_smile:

···

--
WBR,
Nick mailto:beluck@gmail.com

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


#7

Hi,

I had a similar problem with the DNS lookup and interface binding. I
think it's how the RTPManager is implemented in JMF. Though JMF is not
open source, they provide a mechanism to implement your own RTPSocket.
You can find a sample RTPSocket code at:

http://java.sun.com/products/java-media/jmf/2.1.1/solutions/RTPConnector.html

which is probably what they used in their implementation anyway. :slight_smile:

Then you can change all the bindings and look up you want. But use it
with cautious.

Maybe there are more simpler solutions.

Thanks,
Alice

···

Exactly! Thanks for the hint, it is working without delays on server
with DNS entry.
Now, if you or someone else could quickly point me to the place where
I can disable this backresolving, I'd be very thankful :slight_smile:

--
WBR,
Nick mailto:beluck@gmail.com

--
Yuu-Heng Alice Cheng <yhcheng@research.telcordia.com>
Research Scientist, Information Assurance and Security
One Telcordia Drive, 1G310
Piscataway, NJ 08854
Phone: +1 732-699-2185 Fax: +1 732-336-7016

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


#8

Great catch guys!

We'll soon begin porting media code from pre1.0 version to the current
SC source tree. Could one of you please open an issue in the
sip-communicator-1-0-draft issue database so that we don't forget to
have a look on that?

Cheers
Emil

Nick Bilak wrote:

···

Johan,

28.03.2006, 13:04:18 you wrote:

The only problem that still remains is that startTransmitter()
takes about 5 seconds to start and this is not acceptable in
telephony, however startReceiver() was (and is) starting
reasonably fast.

> Hi Nick,

> I assume you are now talking about the old SIPCom? Well, I had
also a JP> problem with audio startup which I traced to the fact that
SIPcomm tries JP> to resolve the name of an IP address when it opens
the audio stream. If JP> the IP doesn't have a name, then the audio
stream starts only after the JP> DNS request has timed out. Maybe you
have a similar issue?

Exactly! Thanks for the hint, it is working without delays on server with DNS entry. Now, if you or someone else could quickly point me to
the place where I can disable this backresolving, I'd be very
thankful :slight_smile:


#9

Hi!

Ok, issue 47 posted.

regards,

Johan

···

Great catch guys!

We'll soon begin porting media code from pre1.0 version to the current
SC source tree. Could one of you please open an issue in the
sip-communicator-1-0-draft issue database so that we don't forget to
have a look on that?

Cheers
Emil

Nick Bilak wrote:

Johan,

28.03.2006, 13:04:18 you wrote:

The only problem that still remains is that startTransmitter()
takes about 5 seconds to start and this is not acceptable in
telephony, however startReceiver() was (and is) starting
reasonably fast.

> Hi Nick,

> I assume you are now talking about the old SIPCom? Well, I had
also a JP> problem with audio startup which I traced to the fact that
SIPcomm tries JP> to resolve the name of an IP address when it opens
the audio stream. If JP> the IP doesn't have a name, then the audio
stream starts only after the JP> DNS request has timed out. Maybe you
have a similar issue?

Exactly! Thanks for the hint, it is working without delays on server with DNS entry. Now, if you or someone else could quickly point me to
the place where I can disable this backresolving, I'd be very
thankful :slight_smile:

---------------------------------------------------------------------
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


#10

Yes, if there is still interest to use something like jxta for the peer2peer protocol, then the RTPSocketAdaptor is the only way to go as IP addresses don't exist in jxta

Nick

···

From: Yuu-Heng Alice Cheng <yhcheng@research.telcordia.com>
Reply-To: dev@sip-communicator.dev.java.net
To: dev@sip-communicator.dev.java.net
Subject: Re: [sip-comm-dev] sound receiving (or playing?) problem with asterisk
Date: Wed, 29 Mar 2006 08:25:48 -0500

Hi,

I had a similar problem with the DNS lookup and interface binding. I
think it's how the RTPManager is implemented in JMF. Though JMF is not
open source, they provide a mechanism to implement your own RTPSocket.
You can find a sample RTPSocket code at:

http://java.sun.com/products/java-media/jmf/2.1.1/solutions/RTPConnector.html

which is probably what they used in their implementation anyway. :slight_smile:

Then you can change all the bindings and look up you want. But use it
with cautious.

Maybe there are more simpler solutions.

Thanks,
Alice

> Exactly! Thanks for the hint, it is working without delays on server
> with DNS entry.
> Now, if you or someone else could quickly point me to the place where
> I can disable this backresolving, I'd be very thankful :slight_smile:
>
> --
> WBR,
> Nick mailto:beluck@gmail.com

--
Yuu-Heng Alice Cheng <yhcheng@research.telcordia.com>
Research Scientist, Information Assurance and Security
One Telcordia Drive, 1G310
Piscataway, NJ 08854
Phone: +1 732-699-2185 Fax: +1 732-336-7016

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

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters

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