Hi Thanks for reply. I check code but i suppose this is not all. Each call is add to default conference bridge in method: pjsua_media_channel_update() and then when i want add call to my conference bridge i have to create port add it to my conference bridge and remove call from default conference bridge...for this i need internal structure pjsua (pjsua_internal.h) ..IMHO this is not clean ...next thing what i have to do is open sound device like methods: pjsua_conf_connect() or pjsua_set_snd_dev() It would be nice have all sounds devices in one conference bridge...it's possible? or i have to create more conference bridges for each sound device. thanks > check out this code > > > int clock_rate = CLOCK_RATE; > > int channel_count = CHANNEL_COUNT; > > int samples_per_frame = SAMPLES_PER_FRAME; > > int bits_per_sample = BITS_PER_SAMPLE; > > pj_caching_pool cp; > > pjmedia_snd_port *snd_port; > > const pjmedia_snd_dev_info *devinfo; > > int dev_id; > > int status; > > pj_pool_t *snd_pool; > > pjmedia_snd_port *snd_port; > > pjmedia_conf *Bridge; > > devinfo = getSoundPlayerDeviceID(sounddevice,&dev_id); > > /* Must create a pool factory before we can allocate any memory. */ > > pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0); > > /* > > * Initialize media endpoint. > > * This will implicitly initialize PJMEDIA too. > > */ > > pjsua_data* pjsua_dat = pjsua_get_var(); > > > > /* Create memory pool for application purpose */ > > snd_pool = pj_pool_create( &cp.factory, /* pool factory */ > > "NEW", /* pool name. */ > > 4000, /* init size */ > > 4000, /* increment size */ > > NULL /* callback on error */ > > ); > > //Create the sound port with the specified Output Device > > status = pjmedia_snd_port_create_player(snd_pool, /* pool */ > > dev_id, /* use default dev. */ > > clock_rate, > > channel_count, > > samples_per_frame, > > bits_per_sample, > > 0, /* options */ > > &snd_port /* returned port */ > > ); > > if (status != PJ_SUCCESS) > > { > > PJ_LOG(1,(THIS_FILE,"Unable to create sound port", status)); > > return -1; > > } > > /* Create the conference bridge. > > * With default options (zero), the bridge will create an instance of > > * sound capture and playback device and connect them to slot zero. > > */ > > status = pjmedia_conf_create(snd_pool, /* pool to use */ > > PJSUA_MAX_CONF_PORTS,/* number of ports */ > > clock_rate, > > channel_count, > > samples_per_frame, > > bits_per_sample, > > PJMEDIA_CONF_NO_DEVICE, /* options */ > > &Bridge /* result */ > > ); > > if (status != PJ_SUCCESS) > > { > > PJ_LOG(1,(THIS_FILE,"Unable to create conf port", status)); > > return -1; > > } > > pjmedia_port *newSoundPort = pjmedia_conf_get_master_port(Bridge); > > status = pjmedia_snd_port_connect(snd_port, newSoundPort); > > if (status != PJ_SUCCESS) > > { > > PJ_LOG(1,(THIS_FILE,"Unable to connect sound port", status)); > > return -1; > > } > > pjmedia_conf_port_info info; > > unsigned confSlot; > > status = pjmedia_conf_get_port_info(Bridge,0,&info); > > confSlot = info.slot; > > pjmedia_conf_connect_port(Bridge, confSlot, current_call->conf_slot, 0); > > pjmedia_conf_connect_port(Bridge, current_call->conf_slot, confSlot, 0); > > On Mon, May 17, 2010 at 3:35 PM, Peter Lukac <p.lukac at emtest.sk> wrote: > > Hello all, > > > > > > I have 2 audio devices and i want these devices use for calling at the > > same > > time. I want create call and connect it to first device (mic/speaker) and > > then i want create second call and connect it to second audio > > device (mic/speaker)... I know this is not possible in standart pjsua API > > because only one audio device at the same time is supported... > > > > > > I need add new device to conf port..but how? exist some order? > > and i think use "pjsua_conf_connect" is not possible because this method > > work with default audio only so i need reimplement this function... > > > > > > Is this scenario possible? If yes can me somebody give some advice? > > > > > > > > thanks > > > > > > > > > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip at lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100524/78feabd8/attachment.html>