Example "Simple PJSUA" without soundcard

BV
B. van Klinken
Thu, Sep 20, 2007 3:09 PM

Hello,

We we're now looking into the pjsip stack and we want to run something like
"Simple PJSUA" on a dedicated computer without soundcard.

The SIP audio should be exchanged between our existing telecom system and
the your stack (audio packets).

We tried to find some example for this, but could not find it.

We had a look at "Simple PJSUA", but then we see no audiocard initialisation
at all (so we don't see where the SIP audio is connected to the audio card.

We found examples regarding the PJMEDIA stack, but we don't see have to use
this in the "Simple PJSUA" example.

So we would like to have a simple application where we can put our own
speech packets into the stack and receive spechdata out of the stack.

Is there something like this available or can someone tell us how.

Regards,

B. van Klinken
Sr. Project Engineer
Rohill Technologies B.V.
Edisonstraat 12, 7903 AN Hoogeveen
P.O. Box 373, 7900 AJ Hoogeveen
The Netherlands
Tel: +31 (0)528 263 355
Fax: +31 (0)528 271 844
http://www.rohill.com/

This email, including any attached files, is confidential, may be legally
privileged, and is solely for the intended recipient(s).  If you received
this e-mail in error, please destroy it and notify us immediately by reply
mail or phone.  Any unauthorized use, dissemination, disclosure, copying or
printing is strictly prohibited. Thank you.

Hello, We we're now looking into the pjsip stack and we want to run something like "Simple PJSUA" on a dedicated computer without soundcard. The SIP audio should be exchanged between our existing telecom system and the your stack (audio packets). We tried to find some example for this, but could not find it. We had a look at "Simple PJSUA", but then we see no audiocard initialisation at all (so we don't see where the SIP audio is connected to the audio card. We found examples regarding the PJMEDIA stack, but we don't see have to use this in the "Simple PJSUA" example. So we would like to have a simple application where we can put our own speech packets into the stack and receive spechdata out of the stack. Is there something like this available or can someone tell us how. Regards, B. van Klinken Sr. Project Engineer Rohill Technologies B.V. Edisonstraat 12, 7903 AN Hoogeveen P.O. Box 373, 7900 AJ Hoogeveen The Netherlands Tel: +31 (0)528 263 355 Fax: +31 (0)528 271 844 http://www.rohill.com/ - This email, including any attached files, is confidential, may be legally privileged, and is solely for the intended recipient(s). If you received this e-mail in error, please destroy it and notify us immediately by reply mail or phone. Any unauthorized use, dissemination, disclosure, copying or printing is strictly prohibited. Thank you. -
BP
Benny Prijono
Thu, Sep 20, 2007 5:12 PM

B. van Klinken wrote:

Hello,

We we're now looking into the pjsip stack and we want to run something like
"Simple PJSUA" on a dedicated computer without soundcard.

The SIP audio should be exchanged between our existing telecom system and
the your stack (audio packets).

We tried to find some example for this, but could not find it.

We had a look at "Simple PJSUA", but then we see no audiocard initialisation
at all (so we don't see where the SIP audio is connected to the audio card.

If sound device is not initialized by application, PJSUA-LIB will
open the default sound device in pjsua_start(). If you want to use
no device (that is null sound device in pjsua's term), then call
pjsua_set_null_snd_dev() before calling pjsua_start().

In pjsua, you can set pjsua to use no device with --null-audio option.

HTH,
-benny

We found examples regarding the PJMEDIA stack, but we don't see have to use
this in the "Simple PJSUA" example.

So we would like to have a simple application where we can put our own
speech packets into the stack and receive spechdata out of the stack.

Is there something like this available or can someone tell us how.

Regards,

B. van Klinken
Sr. Project Engineer
Rohill Technologies B.V.
Edisonstraat 12, 7903 AN Hoogeveen
P.O. Box 373, 7900 AJ Hoogeveen
The Netherlands
Tel: +31 (0)528 263 355
Fax: +31 (0)528 271 844
http://www.rohill.com/

B. van Klinken wrote: > Hello, > > We we're now looking into the pjsip stack and we want to run something like > "Simple PJSUA" on a dedicated computer without soundcard. > > The SIP audio should be exchanged between our existing telecom system and > the your stack (audio packets). > > We tried to find some example for this, but could not find it. > > We had a look at "Simple PJSUA", but then we see no audiocard initialisation > at all (so we don't see where the SIP audio is connected to the audio card. If sound device is not initialized by application, PJSUA-LIB will open the default sound device in pjsua_start(). If you want to use no device (that is null sound device in pjsua's term), then call pjsua_set_null_snd_dev() before calling pjsua_start(). In pjsua, you can set pjsua to use no device with --null-audio option. HTH, -benny > We found examples regarding the PJMEDIA stack, but we don't see have to use > this in the "Simple PJSUA" example. > > So we would like to have a simple application where we can put our own > speech packets into the stack and receive spechdata out of the stack. > > Is there something like this available or can someone tell us how. > > Regards, > > B. van Klinken > Sr. Project Engineer > Rohill Technologies B.V. > Edisonstraat 12, 7903 AN Hoogeveen > P.O. Box 373, 7900 AJ Hoogeveen > The Netherlands > Tel: +31 (0)528 263 355 > Fax: +31 (0)528 271 844 > http://www.rohill.com/ > -
BV
B. van Klinken
Fri, Sep 21, 2007 10:13 AM

Hello Benny,

Thanks for your answer.

What we like to have is use something like "Simple PJSUA", but we don't know
how we get the audio bytes in our own software routines.

We now understand how to disable the soundcard, but the null device is
created. But we still then don't know how we interface with the speech data.

Can you send us a small piece of source code what we should create to get
the databytes into and from our own source code.

Regards,
B. van Klinken

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono
Sent: 07-09-20 19:13
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

B. van Klinken wrote:

Hello,

We we're now looking into the pjsip stack and we want to run something

like

"Simple PJSUA" on a dedicated computer without soundcard.

The SIP audio should be exchanged between our existing telecom system and
the your stack (audio packets).

We tried to find some example for this, but could not find it.

We had a look at "Simple PJSUA", but then we see no audiocard

initialisation

at all (so we don't see where the SIP audio is connected to the audio

card.

If sound device is not initialized by application, PJSUA-LIB will
open the default sound device in pjsua_start(). If you want to use
no device (that is null sound device in pjsua's term), then call
pjsua_set_null_snd_dev() before calling pjsua_start().

In pjsua, you can set pjsua to use no device with --null-audio option.

HTH,
-benny

We found examples regarding the PJMEDIA stack, but we don't see have to

use

this in the "Simple PJSUA" example.

So we would like to have a simple application where we can put our own
speech packets into the stack and receive spechdata out of the stack.

Is there something like this available or can someone tell us how.

Regards,

B. van Klinken
Sr. Project Engineer
Rohill Technologies B.V.
Edisonstraat 12, 7903 AN Hoogeveen
P.O. Box 373, 7900 AJ Hoogeveen
The Netherlands
Tel: +31 (0)528 263 355
Fax: +31 (0)528 271 844
http://www.rohill.com/

Hello Benny, Thanks for your answer. What we like to have is use something like "Simple PJSUA", but we don't know how we get the audio bytes in our own software routines. We now understand how to disable the soundcard, but the null device is created. But we still then don't know how we interface with the speech data. Can you send us a small piece of source code what we should create to get the databytes into and from our own source code. Regards, B. van Klinken -----Original Message----- From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono Sent: 07-09-20 19:13 To: pjsip embedded/DSP SIP discussion Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard B. van Klinken wrote: > Hello, > > We we're now looking into the pjsip stack and we want to run something like > "Simple PJSUA" on a dedicated computer without soundcard. > > The SIP audio should be exchanged between our existing telecom system and > the your stack (audio packets). > > We tried to find some example for this, but could not find it. > > We had a look at "Simple PJSUA", but then we see no audiocard initialisation > at all (so we don't see where the SIP audio is connected to the audio card. If sound device is not initialized by application, PJSUA-LIB will open the default sound device in pjsua_start(). If you want to use no device (that is null sound device in pjsua's term), then call pjsua_set_null_snd_dev() before calling pjsua_start(). In pjsua, you can set pjsua to use no device with --null-audio option. HTH, -benny > We found examples regarding the PJMEDIA stack, but we don't see have to use > this in the "Simple PJSUA" example. > > So we would like to have a simple application where we can put our own > speech packets into the stack and receive spechdata out of the stack. > > Is there something like this available or can someone tell us how. > > Regards, > > B. van Klinken > Sr. Project Engineer > Rohill Technologies B.V. > Edisonstraat 12, 7903 AN Hoogeveen > P.O. Box 373, 7900 AJ Hoogeveen > The Netherlands > Tel: +31 (0)528 263 355 > Fax: +31 (0)528 271 844 > http://www.rohill.com/ > - _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
LH
Lafras Henning
Fri, Sep 21, 2007 10:42 AM

Hi this solution from Benny worked just great for us.
Regards
Lafras

Frankly I've forgotten about pjmedia_conf_add_passive_port(). :D And I don't
have source codes handy with me now so I can't check it out.

But it's true that this function is not used by anything. So it may be true
that the implementation is broken.

More over, we now have splitcomb, which achieves the same thing in more
general manner. So if you want passive ports (actually active probably is
more correct, but anyway the term has been confusing), you can instantiate a
splitcomb, and create a reverse channel on the splitcomb, which then you can
add to the bridge using the usual pjmedia_conf_add_port(). Your thread then
can feed frames to the splitcomb.

--
Benny Prijono
http://www.pjsip.org

  • original message -
    Subject: [pjsip] Question regarding passive ports.
    From: "Lafras Henning" lafras@xietel.com
    Date: 11/09/2007 14:15

Question regarding passive ports.

I basically want to create a number of ports(10 to 20) in the conference
bridge who's audio will be fed and extracted from an external thread.

I can't to find an example of the correct use of
pjmedia_conf_add_passive_port(), so the following I have gathered from the
code.

In conference .c get_frame() comment as follows.

/* Get frame from this port.

  • For port zero (sound port) and passive ports, get the frame from

  • the rx_buffer instead. */

if (conf_port->port == NULL) {.....

So it is clear that passive functions don't have a media port, as in

create_sound_port() calls create_pasv_port with port ==NULL, this Creates
snd_buf buffers and keeps conf_port->port == NULL to work as above.

However

pjmedia_conf_add_passive_port() creates a port, then calls create_pasv_port
which does not create snd_buf buffers and keeps the port as the one created.

Function pjmedia_conf_add_passive_port() is not used anywhere and is
inconsistent with the behaviour of sound port, thus seems as though it is
not implemented correctly? Or can anyone give an example of how to use
pjmedia_conf_add_passive_port() correctly?

Many thanks and regards

Lafras


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

----- Original Message -----
From: "B. van Klinken" b.vklinken@rohill.nl
To: "'pjsip embedded/DSP SIP discussion'" pjsip@lists.pjsip.org
Sent: Friday, September 21, 2007 12:13 PM
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Hello Benny,

Thanks for your answer.

What we like to have is use something like "Simple PJSUA", but we don't

know

how we get the audio bytes in our own software routines.

We now understand how to disable the soundcard, but the null device is
created. But we still then don't know how we interface with the speech

data.

Can you send us a small piece of source code what we should create to get
the databytes into and from our own source code.

Regards,
B. van Klinken

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono
Sent: 07-09-20 19:13
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

B. van Klinken wrote:

Hello,

We we're now looking into the pjsip stack and we want to run something

like

"Simple PJSUA" on a dedicated computer without soundcard.

The SIP audio should be exchanged between our existing telecom system

and

the your stack (audio packets).

We tried to find some example for this, but could not find it.

We had a look at "Simple PJSUA", but then we see no audiocard

initialisation

at all (so we don't see where the SIP audio is connected to the audio

card.

If sound device is not initialized by application, PJSUA-LIB will
open the default sound device in pjsua_start(). If you want to use
no device (that is null sound device in pjsua's term), then call
pjsua_set_null_snd_dev() before calling pjsua_start().

In pjsua, you can set pjsua to use no device with --null-audio option.

HTH,
-benny

We found examples regarding the PJMEDIA stack, but we don't see have to

use

this in the "Simple PJSUA" example.

So we would like to have a simple application where we can put our own
speech packets into the stack and receive spechdata out of the stack.

Is there something like this available or can someone tell us how.

Regards,

B. van Klinken
Sr. Project Engineer
Rohill Technologies B.V.
Edisonstraat 12, 7903 AN Hoogeveen
P.O. Box 373, 7900 AJ Hoogeveen
The Netherlands
Tel: +31 (0)528 263 355
Fax: +31 (0)528 271 844
http://www.rohill.com/

Hi this solution from Benny worked just great for us. Regards Lafras Frankly I've forgotten about pjmedia_conf_add_passive_port(). :D And I don't have source codes handy with me now so I can't check it out. But it's true that this function is not used by anything. So it may be true that the implementation is broken. More over, we now have splitcomb, which achieves the same thing in more general manner. So if you want passive ports (actually active probably is more correct, but anyway the term has been confusing), you can instantiate a splitcomb, and create a reverse channel on the splitcomb, which then you can add to the bridge using the usual pjmedia_conf_add_port(). Your thread then can feed frames to the splitcomb. -- Benny Prijono http://www.pjsip.org - original message - Subject: [pjsip] Question regarding passive ports. From: "Lafras Henning" <lafras@xietel.com> Date: 11/09/2007 14:15 Question regarding passive ports. I basically want to create a number of ports(10 to 20) in the conference bridge who's audio will be fed and extracted from an external thread. I can't to find an example of the correct use of pjmedia_conf_add_passive_port(), so the following I have gathered from the code. In conference .c get_frame() comment as follows. /* Get frame from this port. * For port zero (sound port) and passive ports, get the frame from * the rx_buffer instead. */ if (conf_port->port == NULL) {..... So it is clear that passive functions don't have a media port, as in create_sound_port() calls create_pasv_port with port ==NULL, this Creates snd_buf buffers and keeps conf_port->port == NULL to work as above. However pjmedia_conf_add_passive_port() creates a port, then calls create_pasv_port which does not create snd_buf buffers and keeps the port as the one created. Function pjmedia_conf_add_passive_port() is not used anywhere and is inconsistent with the behaviour of sound port, thus seems as though it is not implemented correctly? Or can anyone give an example of how to use pjmedia_conf_add_passive_port() correctly? Many thanks and regards Lafras _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org ----- Original Message ----- From: "B. van Klinken" <b.vklinken@rohill.nl> To: "'pjsip embedded/DSP SIP discussion'" <pjsip@lists.pjsip.org> Sent: Friday, September 21, 2007 12:13 PM Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > Hello Benny, > > Thanks for your answer. > > What we like to have is use something like "Simple PJSUA", but we don't know > how we get the audio bytes in our own software routines. > > We now understand how to disable the soundcard, but the null device is > created. But we still then don't know how we interface with the speech data. > > Can you send us a small piece of source code what we should create to get > the databytes into and from our own source code. > > Regards, > B. van Klinken > > -----Original Message----- > From: pjsip-bounces@lists.pjsip.org > [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono > Sent: 07-09-20 19:13 > To: pjsip embedded/DSP SIP discussion > Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > > > B. van Klinken wrote: > > Hello, > > > > We we're now looking into the pjsip stack and we want to run something > like > > "Simple PJSUA" on a dedicated computer without soundcard. > > > > The SIP audio should be exchanged between our existing telecom system and > > the your stack (audio packets). > > > > We tried to find some example for this, but could not find it. > > > > We had a look at "Simple PJSUA", but then we see no audiocard > initialisation > > at all (so we don't see where the SIP audio is connected to the audio > card. > > If sound device is not initialized by application, PJSUA-LIB will > open the default sound device in pjsua_start(). If you want to use > no device (that is null sound device in pjsua's term), then call > pjsua_set_null_snd_dev() before calling pjsua_start(). > > In pjsua, you can set pjsua to use no device with --null-audio option. > > HTH, > -benny > > > > We found examples regarding the PJMEDIA stack, but we don't see have to > use > > this in the "Simple PJSUA" example. > > > > So we would like to have a simple application where we can put our own > > speech packets into the stack and receive spechdata out of the stack. > > > > Is there something like this available or can someone tell us how. > > > > Regards, > > > > B. van Klinken > > Sr. Project Engineer > > Rohill Technologies B.V. > > Edisonstraat 12, 7903 AN Hoogeveen > > P.O. Box 373, 7900 AJ Hoogeveen > > The Netherlands > > Tel: +31 (0)528 263 355 > > Fax: +31 (0)528 271 844 > > http://www.rohill.com/ > > - > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
BV
B. van Klinken
Fri, Sep 21, 2007 1:13 PM

Hello Lafras,

Thanks.

It is possible that you send me the code you used to initiate the splitcomb.
Myabe i could fin dout how to use, but it would be very much faster if i had
a reference example in source code. We're just starting tom use the PJSIP
code, so we're not quite familiar with it yet. I hope you will help.

Regards,

B. van Klinken

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Lafras Henning
Sent: 07-09-21 12:42
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Hi this solution from Benny worked just great for us.
Regards
Lafras

Frankly I've forgotten about pjmedia_conf_add_passive_port(). :D And I don't
have source codes handy with me now so I can't check it out.

But it's true that this function is not used by anything. So it may be true
that the implementation is broken.

More over, we now have splitcomb, which achieves the same thing in more
general manner. So if you want passive ports (actually active probably is
more correct, but anyway the term has been confusing), you can instantiate a
splitcomb, and create a reverse channel on the splitcomb, which then you can
add to the bridge using the usual pjmedia_conf_add_port(). Your thread then
can feed frames to the splitcomb.

--
Benny Prijono
http://www.pjsip.org

  • original message -
    Subject: [pjsip] Question regarding passive ports.
    From: "Lafras Henning" lafras@xietel.com
    Date: 11/09/2007 14:15

Question regarding passive ports.

I basically want to create a number of ports(10 to 20) in the conference
bridge who's audio will be fed and extracted from an external thread.

I can't to find an example of the correct use of
pjmedia_conf_add_passive_port(), so the following I have gathered from the
code.

In conference .c get_frame() comment as follows.

/* Get frame from this port.

  • For port zero (sound port) and passive ports, get the frame from

  • the rx_buffer instead. */

if (conf_port->port == NULL) {.....

So it is clear that passive functions don't have a media port, as in

create_sound_port() calls create_pasv_port with port ==NULL, this Creates
snd_buf buffers and keeps conf_port->port == NULL to work as above.

However

pjmedia_conf_add_passive_port() creates a port, then calls create_pasv_port
which does not create snd_buf buffers and keeps the port as the one created.

Function pjmedia_conf_add_passive_port() is not used anywhere and is
inconsistent with the behaviour of sound port, thus seems as though it is
not implemented correctly? Or can anyone give an example of how to use
pjmedia_conf_add_passive_port() correctly?

Many thanks and regards

Lafras


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

----- Original Message -----
From: "B. van Klinken" b.vklinken@rohill.nl
To: "'pjsip embedded/DSP SIP discussion'" pjsip@lists.pjsip.org
Sent: Friday, September 21, 2007 12:13 PM
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Hello Benny,

Thanks for your answer.

What we like to have is use something like "Simple PJSUA", but we don't

know

how we get the audio bytes in our own software routines.

We now understand how to disable the soundcard, but the null device is
created. But we still then don't know how we interface with the speech

data.

Can you send us a small piece of source code what we should create to get
the databytes into and from our own source code.

Regards,
B. van Klinken

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono
Sent: 07-09-20 19:13
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

B. van Klinken wrote:

Hello,

We we're now looking into the pjsip stack and we want to run something

like

"Simple PJSUA" on a dedicated computer without soundcard.

The SIP audio should be exchanged between our existing telecom system

and

the your stack (audio packets).

We tried to find some example for this, but could not find it.

We had a look at "Simple PJSUA", but then we see no audiocard

initialisation

at all (so we don't see where the SIP audio is connected to the audio

card.

If sound device is not initialized by application, PJSUA-LIB will
open the default sound device in pjsua_start(). If you want to use
no device (that is null sound device in pjsua's term), then call
pjsua_set_null_snd_dev() before calling pjsua_start().

In pjsua, you can set pjsua to use no device with --null-audio option.

HTH,
-benny

We found examples regarding the PJMEDIA stack, but we don't see have to

use

this in the "Simple PJSUA" example.

So we would like to have a simple application where we can put our own
speech packets into the stack and receive spechdata out of the stack.

Is there something like this available or can someone tell us how.

Regards,

B. van Klinken
Sr. Project Engineer
Rohill Technologies B.V.
Edisonstraat 12, 7903 AN Hoogeveen
P.O. Box 373, 7900 AJ Hoogeveen
The Netherlands
Tel: +31 (0)528 263 355
Fax: +31 (0)528 271 844
http://www.rohill.com/

Hello Lafras, Thanks. It is possible that you send me the code you used to initiate the splitcomb. Myabe i could fin dout how to use, but it would be very much faster if i had a reference example in source code. We're just starting tom use the PJSIP code, so we're not quite familiar with it yet. I hope you will help. Regards, B. van Klinken -----Original Message----- From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Lafras Henning Sent: 07-09-21 12:42 To: pjsip embedded/DSP SIP discussion Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard Hi this solution from Benny worked just great for us. Regards Lafras Frankly I've forgotten about pjmedia_conf_add_passive_port(). :D And I don't have source codes handy with me now so I can't check it out. But it's true that this function is not used by anything. So it may be true that the implementation is broken. More over, we now have splitcomb, which achieves the same thing in more general manner. So if you want passive ports (actually active probably is more correct, but anyway the term has been confusing), you can instantiate a splitcomb, and create a reverse channel on the splitcomb, which then you can add to the bridge using the usual pjmedia_conf_add_port(). Your thread then can feed frames to the splitcomb. -- Benny Prijono http://www.pjsip.org - original message - Subject: [pjsip] Question regarding passive ports. From: "Lafras Henning" <lafras@xietel.com> Date: 11/09/2007 14:15 Question regarding passive ports. I basically want to create a number of ports(10 to 20) in the conference bridge who's audio will be fed and extracted from an external thread. I can't to find an example of the correct use of pjmedia_conf_add_passive_port(), so the following I have gathered from the code. In conference .c get_frame() comment as follows. /* Get frame from this port. * For port zero (sound port) and passive ports, get the frame from * the rx_buffer instead. */ if (conf_port->port == NULL) {..... So it is clear that passive functions don't have a media port, as in create_sound_port() calls create_pasv_port with port ==NULL, this Creates snd_buf buffers and keeps conf_port->port == NULL to work as above. However pjmedia_conf_add_passive_port() creates a port, then calls create_pasv_port which does not create snd_buf buffers and keeps the port as the one created. Function pjmedia_conf_add_passive_port() is not used anywhere and is inconsistent with the behaviour of sound port, thus seems as though it is not implemented correctly? Or can anyone give an example of how to use pjmedia_conf_add_passive_port() correctly? Many thanks and regards Lafras _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org ----- Original Message ----- From: "B. van Klinken" <b.vklinken@rohill.nl> To: "'pjsip embedded/DSP SIP discussion'" <pjsip@lists.pjsip.org> Sent: Friday, September 21, 2007 12:13 PM Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > Hello Benny, > > Thanks for your answer. > > What we like to have is use something like "Simple PJSUA", but we don't know > how we get the audio bytes in our own software routines. > > We now understand how to disable the soundcard, but the null device is > created. But we still then don't know how we interface with the speech data. > > Can you send us a small piece of source code what we should create to get > the databytes into and from our own source code. > > Regards, > B. van Klinken > > -----Original Message----- > From: pjsip-bounces@lists.pjsip.org > [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono > Sent: 07-09-20 19:13 > To: pjsip embedded/DSP SIP discussion > Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > > > B. van Klinken wrote: > > Hello, > > > > We we're now looking into the pjsip stack and we want to run something > like > > "Simple PJSUA" on a dedicated computer without soundcard. > > > > The SIP audio should be exchanged between our existing telecom system and > > the your stack (audio packets). > > > > We tried to find some example for this, but could not find it. > > > > We had a look at "Simple PJSUA", but then we see no audiocard > initialisation > > at all (so we don't see where the SIP audio is connected to the audio > card. > > If sound device is not initialized by application, PJSUA-LIB will > open the default sound device in pjsua_start(). If you want to use > no device (that is null sound device in pjsua's term), then call > pjsua_set_null_snd_dev() before calling pjsua_start(). > > In pjsua, you can set pjsua to use no device with --null-audio option. > > HTH, > -benny > > > > We found examples regarding the PJMEDIA stack, but we don't see have to > use > > this in the "Simple PJSUA" example. > > > > So we would like to have a simple application where we can put our own > > speech packets into the stack and receive spechdata out of the stack. > > > > Is there something like this available or can someone tell us how. > > > > Regards, > > > > B. van Klinken > > Sr. Project Engineer > > Rohill Technologies B.V. > > Edisonstraat 12, 7903 AN Hoogeveen > > P.O. Box 373, 7900 AJ Hoogeveen > > The Netherlands > > Tel: +31 (0)528 263 355 > > Fax: +31 (0)528 271 844 > > http://www.rohill.com/ > > - > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
LH
Lafras Henning
Fri, Sep 21, 2007 1:21 PM

At the moment my code is a bit of a hack, of pjsua_app.c,
I am busy seperating it into a more sane structure, will advise once it
looks ok.
regards
Lafras

----- Original Message -----
From: "B. van Klinken" b.vklinken@rohill.nl
To: "'pjsip embedded/DSP SIP discussion'" pjsip@lists.pjsip.org
Sent: Friday, September 21, 2007 3:13 PM
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Hello Lafras,

Thanks.

It is possible that you send me the code you used to initiate the

splitcomb.

Myabe i could fin dout how to use, but it would be very much faster if i

had

a reference example in source code. We're just starting tom use the PJSIP
code, so we're not quite familiar with it yet. I hope you will help.

Regards,

B. van Klinken

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Lafras Henning
Sent: 07-09-21 12:42
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Hi this solution from Benny worked just great for us.
Regards
Lafras

Frankly I've forgotten about pjmedia_conf_add_passive_port(). :D And I

don't

have source codes handy with me now so I can't check it out.

But it's true that this function is not used by anything. So it may be

true

that the implementation is broken.

More over, we now have splitcomb, which achieves the same thing in more
general manner. So if you want passive ports (actually active probably is
more correct, but anyway the term has been confusing), you can instantiate

a

splitcomb, and create a reverse channel on the splitcomb, which then you

can

add to the bridge using the usual pjmedia_conf_add_port(). Your thread

then

can feed frames to the splitcomb.

--
Benny Prijono
http://www.pjsip.org

  • original message -
    Subject: [pjsip] Question regarding passive ports.
    From: "Lafras Henning" lafras@xietel.com
    Date: 11/09/2007 14:15

Question regarding passive ports.

I basically want to create a number of ports(10 to 20) in the conference
bridge who's audio will be fed and extracted from an external thread.

I can't to find an example of the correct use of
pjmedia_conf_add_passive_port(), so the following I have gathered from the
code.

In conference .c get_frame() comment as follows.

/* Get frame from this port.

  • For port zero (sound port) and passive ports, get the frame from

  • the rx_buffer instead. */

if (conf_port->port == NULL) {.....

So it is clear that passive functions don't have a media port, as in

create_sound_port() calls create_pasv_port with port ==NULL, this Creates
snd_buf buffers and keeps conf_port->port == NULL to work as above.

However

pjmedia_conf_add_passive_port() creates a port, then calls

create_pasv_port

which does not create snd_buf buffers and keeps the port as the one

created.

Function pjmedia_conf_add_passive_port() is not used anywhere and is
inconsistent with the behaviour of sound port, thus seems as though it is
not implemented correctly? Or can anyone give an example of how to use
pjmedia_conf_add_passive_port() correctly?

Many thanks and regards

Lafras


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

----- Original Message -----
From: "B. van Klinken" b.vklinken@rohill.nl
To: "'pjsip embedded/DSP SIP discussion'" pjsip@lists.pjsip.org
Sent: Friday, September 21, 2007 12:13 PM
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Hello Benny,

Thanks for your answer.

What we like to have is use something like "Simple PJSUA", but we don't

know

how we get the audio bytes in our own software routines.

We now understand how to disable the soundcard, but the null device is
created. But we still then don't know how we interface with the speech

data.

Can you send us a small piece of source code what we should create to

get

the databytes into and from our own source code.

Regards,
B. van Klinken

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono
Sent: 07-09-20 19:13
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

B. van Klinken wrote:

Hello,

We we're now looking into the pjsip stack and we want to run something

like

"Simple PJSUA" on a dedicated computer without soundcard.

The SIP audio should be exchanged between our existing telecom system

and

the your stack (audio packets).

We tried to find some example for this, but could not find it.

We had a look at "Simple PJSUA", but then we see no audiocard

initialisation

at all (so we don't see where the SIP audio is connected to the audio

card.

If sound device is not initialized by application, PJSUA-LIB will
open the default sound device in pjsua_start(). If you want to use
no device (that is null sound device in pjsua's term), then call
pjsua_set_null_snd_dev() before calling pjsua_start().

In pjsua, you can set pjsua to use no device with --null-audio option.

HTH,
-benny

We found examples regarding the PJMEDIA stack, but we don't see have

to

use

this in the "Simple PJSUA" example.

So we would like to have a simple application where we can put our own
speech packets into the stack and receive spechdata out of the stack.

Is there something like this available or can someone tell us how.

Regards,

B. van Klinken
Sr. Project Engineer
Rohill Technologies B.V.
Edisonstraat 12, 7903 AN Hoogeveen
P.O. Box 373, 7900 AJ Hoogeveen
The Netherlands
Tel: +31 (0)528 263 355
Fax: +31 (0)528 271 844
http://www.rohill.com/

At the moment my code is a bit of a hack, of pjsua_app.c, I am busy seperating it into a more sane structure, will advise once it looks ok. regards Lafras ----- Original Message ----- From: "B. van Klinken" <b.vklinken@rohill.nl> To: "'pjsip embedded/DSP SIP discussion'" <pjsip@lists.pjsip.org> Sent: Friday, September 21, 2007 3:13 PM Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > Hello Lafras, > > Thanks. > > It is possible that you send me the code you used to initiate the splitcomb. > Myabe i could fin dout how to use, but it would be very much faster if i had > a reference example in source code. We're just starting tom use the PJSIP > code, so we're not quite familiar with it yet. I hope you will help. > > Regards, > > B. van Klinken > > -----Original Message----- > From: pjsip-bounces@lists.pjsip.org > [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Lafras Henning > Sent: 07-09-21 12:42 > To: pjsip embedded/DSP SIP discussion > Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > > > Hi this solution from Benny worked just great for us. > Regards > Lafras > > Frankly I've forgotten about pjmedia_conf_add_passive_port(). :D And I don't > have source codes handy with me now so I can't check it out. > > But it's true that this function is not used by anything. So it may be true > that the implementation is broken. > > More over, we now have splitcomb, which achieves the same thing in more > general manner. So if you want passive ports (actually active probably is > more correct, but anyway the term has been confusing), you can instantiate a > splitcomb, and create a reverse channel on the splitcomb, which then you can > add to the bridge using the usual pjmedia_conf_add_port(). Your thread then > can feed frames to the splitcomb. > > -- > Benny Prijono > http://www.pjsip.org > > > - original message - > Subject: [pjsip] Question regarding passive ports. > From: "Lafras Henning" <lafras@xietel.com> > Date: 11/09/2007 14:15 > > Question regarding passive ports. > > > > I basically want to create a number of ports(10 to 20) in the conference > bridge who's audio will be fed and extracted from an external thread. > > > > > I can't to find an example of the correct use of > pjmedia_conf_add_passive_port(), so the following I have gathered from the > code. > > > > > In conference .c get_frame() comment as follows. > > /* Get frame from this port. > > * For port zero (sound port) and passive ports, get the frame from > > * the rx_buffer instead. */ > > if (conf_port->port == NULL) {..... > > > > > So it is clear that passive functions don't have a media port, as in > > > > > create_sound_port() calls create_pasv_port with port ==NULL, this Creates > snd_buf buffers and keeps conf_port->port == NULL to work as above. > > > > > However > > > > > pjmedia_conf_add_passive_port() creates a port, then calls create_pasv_port > which does not create snd_buf buffers and keeps the port as the one created. > > > > > Function pjmedia_conf_add_passive_port() is not used anywhere and is > inconsistent with the behaviour of sound port, thus seems as though it is > not implemented correctly? Or can anyone give an example of how to use > pjmedia_conf_add_passive_port() correctly? > > > > > Many thanks and regards > > Lafras > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > ----- Original Message ----- > From: "B. van Klinken" <b.vklinken@rohill.nl> > To: "'pjsip embedded/DSP SIP discussion'" <pjsip@lists.pjsip.org> > Sent: Friday, September 21, 2007 12:13 PM > Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > > > > Hello Benny, > > > > Thanks for your answer. > > > > What we like to have is use something like "Simple PJSUA", but we don't > know > > how we get the audio bytes in our own software routines. > > > > We now understand how to disable the soundcard, but the null device is > > created. But we still then don't know how we interface with the speech > data. > > > > Can you send us a small piece of source code what we should create to get > > the databytes into and from our own source code. > > > > Regards, > > B. van Klinken > > > > -----Original Message----- > > From: pjsip-bounces@lists.pjsip.org > > [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono > > Sent: 07-09-20 19:13 > > To: pjsip embedded/DSP SIP discussion > > Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > > > > > > B. van Klinken wrote: > > > Hello, > > > > > > We we're now looking into the pjsip stack and we want to run something > > like > > > "Simple PJSUA" on a dedicated computer without soundcard. > > > > > > The SIP audio should be exchanged between our existing telecom system > and > > > the your stack (audio packets). > > > > > > We tried to find some example for this, but could not find it. > > > > > > We had a look at "Simple PJSUA", but then we see no audiocard > > initialisation > > > at all (so we don't see where the SIP audio is connected to the audio > > card. > > > > If sound device is not initialized by application, PJSUA-LIB will > > open the default sound device in pjsua_start(). If you want to use > > no device (that is null sound device in pjsua's term), then call > > pjsua_set_null_snd_dev() before calling pjsua_start(). > > > > In pjsua, you can set pjsua to use no device with --null-audio option. > > > > HTH, > > -benny > > > > > > > We found examples regarding the PJMEDIA stack, but we don't see have to > > use > > > this in the "Simple PJSUA" example. > > > > > > So we would like to have a simple application where we can put our own > > > speech packets into the stack and receive spechdata out of the stack. > > > > > > Is there something like this available or can someone tell us how. > > > > > > Regards, > > > > > > B. van Klinken > > > Sr. Project Engineer > > > Rohill Technologies B.V. > > > Edisonstraat 12, 7903 AN Hoogeveen > > > P.O. Box 373, 7900 AJ Hoogeveen > > > The Netherlands > > > Tel: +31 (0)528 263 355 > > > Fax: +31 (0)528 271 844 > > > http://www.rohill.com/ > > > - > > > > > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
BV
B. van Klinken
Fri, Sep 21, 2007 1:37 PM

OK thanks i will wait for your clean code.

Note: it's no problem for if you send me "hack" version already now, then i
have already something to look at.

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Lafras Henning
Sent: 07-09-21 15:22
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

At the moment my code is a bit of a hack, of pjsua_app.c,
I am busy seperating it into a more sane structure, will advise once it
looks ok.
regards
Lafras

----- Original Message -----
From: "B. van Klinken" b.vklinken@rohill.nl
To: "'pjsip embedded/DSP SIP discussion'" pjsip@lists.pjsip.org
Sent: Friday, September 21, 2007 3:13 PM
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Hello Lafras,

Thanks.

It is possible that you send me the code you used to initiate the

splitcomb.

Myabe i could fin dout how to use, but it would be very much faster if i

had

a reference example in source code. We're just starting tom use the PJSIP
code, so we're not quite familiar with it yet. I hope you will help.

Regards,

B. van Klinken

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Lafras Henning
Sent: 07-09-21 12:42
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Hi this solution from Benny worked just great for us.
Regards
Lafras

Frankly I've forgotten about pjmedia_conf_add_passive_port(). :D And I

don't

have source codes handy with me now so I can't check it out.

But it's true that this function is not used by anything. So it may be

true

that the implementation is broken.

More over, we now have splitcomb, which achieves the same thing in more
general manner. So if you want passive ports (actually active probably is
more correct, but anyway the term has been confusing), you can instantiate

a

splitcomb, and create a reverse channel on the splitcomb, which then you

can

add to the bridge using the usual pjmedia_conf_add_port(). Your thread

then

can feed frames to the splitcomb.

--
Benny Prijono
http://www.pjsip.org

  • original message -
    Subject: [pjsip] Question regarding passive ports.
    From: "Lafras Henning" lafras@xietel.com
    Date: 11/09/2007 14:15

Question regarding passive ports.

I basically want to create a number of ports(10 to 20) in the conference
bridge who's audio will be fed and extracted from an external thread.

I can't to find an example of the correct use of
pjmedia_conf_add_passive_port(), so the following I have gathered from the
code.

In conference .c get_frame() comment as follows.

/* Get frame from this port.

  • For port zero (sound port) and passive ports, get the frame from

  • the rx_buffer instead. */

if (conf_port->port == NULL) {.....

So it is clear that passive functions don't have a media port, as in

create_sound_port() calls create_pasv_port with port ==NULL, this Creates
snd_buf buffers and keeps conf_port->port == NULL to work as above.

However

pjmedia_conf_add_passive_port() creates a port, then calls

create_pasv_port

which does not create snd_buf buffers and keeps the port as the one

created.

Function pjmedia_conf_add_passive_port() is not used anywhere and is
inconsistent with the behaviour of sound port, thus seems as though it is
not implemented correctly? Or can anyone give an example of how to use
pjmedia_conf_add_passive_port() correctly?

Many thanks and regards

Lafras


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

----- Original Message -----
From: "B. van Klinken" b.vklinken@rohill.nl
To: "'pjsip embedded/DSP SIP discussion'" pjsip@lists.pjsip.org
Sent: Friday, September 21, 2007 12:13 PM
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Hello Benny,

Thanks for your answer.

What we like to have is use something like "Simple PJSUA", but we don't

know

how we get the audio bytes in our own software routines.

We now understand how to disable the soundcard, but the null device is
created. But we still then don't know how we interface with the speech

data.

Can you send us a small piece of source code what we should create to

get

the databytes into and from our own source code.

Regards,
B. van Klinken

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono
Sent: 07-09-20 19:13
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

B. van Klinken wrote:

Hello,

We we're now looking into the pjsip stack and we want to run something

like

"Simple PJSUA" on a dedicated computer without soundcard.

The SIP audio should be exchanged between our existing telecom system

and

the your stack (audio packets).

We tried to find some example for this, but could not find it.

We had a look at "Simple PJSUA", but then we see no audiocard

initialisation

at all (so we don't see where the SIP audio is connected to the audio

card.

If sound device is not initialized by application, PJSUA-LIB will
open the default sound device in pjsua_start(). If you want to use
no device (that is null sound device in pjsua's term), then call
pjsua_set_null_snd_dev() before calling pjsua_start().

In pjsua, you can set pjsua to use no device with --null-audio option.

HTH,
-benny

We found examples regarding the PJMEDIA stack, but we don't see have

to

use

this in the "Simple PJSUA" example.

So we would like to have a simple application where we can put our own
speech packets into the stack and receive spechdata out of the stack.

Is there something like this available or can someone tell us how.

Regards,

B. van Klinken
Sr. Project Engineer
Rohill Technologies B.V.
Edisonstraat 12, 7903 AN Hoogeveen
P.O. Box 373, 7900 AJ Hoogeveen
The Netherlands
Tel: +31 (0)528 263 355
Fax: +31 (0)528 271 844
http://www.rohill.com/

OK thanks i will wait for your clean code. Note: it's no problem for if you send me "hack" version already now, then i have already something to look at. -----Original Message----- From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Lafras Henning Sent: 07-09-21 15:22 To: pjsip embedded/DSP SIP discussion Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard At the moment my code is a bit of a hack, of pjsua_app.c, I am busy seperating it into a more sane structure, will advise once it looks ok. regards Lafras ----- Original Message ----- From: "B. van Klinken" <b.vklinken@rohill.nl> To: "'pjsip embedded/DSP SIP discussion'" <pjsip@lists.pjsip.org> Sent: Friday, September 21, 2007 3:13 PM Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > Hello Lafras, > > Thanks. > > It is possible that you send me the code you used to initiate the splitcomb. > Myabe i could fin dout how to use, but it would be very much faster if i had > a reference example in source code. We're just starting tom use the PJSIP > code, so we're not quite familiar with it yet. I hope you will help. > > Regards, > > B. van Klinken > > -----Original Message----- > From: pjsip-bounces@lists.pjsip.org > [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Lafras Henning > Sent: 07-09-21 12:42 > To: pjsip embedded/DSP SIP discussion > Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > > > Hi this solution from Benny worked just great for us. > Regards > Lafras > > Frankly I've forgotten about pjmedia_conf_add_passive_port(). :D And I don't > have source codes handy with me now so I can't check it out. > > But it's true that this function is not used by anything. So it may be true > that the implementation is broken. > > More over, we now have splitcomb, which achieves the same thing in more > general manner. So if you want passive ports (actually active probably is > more correct, but anyway the term has been confusing), you can instantiate a > splitcomb, and create a reverse channel on the splitcomb, which then you can > add to the bridge using the usual pjmedia_conf_add_port(). Your thread then > can feed frames to the splitcomb. > > -- > Benny Prijono > http://www.pjsip.org > > > - original message - > Subject: [pjsip] Question regarding passive ports. > From: "Lafras Henning" <lafras@xietel.com> > Date: 11/09/2007 14:15 > > Question regarding passive ports. > > > > I basically want to create a number of ports(10 to 20) in the conference > bridge who's audio will be fed and extracted from an external thread. > > > > > I can't to find an example of the correct use of > pjmedia_conf_add_passive_port(), so the following I have gathered from the > code. > > > > > In conference .c get_frame() comment as follows. > > /* Get frame from this port. > > * For port zero (sound port) and passive ports, get the frame from > > * the rx_buffer instead. */ > > if (conf_port->port == NULL) {..... > > > > > So it is clear that passive functions don't have a media port, as in > > > > > create_sound_port() calls create_pasv_port with port ==NULL, this Creates > snd_buf buffers and keeps conf_port->port == NULL to work as above. > > > > > However > > > > > pjmedia_conf_add_passive_port() creates a port, then calls create_pasv_port > which does not create snd_buf buffers and keeps the port as the one created. > > > > > Function pjmedia_conf_add_passive_port() is not used anywhere and is > inconsistent with the behaviour of sound port, thus seems as though it is > not implemented correctly? Or can anyone give an example of how to use > pjmedia_conf_add_passive_port() correctly? > > > > > Many thanks and regards > > Lafras > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > ----- Original Message ----- > From: "B. van Klinken" <b.vklinken@rohill.nl> > To: "'pjsip embedded/DSP SIP discussion'" <pjsip@lists.pjsip.org> > Sent: Friday, September 21, 2007 12:13 PM > Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > > > > Hello Benny, > > > > Thanks for your answer. > > > > What we like to have is use something like "Simple PJSUA", but we don't > know > > how we get the audio bytes in our own software routines. > > > > We now understand how to disable the soundcard, but the null device is > > created. But we still then don't know how we interface with the speech > data. > > > > Can you send us a small piece of source code what we should create to get > > the databytes into and from our own source code. > > > > Regards, > > B. van Klinken > > > > -----Original Message----- > > From: pjsip-bounces@lists.pjsip.org > > [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono > > Sent: 07-09-20 19:13 > > To: pjsip embedded/DSP SIP discussion > > Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard > > > > > > B. van Klinken wrote: > > > Hello, > > > > > > We we're now looking into the pjsip stack and we want to run something > > like > > > "Simple PJSUA" on a dedicated computer without soundcard. > > > > > > The SIP audio should be exchanged between our existing telecom system > and > > > the your stack (audio packets). > > > > > > We tried to find some example for this, but could not find it. > > > > > > We had a look at "Simple PJSUA", but then we see no audiocard > > initialisation > > > at all (so we don't see where the SIP audio is connected to the audio > > card. > > > > If sound device is not initialized by application, PJSUA-LIB will > > open the default sound device in pjsua_start(). If you want to use > > no device (that is null sound device in pjsua's term), then call > > pjsua_set_null_snd_dev() before calling pjsua_start(). > > > > In pjsua, you can set pjsua to use no device with --null-audio option. > > > > HTH, > > -benny > > > > > > > We found examples regarding the PJMEDIA stack, but we don't see have to > > use > > > this in the "Simple PJSUA" example. > > > > > > So we would like to have a simple application where we can put our own > > > speech packets into the stack and receive spechdata out of the stack. > > > > > > Is there something like this available or can someone tell us how. > > > > > > Regards, > > > > > > B. van Klinken > > > Sr. Project Engineer > > > Rohill Technologies B.V. > > > Edisonstraat 12, 7903 AN Hoogeveen > > > P.O. Box 373, 7900 AJ Hoogeveen > > > The Netherlands > > > Tel: +31 (0)528 263 355 > > > Fax: +31 (0)528 271 844 > > > http://www.rohill.com/ > > > - > > > > > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
BP
Benny Prijono
Fri, Sep 21, 2007 1:47 PM

Just to help a little bit.

If you haven't done so, it will help to read the media port concept
in pjmedia, you can start here:
http://pjsip.org/pjmedia/docs/html/group__PJMEDIA__PORT__CONCEPT.htm

Related to this, there is another page that explains how media flows
between pjmedia components: http://pjsip.org/trac/wiki/media-flow

I hope that explains things a bit.

-benny

B. van Klinken wrote:

OK thanks i will wait for your clean code.

Note: it's no problem for if you send me "hack" version already now, then i
have already something to look at.

Just to help a little bit. If you haven't done so, it will help to read the media port concept in pjmedia, you can start here: http://pjsip.org/pjmedia/docs/html/group__PJMEDIA__PORT__CONCEPT.htm Related to this, there is another page that explains how media flows between pjmedia components: http://pjsip.org/trac/wiki/media-flow I hope that explains things a bit. -benny B. van Klinken wrote: > OK thanks i will wait for your clean code. > > Note: it's no problem for if you send me "hack" version already now, then i > have already something to look at.
BV
B. van Klinken
Fri, Sep 21, 2007 2:11 PM

Hello Benny,

Thanks, i had seen the pages already, but somehow it's not clear for me how
to realize the requested functionality (my problem).

I understood that i had to use a splitcomb.

I think that it must be for you only a couple of minutes and copy/paste to
modify the "Simple PJSUA", where it works with external data (e.g. store
info a memory bufer and read from another memory buffer.

When i have such an example, i think that this would be enough for me to
make our application.

So can you do that?

I think that such an example would also very useful to have on the website
so othr people can also see how this works.

Regards,

B. van Klinken

-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono
Sent: 07-09-21 15:47
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard

Just to help a little bit.

If you haven't done so, it will help to read the media port concept
in pjmedia, you can start here:
http://pjsip.org/pjmedia/docs/html/group__PJMEDIA__PORT__CONCEPT.htm

Related to this, there is another page that explains how media flows
between pjmedia components: http://pjsip.org/trac/wiki/media-flow

I hope that explains things a bit.

-benny

B. van Klinken wrote:

OK thanks i will wait for your clean code.

Note: it's no problem for if you send me "hack" version already now, then

i

have already something to look at.

Hello Benny, Thanks, i had seen the pages already, but somehow it's not clear for me how to realize the requested functionality (my problem). I understood that i had to use a splitcomb. I think that it must be for you only a couple of minutes and copy/paste to modify the "Simple PJSUA", where it works with external data (e.g. store info a memory bufer and read from another memory buffer. When i have such an example, i think that this would be enough for me to make our application. So can you do that? I think that such an example would also very useful to have on the website so othr people can also see how this works. Regards, B. van Klinken -----Original Message----- From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono Sent: 07-09-21 15:47 To: pjsip embedded/DSP SIP discussion Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard Just to help a little bit. If you haven't done so, it will help to read the media port concept in pjmedia, you can start here: http://pjsip.org/pjmedia/docs/html/group__PJMEDIA__PORT__CONCEPT.htm Related to this, there is another page that explains how media flows between pjmedia components: http://pjsip.org/trac/wiki/media-flow I hope that explains things a bit. -benny B. van Klinken wrote: > OK thanks i will wait for your clean code. > > Note: it's no problem for if you send me "hack" version already now, then i > have already something to look at. _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
BP
Benny Prijono
Fri, Sep 21, 2007 2:36 PM

B. van Klinken wrote:

Hello Benny,

Thanks, i had seen the pages already, but somehow it's not clear for me how
to realize the requested functionality (my problem).

I understood that i had to use a splitcomb.

You don't have to, actually. You only need to use splitcomb when
your application wants to actively get and put frames from/to pjmedia.

Alternatively, you can let pjmedia get and put frames from/to your
application instead. To do this, you'll just need to implement a
pjmedia_port, and provide two callbacks (get_frame and put_frame) to
be called by pjmedia. Then register your media port to the
conference bridge by using pjsua_conf_add_port(). This in fact is
the easiest way to manipulate audio frames.

See playsine.c in samples directory for a simple pjmedia_port
implementation.

I think that it must be for you only a couple of minutes and copy/paste to
modify the "Simple PJSUA", where it works with external data (e.g. store
info a memory bufer and read from another memory buffer.

For a splitcomb sample, see stereo_demo() in pjsua_app.c.

For pjmedia_port's that operate on buffer, see mem_capture.c and
mem_player.c in pjmedia. There are a whole bunch of other
pjmedia_port implementations to look at in pjmedia, of course.

cheers,
-benny

B. van Klinken wrote: > Hello Benny, > > Thanks, i had seen the pages already, but somehow it's not clear for me how > to realize the requested functionality (my problem). > > I understood that i had to use a splitcomb. You don't have to, actually. You only need to use splitcomb when your application wants to *actively* get and put frames from/to pjmedia. Alternatively, you can let pjmedia get and put frames from/to your application instead. To do this, you'll just need to implement a pjmedia_port, and provide two callbacks (get_frame and put_frame) to be called by pjmedia. Then register your media port to the conference bridge by using pjsua_conf_add_port(). This in fact is the easiest way to manipulate audio frames. See playsine.c in samples directory for a simple pjmedia_port implementation. > I think that it must be for you only a couple of minutes and copy/paste to > modify the "Simple PJSUA", where it works with external data (e.g. store > info a memory bufer and read from another memory buffer. For a splitcomb sample, see stereo_demo() in pjsua_app.c. For pjmedia_port's that operate on buffer, see mem_capture.c and mem_player.c in pjmedia. There are a whole bunch of other pjmedia_port implementations to look at in pjmedia, of course. cheers, -benny