Different DTMF mode for inbound and outbound. Is it possible?

I have a tricky question.
I successfully use a remote GSM/SIP adapter, using A-law codec and connected as a trunk to freePBX to place calls over the mobile network.

Possibly due to a bug in its firmware, the GSM/SIP adapter has an asymmetric behavior regarding DTMF:

  • from the mobile network to SIP, the DTMF are translated in RFC 2833.
  • from the SIP to the mobile network, the only chance to have an IVR answering you is to set DTMF in-band (it doesn’t convert RFC28833 to DTMF).

So the question is:
In FreePBX or asterisk, is there any trick I set a trunk to accept RFC2833 inbound, but force in-band DTMF outbound?


The key is you need to setup the inbound trunk so it matches first. If you can send an authuser with the inbound but not require it to make calls that would work.

You really need to just play with it. Asterisk is going to match peers from the most specific to the least specific so you want the outbound peer to have as little as possible, hopefully just the IP address of the peer, DTMF type, peer type and insecure directive.