Just to make handling simpler a complete patch now that also contains one more small fix :-) . Regards Werner Am 18.12.2010 16:15, schrieb Werner Dittmann: > Hi Benny, > > atached a tar file that contains an additional patch :-) that modifies > the first one. This second patch now takes care of the SRTP stuff (I > did the first patch without having SRTP configured). With this > patch and the modified simple_pjsua.c client I was able to setup > calls to another ZRTP enabled client and voila it works. > > To check the patches you may need to apply them in order or only > the second one if you already applied the first one. > > Regards, > Werner > > Am 17.12.2010 15:00, schrieb Werner Dittmann: >> Hi Benny, >> >> the attached patch is a proposal how to implement the >> on_create_media_transport callback. I modified two file: >> pjsua-lib/pjsua.h - adding the enum and the callback to callback >> structure >> >> pjsua-lib/pjsua_media.c - adding the callback in method >> pjsua_media_channel_init(), just before the >> pjmedia_transport_media_create >> >> Please see the comment just before calling the callback method regarding >> when to call (because of SRTP transport). >> >> Any advise how to enhance the implmentation? >> >> Regards, >> Werner >> >> Am 07.12.2010 10:52, schrieb Benny Prijono: >>> >>> We can't do that, as currently we don't have such "position" information. >>> >>> My idea is to add a new pjsua callback like this: >>> >>> typedef enum pjsua_create_media_transport_flag >>> { >>> /** >>> * This flag indicates that the media transport must also close its >>> * "member" or "child" transport when pjmedia_transport_close() is >>> * called. If this flag is not specified, then the media transport >>> * must not call pjmedia_transport_close() of its member transport. >>> */ >>> PJSUA_MED_TP_CLOSE_MEMBER = 1 >>> >>> } pjsua_create_media_transport_flag; >>> >>> /** >>> * This callback can be used by application to implement custom media >>> * transport adapter for the call, or to replace the media transport >>> * with something completely new altogether. >>> * >>> * This callback is called when a new call is created. The library has >>> * created a media transport for the call, and it is provided as the >>> * \a base_tp argument of this callback. Upon returning, the callback >>> * must return an instance of media transport to be used by the call. >>> * >>> * @param call_id Call ID >>> * @param media_idx The media index in the SDP for which this media >>> * transport will be used. >>> * @param base_tp The media transport which otherwise will be >>> * used by the call has this callback not been >>> * implemented. >>> * @param flags Bitmask from pjsua_create_media_transport_flag. >>> * >>> * @return The callback must return an instance of media >>> * transport to be used by the call. >>> */ >>> pjmedia_transport *on_create_media_transport(pjsua_call_id call_id, >>> unsigned media_idx, >>> pjmedia_transport *base_tp, >>> unsigned flags); >>> >>> >>> -Benny >>> >>> _______________________________________________ >>> 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 > > > > _______________________________________________ > 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 -------------- A non-text attachment was scrubbed... Name: callback_complete.patch Type: text/x-patch Size: 5183 bytes Desc: not available URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20101218/8d49aa9b/attachment-0001.patch>