Ah, in my case I actually don't need support for in-band DTMF.
I am starting a DTMF detector in FS by calling spandsp_start_dtmf and so when in-band DTMF is detected in the incoming leg, FS would send RFC2833 digits to the unimrcp SIP call.
However, it was not doing this.
But this was because I didn't enable codec telephone-event in my unimcrp profile.
After changing this:
<param name="codecs" value="PCMU PCMA L16/96/8000"/>
to this:
<param name="codecs" value="PCMU PCMA L16/96/8000 telephone-event"/>
the codec telephone-event was offered by FS to unimrcp:
INVITE sip:
192.168.88.136:8060 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.137:16090;rport;branch=z9hG4bK96yrKg53X6H2j
Max-Forwards: 70
From: <sip:
192.168.2.137:16090>;tag=10tDe66c91H7c
To: <sip:
192.168.88.136:8060>
Call-ID: 3da7ea00-fe23-1239-ab88-52540012a6dc
CSeq: 33239861 INVITE
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE
Supported: timer, 100rel
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 387
v=0
o=FreeSWITCH 4975629623509025572 7572976588626830541 IN IP4 192.168.2.137
s=-
c=IN IP4 192.168.2.137
t=0 0
m=application 9 TCP/MRCPv2 1
a=setup:active
a=connection:new
a=resource:speechrecog
a=cmid:1
m=audio 14008 RTP/AVP 0 8 96 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 L16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendonly
a=mid:1
And here are the MRCP messages confirming DTMF was detected by unimrcp (at the incoming leg I send in-band DTMF sequence '1234567890'):
So, everything is fine.