[Freeswitch-dev] ftdm_call_place and caller_data.call_id

Juraj Fabo juraj.fabo at gmail.com
Sat Aug 27 18:37:22 MSD 2011


Hi

I have a question on the API delivering the generated call_id in outgoing and
incoming calls.
When my application makes call to ftdm_call_place

status = ftdm_call_place_ex(&caller_data, &hunting, &usrmsg);

caller_data.call_id is set to zero.

freetdm.h description about ftdm_caller_data.call_id member explicitely states,
that after the ftdm_channel_call_place() call the user can use the
caller_data.call_id, otherwise the call_id from sigmsg should be used

I'd like to ask only a few questions:

- from sources I see, that after the ftdm_call_place_ex(..) application could
use caller_data.fchan->caller_data.call_id
  I tested it and it was ok, please is this a proper way how to use this API
function?

- sigmsg's delivered to signalling callback seems again not to provide the
call_id directly. From sources I found this approach to be usable when handling
FTDM_SIGEVENT_START

  ftdm_caller_data_t * callerData = ftdm_channel_get_caller_data(p->channel);
  call_id = callerData->call_id;

  However some other events delivered the call_id directly (as p->call_id)

  Please, is my handling for _START event correct (despite that call to API from
the callback handler is tabu)

I'm working with freeswitch-snapshot 25th of May, compiling a standalone
freetdm, using sangoma a102de and a104d cards.

thank you very much

Juraj




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list