[Freeswitch-users] Lua in-band DTMF

Zsotya zsotya at jss.hu
Thu Nov 10 23:12:47 MSK 2016


Hello Michael,

Thank you for the helping hand but this does not work for me.

This is my test code which rings my extension and after I answer there  
is 4 secoud silence. I still see the DTMF in the SIP messages on the  
soft phone debug trace but no audiable DTMF. What could be wrong here  
please?

	session=freeswitch.Session("user/1001")

	log.i("Leg B's UUID: " .. tostring(session:getVariable("uuid")))
	if(session:ready()) then
		log.i("Leg ready")
	else
		log.e("Leg does not ready")
	end

	session:execute("start_dtmf_generate")

	session:sleep(1000)
	session:execute("send_dtmf", 1)
	session:sleep(1000)
	session:execute("send_dtmf", 2)
	session:sleep(1000)
	session:execute("send_dtmf", 3)
	session:sleep(1000)


Related freeswitch log snippet:
	EXECUTE sofia/internal/1001 at x.y.1.2:5060 start_dtmf_generate()
	2016-11-10 20:03:08.179963 [DEBUG] switch_core_media_bug.c:828  
Attaching BUG to sofia/internal/1001 at x.y.1.2:5060
	2016-11-10 20:03:08.239952 [DEBUG] switch_rtp.c:6694 Correct audio  
ip/port confirmed.
	2016-11-10 20:03:08.239952 [DEBUG] switch_core_io.c:448 Setting BUG  
Codec PCMA:8
	EXECUTE sofia/internal/1001 at x.y.1.2:5060 send_dtmf(1)
	2016-11-10 20:03:09.199949 [DEBUG] switch_core_io.c:1894  
sofia/internal/1001 at x.y.1.2:5060 send dtmf
	digit=1 ms=250 samples=2000
	EXECUTE sofia/internal/1001 at 10.8.1.2:5060 send_dtmf(2)
	2016-11-10 20:03:10.199951 [DEBUG] switch_core_io.c:1894  
sofia/internal/1001 at x.y.1.2:5060 send dtmf
	digit=2 ms=250 samples=2000
	EXECUTE sofia/internal/1001 at 10.8.1.2:5060 send_dtmf(3)
	2016-11-10 20:03:11.199963 [DEBUG] switch_core_io.c:1894  
sofia/internal/1001 at x.y.1.2:5060 send dtmf
	digit=3 ms=250 samples=2000

Thank you in advance!

Zsotya

Idézet (Michael Jerris <mike at jerris.com>):

> https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools:+start_dtmf_generate   
> <https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools:+start_dtmf_generate>
>
>> On Nov 9, 2016, at 5:42 PM, Zsotya <zsotya at jss.hu> wrote:
>>
>> Hello All,
>>
>> I am trying to send audiable in-band DTMF from Lua script.
>> If I use the session:execute("send_dtmf", 1) command I can see  #1
>> arrives to the other party in SIP messages but I cannot hear the DTMF
>> audio.
>>
>> How can I set the type of the DTMF? Can I force from lua or is it a
>> gateway or global settings? If I need an audiable DTMF is there any
>> better way than play dtmf sounds from wav files?
>
>










Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list