[Freeswitch-dev] Getting DTMF from channel [SOLVED]
Paulo Rogério Panhoto
paulo at voicetechnology.com.br
Tue Nov 9 13:40:11 PST 2010
The audio thread was lacking a call to switch_core_session_read_frame().
After I placed the call, DTMF worked OK.
About the contribution process, I was asked to send a ssh public key
and a jira user name. I sent the required information and got no reply
since.
Kind Regards
-- Paulo
On 22/10/10 19:47, Anthony Minessale wrote:
> Ok let's work on that.
> email consulting at freeswitch.org and ask for GIT commit to a dir for
> that module and we can get you a dir.
>
> Once its building on latest GIT, we can dig into it and get DTMF working.
>
>
>
> 2010/10/22 Paulo Rogério Panhoto <paulo at voicetechnology.com.br>:
>
>> I really want to post it as contribution but I don't know how the
>> process works. So, in the meantine, it is already published on github
>>
>> git://github.com/ppanhoto/Freeswitch-mod_mp4.git
>>
>> Regards,
>>
>> Paulo.
>>
>> On 22/10/10 18:38, Anthony Minessale wrote:
>>
>>> maybe if you post the module for contribution we can add it to FS and
>>> figure it out by looking in the code to make it do what you want.
>>>
>>>
>>> 2010/10/22 Paulo Rogério Panhoto <paulo at voicetechnology.com.br>:
>>>
>>>
>>>> Hi,
>>>>
>>>> I'm writing a module that allows playback of MP4 video files (with
>>>> libmp4v2). The playback itself is made by two functions ready to run on
>>>> separate threads (though, audio runs on current thread and video runs on
>>>> a separate one). At this point, I'm trying to implement dtmf cut-through.
>>>>
>>>> After some research (I checked out mod_dptools.c and
>>>> switch_ivr_play_say.c) and this code was my best guess -- it runs on the
>>>> audio stream:
>>>>
>>>> if(switch_channel_test_flag(pt->channel, CF_BREAK))
>>>> {
>>>> switch_channel_clear_flag(pt->channel, CF_BREAK);
>>>> break;
>>>> }
>>>>
>>>> switch_ivr_parse_all_events(pt->session);
>>>>
>>>> if(switch_channel_has_dtmf(pt->channel))
>>>> {
>>>> switch_channel_dequeue_dtmf(pt->channel, &dtmf);
>>>> const char * terminators =
>>>> switch_channel_get_variable(pt->channel,
>>>> SWITCH_PLAYBACK_TERMINATORS_VARIABLE);
>>>> if(terminators && !strcasecmp(terminators, "none"))
>>>> terminators = NULL;
>>>> switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(pt->session),
>>>> SWITCH_LOG_DEBUG, "Digit %c\n", dtmf.digit);
>>>> if(terminators && strchr(terminators, dtmf.digit))
>>>> {
>>>> std::string digit(&dtmf.digit, 0, 1);
>>>> switch_channel_set_variable(pt->channel,
>>>> SWITCH_PLAYBACK_TERMINATOR_USED, digit.c_str());
>>>> break;
>>>> }
>>>> }
>>>>
>>>> Which didn't work. I'm asking if anyone has any idea.
>>>>
>>>> Any help is appreciated
>>>>
>>>> Regards,
>>>>
>>>> Paulo R. Panhoto
>>>>
>>>>
>>>> _______________________________________________
>>>> FreeSWITCH-dev mailing list
>>>> FreeSWITCH-dev at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>>>> http://www.freeswitch.org
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> FreeSWITCH-dev mailing list
>> FreeSWITCH-dev at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> http://www.freeswitch.org
>>
>>
>
>
>
More information about the FreeSWITCH-dev
mailing list