DTMF sending to asterisk failed by a GSM phone

I am using asterisk 1.8
i want to know how a rfc2833 DTMF signaling will generated by a GSM mobile be converted to Inband signaling , so that i can send it over a PSTN line

what should be my dtmf mode for the sip.conf entry in asterisk?

A GSM mobile will create GSM signalling. This will be converted to in band DTMF by the mobile network and transmitted as such over the PSTN. There isn’t enough information about your network topology to say what happens next, but typically it will reach an ITSP, which will decode it and convert it to RFC 2833.

However it could reach Asterisk in band (always the case for circuit switched, and possibly the case if there is an ITSP in the path), in which case it will only work if Asterisk is configured for inband and the codecs are G.711 or higher quality with respect to non-speech signals.

Dear david,
Thanks a lot for giving valuable information.
I would like to give my network topology.
I have used openBTS to extend GSM mobile calling to external network like PSTN , using asterisk.
In my sip.conf i have the [GSM mobile] and the [VoIP-PSTN gateway] (at as two SIP clients.
when i dial to gateway from my GSM mobile through asterisk, i could hear PSTN dial tone extended on GSM mobile. Now i have to punch DTMF digits on this PSTN dial tone to call an external PSTN number.

The problem is

  1. when i dial a PSTN number from my GSM mobile, these DTMF digits are not forwarded to the Gateway, and the gateway sends SIP BYE signal and call gets cut.

The error messages generated in the asterisk CLI (console ) is:

Notice [1766] Unknown RTP codec 72 received from
ERROR [1766] Unable to re-open master file/var/log/asterisk//cdr-csv//master.csv:No such file or directory


  1. Is the PSTN dial tone extended by gateway to asterisk is Unknown? why?
  2. why asterisk cannot send DTMF digits created by GSM mobile to gateway?
  3. what is the role of ‘master file’ here

From your previous reply, i understand that, asterisk has to convert the GSM mobiles rfc2833 DTMF signalling to Inband . Is yes, where is the configuration setting for this in sip.conf file? DO i need to set in [[VoIP-PSTN gateway] sip client entry. It has dtmfmode : auto , what next? any catch?

advance thanks

pk srinivasan

What is the nature of the radio telephony licence that you hold?

Generally OpenBTS should only be used by people with the relevant licence and technical skills. As it is a very specialist subsystem, it is unlikely that there will be anyone on this forum who knows anything about he details of configuring it.

  1. I don’t understand the question.
  2. insufficient information to even allocate the blame.
  3. master.csv is the main call logging file, which should work out of the box. You have either done a very non-standard installation, or are trying to run Asterisk non-root without a proper understanding of Linux permissions.

Dear david,
Thank you for your valuable answers. We have a test license.

If am successful from my earlier mail, in explaining you about my network configuration, then i would like to put it in a simpler way
My asterisk sip.conf has the following (kindly ignore the syntax errors)

allow gsm
allow ulaw
allow a law
context= sip-local

type friend
dtmf auto
context sip-local

[PSTN Gateway]
type friend
dtmf auto
context sip-local

type= friend
dtmf =auto
context= sip-local

SIP-phone( from snome), PSTN gateway( from Matrix), Mobile phone (from Nokia) are SIP peers to asterisk.

SIP-phone to Mobile phone calls are successful. (call from 2101 to 2103)
SIP-phone to PSTN gateway calls are successful.(call from 2103 to 2102)
Mobile-phone to PSTN gateway calls are unsuccessful.(call from 2101 to 2102)

when i dial from 2101 to 2102 , i am sending DTMF over rfc2833, Since the PSTN gateway(2102) SIP port is configured for SIP DTMF as rfc2833, the call get established between 2101 and 2102. once the call gets established, 2101 can hear a PSTN dial tone, which expects in band DTMF!.
Now i can dial any PSTN number. Since 2101 can only send rfc2833 DTMF, it is the asterisk’s duty to convert 2101’s rfc2833 DTMF to in band DTMF.
I think the asterisk is not doing so and the call is not established and asterisk is giving the error
Notice [1766] Unknown RTP codec 72 received from

( PSTN gateway is at

May i ask u the following questions

  1. Is the dtmf = auto setting really not working in asterisk here?
  2. why unknown codec problem here? ( PSTN gateway has bunch of codecs in its basket to use)
  3. How can i ask asterisk to use different codecs (in which config file?)

cheers and advance thanks

pk srinivasan

In continuation to my earlier reply,
i am looking for a problem something like
Help Needed in Sending DTMF ‘AFTER’ call is bridged

Here GSM phone has to send DTMF

  1. I’ve never used auto; I’ve always specified rfc2833 explicitly.

  2. There is almost certainly a bug in the remote peer. During the call setup, both SIP peers send their allowable codecs in SDP payloads to INVITE/the final response, or ACK. As Asterisk will not identify codec 72 as allowable, the other side must not try to use it.

To find out what it thinks codec 72 to be, and get some idea of what is going wrong, you will need to run with “sip set debug on” set. Also set verbose and debug levels to at least 5, and make sur that you are logging the debug message stream.

  1. Using allow and deny, in sip.conf, for audio codecs, and dtmfmode for telephone events. These set the codecs that Asterisk will tell the other side that it will accept. However, Asterisk will not actually send using a codec unless both sides have said it can be used.

PS I don’t have a C:, as I’m not using Windows, and I certainly don’t have your C:!

Also, I see no value in using friend, rather than peer. The name canreinvite is deprecated; you should use directmedia. I think you meant 2103 to 2101. Forcing the caller ID on a PSTN gateway, or a GSM BTS is strange.

Dear david
Thank you for your suggestions.
i will comeback with some more errors after setting the verbose levet to atleast 5.
you mean open the asterisk console with asterisk -rvvvvv for verbose 5 and type at CLI: sip set debug on???
( i am a newbie to asterisk)

advance thanks

pk srinivasan

core set debug 5
core set verbose 5
sip set debug on

(vvvv increments verbose from the startup default.)

Also, edit logger.conf, to make sure that at least one enabled log file, normally the full one, includes all the categories.