Discussion:
RTP Stream
Phillip Jones
2010-01-25 19:49:26 UTC
Permalink
Hi there,

Can pjsip connect and play into a conference, a standard remote RTP stream
(in the same way as it connects to a wav file). For instance, the live555
player can stream a standard rtp stream that can be played using Quicktime.
Could PJSIP use that standard RTP stream from live555 out of the box as it
were, or would some custom media programming be required?

Thanks!


Pj
Benny Prijono
2010-01-25 20:37:05 UTC
Permalink
Post by Phillip Jones
Hi there,
Can pjsip connect and play into a conference, a standard remote RTP stream
(in the same way as it connects to a wav file). For instance, the live555
player can stream a standard rtp stream that can be played using Quicktime.
Could PJSIP use that standard RTP stream from live555 out of the box as it
were, or would some custom media programming be required?
If you mean to play an incoming RTP stream to sound device (or to
record it to a WAV file), then you can use the streamutil from the
samples. Here's the synopsis of streamutil:

streamutil -h

PURPOSE:
Demonstrate how to use pjmedia stream component to transmit/receive
RTP packets to/from sound device.


USAGE:
streamutil [options]


Options:
--codec=CODEC Set the codec name.
--local-port=PORT Set local RTP port (default=4000)
--remote=IP:PORT Set the remote peer. If this option is set,
the program will transmit RTP audio to the
specified address. (default: recv only)
--play-file=WAV Send audio from the WAV file instead of from
the sound device.
--record-file=WAV Record incoming audio to WAV file instead of
playing it to sound device.
--send-recv Set stream direction to bidirectional.
--send-only Set stream direction to send only
--recv-only Set stream direction to recv only (default)
--use-srtp[=NAME] Enable SRTP with crypto suite NAME
e.g: AES_CM_128_HMAC_SHA1_80 (default),
AES_CM_128_HMAC_SHA1_32
Use this option along with the TX & RX keys,
formated of 60 hex digits (e.g: E148DA..)
--srtp-tx-key SRTP key for transmiting
--srtp-rx-key SRTP key for receiving
Phillip Jones
2010-01-25 22:08:36 UTC
Permalink
Thanks for the reply.

I don't think I mean the sound device.

In sipua for example I can say:

sipua --play-file=test.wav --auto-play

When a sip call arrives the caller hears the test.wav

What I am trying to do is something like:

sipua --play-stream=rtsp://192.168.1.4:4000

So that the caller hears the stream.

Further - there would be 3 streams - and the caller would hear the three
streams mixed, in the same way I would hear three files mixed if I called
--play-file=test1.wav --play-file=test2.wav --play-file=test3.wav and use cc


Question is - I am on the right path trying to achieve this using PJSIP?
Post by Phillip Jones
Post by Phillip Jones
Hi there,
Can pjsip connect and play into a conference, a standard remote RTP
stream
Post by Phillip Jones
(in the same way as it connects to a wav file). For instance, the live555
player can stream a standard rtp stream that can be played using
Quicktime.
Post by Phillip Jones
Could PJSIP use that standard RTP stream from live555 out of the box as
it
Post by Phillip Jones
were, or would some custom media programming be required?
If you mean to play an incoming RTP stream to sound device (or to
record it to a WAV file), then you can use the streamutil from the
streamutil -h
Demonstrate how to use pjmedia stream component to transmit/receive
RTP packets to/from sound device.
streamutil [options]
--codec=CODEC Set the codec name.
--local-port=PORT Set local RTP port (default=4000)
--remote=IP:PORT Set the remote peer. If this option is set,
the program will transmit RTP audio to the
specified address. (default: recv only)
--play-file=WAV Send audio from the WAV file instead of from
the sound device.
--record-file=WAV Record incoming audio to WAV file instead of
playing it to sound device.
--send-recv Set stream direction to bidirectional.
--send-only Set stream direction to send only
--recv-only Set stream direction to recv only (default)
--use-srtp[=NAME] Enable SRTP with crypto suite NAME
e.g: AES_CM_128_HMAC_SHA1_80 (default),
AES_CM_128_HMAC_SHA1_32
Use this option along with the TX & RX keys,
formated of 60 hex digits (e.g: E148DA..)
--srtp-tx-key SRTP key for transmiting
--srtp-rx-key SRTP key for receiving
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Benny Prijono
2010-01-26 10:38:25 UTC
Permalink
Post by Phillip Jones
Thanks for the reply.
I don't think I mean the sound device.
sipua --play-file=test.wav --auto-play
When a sip call arrives the caller hears the test.wav
sipua --play-stream=rtsp://192.168.1.4:4000
So that the caller hears the stream.
Further - there would be 3 streams - and the caller would hear the three
streams mixed, in the same way I would hear three files mixed if I called
--play-file=test1.wav --play-file=test2.wav --play-file=test3.wav and use cc
Question is - I am on the right path trying to achieve this using PJSIP?
PJSIP provides most of the components that are needed to achieve what
you want above, namely SIP, mixing/conferencing, and RTP media. But
it's missing RTSP support. And in any case, we don't have a ready to
use application which exactly does that, so some programming is
needed.

Cheers
Benny
Michael Bradley Jr
2010-01-26 10:55:41 UTC
Permalink
Hi Benny,
Post by Benny Prijono
PJSIP provides most of the components that are needed to achieve what
you want above, namely SIP, mixing/conferencing, and RTP media. But
it's missing RTSP support. And in any case, we don't have a ready to
use application which exactly does that, so some programming is
needed.
are you planing to add RTSP support to the library?

BR
Mike
Benny Prijono
2010-01-26 10:58:46 UTC
Permalink
On Tue, Jan 26, 2010 at 10:55 AM, Michael Bradley Jr
Post by Michael Bradley Jr
Hi Benny,
Post by Benny Prijono
PJSIP provides most of the components that are needed to achieve what
you want above, namely SIP, mixing/conferencing, and RTP media. But
it's missing RTSP support. And in any case, we don't have a ready to
use application which exactly does that, so some programming is
needed.
are you planing to add RTSP support to the library?
No, at least for now.

Cheers
Benny
slava
2010-01-26 12:39:19 UTC
Permalink
Dear all,

I have build everything and when I try to make a call I have next issue:

15:00:57.715 pjsua_app.c Call 0 state changed to CONFIRMED
15:00:58.142 pjsua_core.c RX 703 bytes Response msg 200/INVITE/cseq=26565 (r
data01EE3DFC) from UDP 94.226.xx.xx:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 43.221.xx.xx:5060;rport=25374;branch=z9hG4bKPjc7a54adc577d450a
aa86f20337584db3;received=80.88.xx.xx
From: <sip:43.221.58.101>;tag=3123192d0a074f2583408a743786f186
To: <sip:busxxx.dyndns.org>;tag=1276067530
Call-ID: 14355d97ec13428d9b8b5228b2bd963c
CSeq: 26565 INVITE
Contact: <sip:***@192.168.0.103:5060>
Supported: replaces
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 201

v=0
o=32233 5004 171 IN IP4 192.168.0.103
s=-
c=IN IP4 192.168.0.103
t=0 0
m=audio 5004 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv

--end msg--
15:00:58.161 pjsua_core.c TX 345 bytes Request msg ACK/cseq=26565 (tdta01F3C
228) to UDP 192.168.0.103:5060:
ACK sip:***@192.168.0.103:5060 SIP/2.0
Via: SIP/2.0/UDP 43.221.xx.xx:5060;rport;branch=z9hG4bKPj62b99c74233f40988be1a8
f33a256074
Max-Forwards: 70
From: <sip:43.221.xx.xx>;tag=3123192d0a074f2583408a743786f186
To: sip:busxxx.dyndns.org;tag=1276067530
Call-ID: 14355d97ec13428d9b8b5228b2bd963c
CSeq: 26565 ACK
Content-Length: 0


Any idea why after receiving from 94.226.xx.xx:5060
15:00:58.142 pjsua_core.c RX 703 bytes Response msg 200/INVITE/cseq=26565 (r
data01EE3DFC) from UDP 94.226.xx.xx:5060:

we reply to 192.168.0.103:5060
15:00:58.161 pjsua_core.c TX 345 bytes Request msg ACK/cseq=26565 (tdta01F3C
228) to UDP 192.168.0.103:5060:
????

Is there any define to force reply to the same address? Who parsed
this response and change IP?
--
Slava.
Phillip Jones
2010-01-27 22:20:52 UTC
Permalink
Benny,

Thanks for your response and insight. Appreciated.

pj
Post by Benny Prijono
Post by Phillip Jones
Thanks for the reply.
I don't think I mean the sound device.
sipua --play-file=test.wav --auto-play
When a sip call arrives the caller hears the test.wav
sipua --play-stream=rtsp://192.168.1.4:4000
So that the caller hears the stream.
Further - there would be 3 streams - and the caller would hear the three
streams mixed, in the same way I would hear three files mixed if I called
--play-file=test1.wav --play-file=test2.wav --play-file=test3.wav and use
cc
Post by Phillip Jones
Question is - I am on the right path trying to achieve this using PJSIP?
PJSIP provides most of the components that are needed to achieve what
you want above, namely SIP, mixing/conferencing, and RTP media. But
it's missing RTSP support. And in any case, we don't have a ready to
use application which exactly does that, so some programming is
needed.
Cheers
Benny
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Continue reading on narkive:
Loading...