Recipe for FreeSwitch and RFC2833

I'm using FreeSwitch both to terminate calls (e.g. into and IVR or Voicemail) and switch calls (e.g. between a SIP trunk and a SIP phone or ATA). I try to select endpoints and carriers that do DTMF properly (which I know because things work through OpenSER), so I prefer when FreeSwitch do not alter the RFC2833 events. I found the following recipe to work pretty well:

Make DTMF pass-thru by default

In the sofia sip_profile, I use <param name="dtmf-type" value="rfc2833"/> <param name="rfc2833-pt" value="101"/> <param name="pass-rfc2833" value="true"/> This makes DTMF as RFC2833, and by default FreeSwitch will pass the RFC2833 events without modifying them.

Remove pass-thru when FreeSwitch must handle DTMF

However this prevents FreeSwitch from interpreting RFC2833 events when it terminates the call itselfs (in an IVR or voicemail, for example). Thus I modified my dialplan scripts to remove the pass-thru of RFC2833 events before FreeSwitch answers the call: <action application="set" data="pass_rfc2833=false"/> <action application="answer"/> This works as expected. I suspect that if I had to do a bridge after the call is answered by FreeSwitch I would have to add {pass-rfc2833=true} to it, but haven't tested this.

Update: My configuration has changed somewhat since. Among other things I’m using auto-rtp-bugs clear when I’m relaying media (e.g. when handling NAT).

tags: DTMF, FreeSwitch posted: 2009-01-11 21:26

Written on January 11, 2009