I currently have the need to know which channel originated a DTMF event when inside a bridge. I'm monitoring events through mod_event_socket. The problem is that, as far as I can see, the originating channel ID is never carried with the DTMF event. Is there any reason for this?
I've been looking for ways to modify FreeSWITCH to support this and I wanted to discuss it with the core developers to make sure that whatever modification I make is acceptable to be merged back into FS. The options I'm contemplating right now are:
1. Add the originating channel ID to the switch_dtmf_t struct. Pros: don't need to change the interfaces in any of the functions that are used to send DTMFs; cons: this change would make the struct almost 8x bigger than what it currently is.
2. Change switch_core_session_send_dtmf() (switch_core_io.c) to receive the channel ID as an argument and have the function pass the channel ID to all the event hooks when they are called.
Is any of these options acceptable? Does anybody have any recommendations about this?