Snom & Asterisk - Codec & DTMF

Hi,

I am using Snom 720 (fw: snom720-SIP 8.7.3.15), connected to elastix (asterisk 1.8.18, FreePBX 2.8.1.4).

I also issued “core show translation” on my asterisk, and I can see:

above verifies that all my codecs are in place, working properly.

Under SIP Settings of FreePBX I can also see my ticked codecs:

This all explains that all my codecs should work fine.

and below is the settings of extension 01 (extension that is configured on the Snom 720), on asterisk:

AND, below is my configuration on Snom phone:


[size=4]ProblemS?[/size]

Problem 1) If I configure the snom 720 to use the specific codec, alaw, ulaw, gsm, g729, each individually works.
If I put the default settings there, which is: g722,pcmu,pcma,gsm,g726-16,g726-24,g726-32,g726-40,aal2-g726-16,aal2-g726-24,aal2-g726-32,aal2-g726-40,amrwb-0,g729,telephone-event (according to http://wiki.snom.com/wiki/index.php/Settings/codec_priority_list) the call doesn’t go through.

Further, with debugging set to ON, on my asterisk console, this is what I get when I try to make a call to my voicemail (*97):

[code]<— SIP read from UDP:MY_PHONE_PUBLIC_IP_ADDRESS:48427 —>
INVITE sip:*97@MY_PBX_PUBLIC_IP_ADDRESS;user=phone SIP/2.0
Via: SIP/2.0/UDP MY_PHONE_PUBLIC_IP_ADDRESS:48427;branch=z9hG4bK-896m9y2oryjp;rport
From: “01” sip:01@MY_PBX_PUBLIC_IP_ADDRESS;tag=9xbn1mgnwk
To: sip:*97@MY_PBX_PUBLIC_IP_ADDRESS;user=phone
Call-ID: ee38af509825-wbeorit6c6y1
CSeq: 1 INVITE
Max-Forwards: 70
Contact: sip:01@MY_PHONE_PUBLIC_IP_ADDRESS:48427;reg-id=1
X-Serialnumber: 000413700518
P-Key-Flags: resolution=“31x13”, keys=“4”
User-Agent: snom720/8.7.3.15
Accept: application/sdp
llow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE
Allow-Events: talk, hold, refer, call-info
Supported: timer, 100rel, replaces, from-change
Session-Expires: 3600;refresher=uas
Min-SE: 90
Content-Type: application/sdp
Content-Length: 600
v=0
o=root 1629469045 1629469045 IN IP4 MY_PHONE_PUBLIC_IP_ADDRESS
s=call
c=IN IP4 MY_PHONE_PUBLIC_IP_ADDRESS
t=0 0
m=audio 63470 RTP/AVP 9 0 8 3 97 98 99 100 106 107 108 109 18 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 G726-16/8000
a=rtpmap:98 G726-24/8000
a=rtpmap:99 G726-32/8000
a=rtpmap:100 G726-40/8000
a=rtpmap:106 AAL2-G726-16/8000
a=rtpmap:107 AAL2-G726-24/8000
a=rtpmap:108 AAL2-G726-32/8000
a=rtpmap:109 AAL2-G726-40/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
<------------->
— (19 headers 24 lines) —
Sending to MY_PHONE_PUBLIC_IP_ADDRESS:48427 (NAT)
Using INVITE request as basis request - ee38af509825-wbeorit6c6y1
Found peer ‘01’ for ‘01’ from MY_PHONE_PUBLIC_IP_ADDRESS:48427
<— Reliably Transmitting (NAT) to MY_PHONE_PUBLIC_IP_ADDRESS:48427 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP MY_PHONE_PUBLIC_IP_ADDRESS:48427;branch=z9hG4bK-896m9y2oryjp;received=MY_PHONE_PUBLIC_IP_ADDRESS;rport=48427
From: “01” sip:01@MY_PBX_PUBLIC_IP_ADDRESS;tag=9xbn1mgnwk
To: sip:*97@MY_PBX_PUBLIC_IP_ADDRESS;user=phone;tag=as0acfa1e8
Call-ID: ee38af509825-wbeorit6c6y1
CSeq: 1 INVITE
Server: voip1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“MY_PBX_PUBLIC_IP_ADDRESS”, nonce=“2c07b6e1”
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘ee38af509825-wbeorit6c6y1’ in 6400 ms (Method: INVITE)
<— SIP read from UDP:MY_PHONE_PUBLIC_IP_ADDRESS:48427 —>
ACK sip:*97@MY_PBX_PUBLIC_IP_ADDRESS;user=phone SIP/2.0
Via: SIP/2.0/UDP MY_PHONE_PUBLIC_IP_ADDRESS:48427;branch=z9hG4bK-896m9y2oryjp;rport
From: “01” sip:01@MY_PBX_PUBLIC_IP_ADDRESS;tag=9xbn1mgnwk
To: sip:*97@MY_PBX_PUBLIC_IP_ADDRESS;user=phone;tag=as0acfa1e8
Call-ID: ee38af509825-wbeorit6c6y1
CSeq: 1 ACK
Max-Forwards: 70
Contact: sip:01@MY_PHONE_PUBLIC_IP_ADDRESS:48427;reg-id=1
Content-Length: 0
<------------->
— (9 headers 0 lines) —
Really destroying SIP dialog ‘ee38af509825-wbeorit6c6y1’ Method: ACK[/code]

Nothing goes through!!!

What is the issue, what is it I am not catching?

Problem 2) If I have codec set to g729, dtmfmode=rfc2833 will not work. If I change it to alaw on the phone, it will work. As a result, when dialing *97, and when I am prompted for the password, in g729 mode, my dialed keys are not detected (dtmf doesn’t work).

Apologies for such a long post, just trying to provide all required information. Any help is appreciated.

Thank you,
Ali.

Your trace is incomplete. If it works for specific codecs, it is not going to stall after the 401 just because you change codecs. Getting a 401 on the first attempt is normal.

You don’t have a G.729 codec, so anything that requires transcoding will fail, if it negotiates that.

I’ve assumed that the FreePBX screens are one to one with the sip.conf entries. This isn’t a FrePBX forum.

This doesn’t seem to be a configuration that needs nat=yes (a very common misunderstanding). It also doesn’t seem to be one that needs friend, rather than peer. Neither of these are relevant to your codec issue.

RFC 2833 is effectively a special codec, so the audio codecs shouldn’t affect it. If you actually had in band DTMF, G.729 would not pass it accurately enough to decode it, but as you don’t have G.729 codecs installed/licensed, it couldn’t even try.

The phone doesn’t seem to have an option for RFC 2833, on the other hand its SDP is offering it. It is doing so on an audio specific media line, and I’m not sure that is legitimate, as it is a signalling codec, not an audio one.

You don’t have core debugging enabled, so it is not possible to see how Asterisk is interpreting the SDP, and the results of the codec “negotiation”.

Using the telephone-event codec on an m audio line does look to be OK.

Thank you David. telephone-event was indeed the issue.

After all, I also understood few lame codecs on Snom 7XX series, do not work on Asterisk.
Now, it is either the compatibility of Asterisk, or as another fellow in Snom forum mentioned, a very long string of codecs, make the packet too big, thus not fitting into one frame on Ethernet, something like that.

In any case, i removed the latter codecs from the list below:
g726-16,g726-24,g726-32,g726-40,aal2-g726-16,aal2-g726-24,aal2-g726-32,aal2-g726-40

and made sure telephone-event is there, and it all works now.

Thank you!