Calls being mixed :S

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

 



Hi,

I think you should examine the conference ports list when both calls
are in confirmed state, the log you send only print the list when only
one call confirmed. You may put conf_list() in the
on_call_media_state() after connecting those ports.

Regards,
nanang


On Tue, Nov 11, 2008 at 7:56 PM, Jo?o C?sar <jpcesar at gmail.com> wrote:
> Ok i've added that debug method, and called it after i call the
> make_call method.
>
> (...)
> on call state  12:47:10.468            APP Call 0 state=CALLING
> (...)
> --> Conference ports:
> --> Port #00[16KHz/20ms/1]         Master/sound  transmitting to:
> --> Port #01[ 8KHz/32ms/1]      memory playback  transmitting to:
> (...)
> on call state  12:47:10.468            APP Call 0 state=EARLY
> on call state  12:47:10.718            APP Call 0 state=CONNECTING
> (...)
>
>  12:47:10.718  pjsua_media.c Media updates, stream #0: PCMA (sendrecv)
> on call media state 12:47:10.718   conference.c Port 2 (sip:6633 at 10.0.1.27) tran
> smitting to port 0 (Master/sound)
>  12:47:10.718   conference.c Port 1 (memory playback) transmitting to port 2 (si
> p:6633 at 10.0.1.27)
> (...)
> on call state  12:47:10.718            APP Call 0 state=CONFIRMED
>  12:47:50.656   pjsua_call.c Making call with acc #0 to sip:2557 at 10.0.1.27
>  12:47:50.656  pjsua_media.c Media index 0 selected for call 1
> (...)
> on call state  12:47:50.671            APP Call 1 state=CALLING
> (...)
> --> Conference ports:
> --> Port #00[16KHz/20ms/1]         Master/sound  transmitting to:
> --> Port #01[ 8KHz/32ms/1]      memory playback  transmitting to: #2
> --> Port #02[ 8KHz/20ms/1]   sip:6633 at 10.0.1.27  transmitting to: #0
> --> Port #03[ 8KHz/32ms/1]      memory playback  transmitting to:
> (...)
> on call state  12:47:50.671            APP Call 1 state=EARLY
> on call state  12:47:50.859            APP Call 1 state=CONNECTING
>  12:47:50.875  pjsua_media.c Media updates, stream #0: PCMA (sendrecv)
> on call media state 12:47:50.875   conference.c Port 4 (sip:2557 at 10.0.1.27) tran
> smitting to port 0 (Master/sound)
>  12:47:50.875   conference.c Port 3 (memory playback) transmitting to port 4 (si
> p:2557 at 10.0.1.27)
> on call state  12:47:50.875            APP Call 1 state=CONFIRMED
> (...)
>
> I'm supposed to have 2 calls, one to sip2557 at 10.0.1.27 and other to
> sip:6633 at 10.0.1.27
>
> The conference list does not seem right but also does not seem he is
> mixing the 2 slots.
>
> Where is the proper place to put the list? On the media callback?
>
> Thanks
>
> On Tue, Nov 11, 2008 at 12:34 PM, Nanang Izzuddin <nanang at pjsip.org> wrote:
>> Hi,
>>
>> It seems to be about connecting conference bridge ports. Perhaps
>> providing a 'debug' function like conf_list() in the pjsua_app.c can
>> help locating the problem.
>>
>> Regards,
>> nanang
>>
>>
>> On Tue, Nov 11, 2008 at 6:14 PM, Jo?o C?sar <jpcesar at gmail.com> wrote:
>>> Hello mighty ones,
>>>
>>> We are using memory ports to feed audio samples to our calls. He have
>>> now started to test multiple calls and for our surprise calls are
>>> being mixed together by the conference.
>>>
>>> As an example, I've just made 2 calls and debugged the result.
>>>
>>> Call 0 is on conference slot 2 and media port 1.
>>> Call 1 is on conference slot 4 and media port 3.
>>>
>>> This is how we are making a call:
>>>
>>> --------------------------------------
>>>
>>>                        // create a media port to generate samples.
>>>                status = create_memory_port( pool, sampleRate, frameSize,
>>> numberFrames, channelCount,
>>> &callData[sessionId].memory_port_phone_out);
>>>                WriteToLog("Created Memory Port",sessionId);
>>>
>>>                // add port to conference
>>>                status = pjsua_conf_add_port(pool,
>>> callData[sessionId].memory_port_phone_out,
>>> &callData[sessionId].port_id);
>>>                if (status != PJ_SUCCESS) error_exit("Error adding memory port", status);
>>>                WriteToLog("Added Memory Port to conference
>>> port",callData[sessionId].port_id);
>>>
>>>                // make call
>>>                WriteToLog("Making Call",sessionId);
>>>                status = pjsua_call_make_call(acc_id,uri, 0,
>>> &callData[sessionId].port_id, NULL,NULL);
>>>                if (status != PJ_SUCCESS) error_exit("Error making call", status);
>>>
>>>
>>>                // assign the callid to the current call in callData
>>>                callData[sessionId].call_id =  callId;
>>>                callData[sessionId].isUsed = TRUE;
>>>                WriteToLog("Call Established",sessionId);
>>>
>>>                // increment callId for next call
>>>                callId++;
>>>
>>> --------------------------------------
>>>
>>> This is how we put an audio frame into a specific call:
>>>
>>> memory_put_frame(callData[sessionId].memory_port_phone_out, &pjframe );
>>>
>>> --------------------------------------
>>>
>>> This is how we handle the on_call_media_state:
>>>
>>>
>>>  pjsua_call_info ci;
>>>        pjsua_conf_port_id *portId;
>>>
>>>        pjsua_call_get_info(call_id,&ci);
>>>        portId = pjsua_call_get_user_data(call_id);
>>>
>>>        #ifdef DEBUG
>>>        printf("on call media state");
>>>        #endif
>>>
>>>    if (ci.media_status == PJSUA_CALL_MEDIA_ACTIVE)
>>>        {
>>>                WriteToLog("Call media state ACTIVE",call_id);
>>>                WriteToLog("---> slot",ci.conf_slot);
>>>                WriteToLog("---> port",*portId);
>>>                pjsua_conf_connect(ci.conf_slot, 0);
>>>                pjsua_conf_connect(*portId, ci.conf_slot);
>>>        }
>>>        else
>>>        {
>>>                WriteToLog("Call media state NOT ACTIVE",call_id);
>>>        }
>>> -----
>>>
>>> Are we doing something here that is leading to mixing on different calls ?
>>>
>>> Thanks a lot for any feedback
>>>
>>>
>>> --
>>> Joao Cesar
>>> msn: jpcesar at gmail.com
>>> gtalk: jpcesar at gmail.com
>>> icq: 13790802
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Joao Cesar
> msn: jpcesar at gmail.com
> gtalk: jpcesar at gmail.com
> icq: 13790802
>
> _______________________________________________
> 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
>



[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