Hi,

Thank you.


Hi,


You are better off using mod_freetdm.c as the reference, the sample/test applications may be outdated.


  Unfortunatelly in mod_freetdm.c there seems to be no need for the call_id from the ftdm_call_place_ex(..).
 
ftdm_channel_t is an opaque type to API users. I don't remember what your exact question was. You should not use fchan.caller_data, you always get a copy of caller_data when you need it, the fact that is internally attached to the fchan pointer is not something you should rely on (and that's why is in a private header).


I though that the freetdm generates a new call ID (in context of freetdm) when new call is initated via ftdm_call_place_ex(..) and I was looking for the way how this call_id is announced to the caller application.
I've recently tested head from freeswitch git, but the caller_data.call_id is still zero after returning from ftdm_call_place_ex().

My problem is that the comment aroung _ftdm_call_place() in the freetdm api says:

  *  \note When this function returns FTDM_SUCCESS, the member .fchan from caller_data will be set to the channel used to place the call
  *        and .call_id to the generated call id for that call
  *

but my applciation still receives zero. mod_freetdm seems to not care about this call_id at all.

So my workaround is stil following:

ftdmret = ftdm_call_place_ex(&caller_data, &hunting, usrmsg);
 if (ftdmret == FTDM_SUCCESS)
 {
       callerData = ftdm_channel_get_caller_data(caller_data.fchan);
       freetdmLibCallId = FtdmCallId(callerData->call_id);
}
and that was the trigger to my post.
Please, is the comment from the freetdm.h about the call_id  within the caller_data valid? Is the zero also valid call_id?

Thank you in advance

Juraj