Conference Bridge implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have tried a few methods to get conference call going but i am not able
to understand where i am commiting error

I am receiving error at this point of the code
*
status=pjmedia_resample_port_create(pool,strm_port,44100,0,&resample);
*

i have shared my code.Its attached with this mail.

Any help or pointers is highly appreciated

Sourec file attached


Thanks in advance.
John smith



---------- Forwarded message ----------
From: john smith <pyroflares@xxxxxxxxx>
Date: Tue, Oct 16, 2012 at 4:05 PM
Subject: Re: Conference Bridge implementation
To: pjsip list <pjsip at lists.pjsip.org>


Hi......



Does any one has the idea on the following requirement.Your guidance is
highly appreciated...


On Mon, Oct 15, 2012 at 2:21 PM, john smith <pyroflares at gmail.com> wrote:

> Hi Folks,
>
> I am trying to create a conference enviorment for the following requirement
>
> 1.)accepting calls from n no of b-party in such a manner that the voice
> from b-party is heard to all the users in the conference and vice versa.
> 2.)making calls from a-party to n-users  in such a manner that the voice
> from a-party is heard to all the users in the conference and vice versa.
>
> i have gone through confsample.c to get an idea.However i am successful in
> registering my account to my sip server but when i try to do
> pjsip_conf_add_port
> in my code i get the following error....
>
>
>  14:23:29.785  pjsua_media.c  Media index 0 selected for call 0
>  14:23:29.785   pjsua_core.c  TX 481 bytes Response msg 100/INVITE/cseq=1
> (tdta0x212a5f0) to UDP 172.22.0.15:5060:
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP 172.22.0.15:5060
> ;received=172.22.0.15;branch=z9hG4bKd9ea.2595dbb.1
> Via: SIP/2.0/UDP 172.22.25.245:5086
> ;rport=5086;branch=z9hG4bK462402ec-1215-e211-87fa-00137237e9b1
> Record-Route: <sip:172.22.0.15;lr;did=32f.ff82e9b>
> Call-ID: 20f600ec-1215-e211-87fa-00137237e9b1 at localhost.localdomain
> From: "john.smith" <sip:ekigatest@172.22.0.15
> >;tag=2efc00ec-1215-e211-87fa-00137237e9b1
> To: <sip:2315 at 172.22.0.15>
> CSeq: 1 INVITE
> Content-Length:  0
>
>
> --end msg--
>  14:23:29.785            APP  Incoming call from "john.smith" <
> sip:ekigatest at 172.22.0.15>!!
>  14:23:29.785  strm0x212fd48  VAD temporarily disabled
>  14:23:29.786  strm0x212fd48  Encoder stream started
>  14:23:29.786  strm0x212fd48  Decoder stream started
>  14:23:29.786  pjsua_media.c  Media updates, stream #0: speex (sendrecv)
>  14:23:29.786          pjlib  select() I/O Queue created (0x21426e8)
>  14:23:29.786  pjsua_media.c  Opening sound device PCM at 16000/1/20ms
>
> &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
>  14:23:29.834    ec0x214eef0  AEC created, clock_rate=16000, channel=1,
> samples per frame=320, tail length=200 ms, latency=100 ms
>  14:23:29.835   conference.c  Port 1 (sip:ekigatest at 172.22.0.15)
> transmitting to port 0 (Yamaha DS-1 (YMF724F): YMFPCI (hw:0,0))
>  14:23:29.835   conference.c  Port 0 (Yamaha DS-1 (YMF724F): YMFPCI
> (hw:0,0)) transmitting to port 1 (sip:ekigatest at 172.22.0.15)
>  14:23:29.872 os_core_unix.c  Info: possibly re-registering existing thread
>  14:23:30.491  strm0x212fd48  VAD re-enabled
> Expression 'ret' failed in
> 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1026
> Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir,
> &self->pcm )' failed in
> 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1183
> Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi,
> inParams, StreamDirection_In, NULL != callback )' failed in
> 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1410
> Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters,
> outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
> userData )' failed in
> 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1991
> Expression 'ret' failed in
> 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1026
> Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir,
> &self->pcm )' failed in
> 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1183
> Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi,
> inParams, StreamDirection_In, NULL != callback )' failed in
> 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1410
> Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters,
> outputParameters, sampleRate, framesPerBuffer, callback, streamFlags,
> userData )' failed in
> 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1991
>  14:23:32.248            *APP  Unable to create conference bridge: Device
> unavailable [code=469984]*
> Segmentation fault
>
> Heres my code...which is called from main.....Please guide me on this
> .................................
>
>
>
> static void on_call_media_state(pjsua_call_id call_id)
> {
>          pj_caching_pool cp;
>     pjmedia_endpt *med_endpt;
>     pj_pool_t *pool;
>     pjmedia_conf *conf;
>  pj_status_t status;
>
> int port_count;
>     pjsua_call_info ci;
>
>     pjsua_call_get_info(call_id, &ci);
>
>
>   pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
>
>     /*
>      * Initialize media endpoint.
>      * This will implicitly initialize PJMEDIA too.
>      */
>     status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
>     //PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
>
>     /* Create memory pool to allocate memory */
>     pool = pj_pool_create( &cp.factory,     /* pool factory         */
>                            "wav",           /* pool name.           */
>                            4000,            /* init size            */
>                            4000,            /* increment size       */
>                            NULL             /* callback on error    */
>                            );
>
>
>     if (ci.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
>         // When media is active, connect call to sound device.
>         pjsua_conf_connect(ci.conf_slot, 0);
>         pjsua_conf_connect(0, ci.conf_slot);
>     }
>
>
>     status = pjmedia_conf_create( pool,     /* pool to use          */
>                                   1,/* number of ports     */
>                                   44100,
>                                   1,
>                                   882,
>                                   16,
>                                   0,        /* options              */
>                                   &conf     /* result               */
>                                   );
>     if (status != PJ_SUCCESS)
>         app_perror(THIS_FILE, "Unable to create conference bridge",
> status);
> //       printf("app_perror(THIS_FILE, Unable to create conference
> bridge\n");
>
>
>
>  status =
> pjmedia_conf_add_port(conf,pool,(pjmedia_port*)ci.conf_slot,NULL,NULL);
>         if (status != PJ_SUCCESS) {
>             app_perror(THIS_FILE, "Unable to add conference port", status);
>             printf("Unable to add conference port add port to bridge\n");
>             //return 1;
>         }
>
> }
>
>
> Thanks & Regards
> John Smith
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20121016/a00e586b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple_pjsua_2.c
Type: text/x-csrc
Size: 11871 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20121016/a00e586b/attachment-0001.c>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux