<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.24.5">
</HEAD>
<BODY>
How can I set the prefered codec between 2 calling parties ??<BR>
<BR>
My Grandstream supports <FONT COLOR="#0000ff"><B>G729, alaw and gsm</B></FONT>... in this order.<BR>
The Zoiper softphone has <FONT COLOR="#0000ff"><B>alaw and gsm</B></FONT> as codecs... in that order.<BR>
<BR>
Although there should be a matching codec found, my Grandstream can not call the Zoiper softphone.<BR>
<BR>
CLI shows :<BR>
<BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:47:21] WARNING[22367]: channel.c:3340 ast_channel_make_compatible: No path to translate from SIP/mygrandstream-09c599e0(2) to SIP/zoiper-09cd57f8(256)</FONT></FONT><BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:47:21]&nbsp;&nbsp;&nbsp;&nbsp; -- Got SIP response 415 &quot;Unsupported Media Type&quot; back from 192.168.1.106</FONT></FONT> (&lt;-- zoiper)<BR>
<BR>
SIP debug :<BR>
<BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:55:57] Peer audio RTP is at port 192.168.1.101:10110 </FONT></FONT><FONT COLOR="#000000">(&lt;-- the Grandstream)</FONT><BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:55:57] Found audio description format PCMA for ID 8</FONT></FONT><BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:55:57] Found audio description format GSM for ID 3</FONT></FONT><BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:55:57] Found audio description format PCMU for ID 0</FONT></FONT><BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:55:57] Found audio description format G729 for ID 18</FONT></FONT><BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:55:57] Found audio description format telephone-event for ID 101</FONT></FONT><BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:55:57] Capabilities: us - 0x10a (gsm|alaw|g729), peer - audio=0x10e (gsm|ulaw|alaw|g729)/video=0x0 (nothing), combined - 0x10a (gsm|alaw|g729)</FONT></FONT><BR>
<FONT COLOR="#0000ff"><FONT SIZE="2">[Mar 11 17:55:57] Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)</FONT></FONT><BR>
...<BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">[Mar 11 17:55:57] Audio is at 192.168.1.150 port 11586 </FONT></FONT><FONT COLOR="#000000">(&lt;-- my Asterisk)</FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">[Mar 11 17:55:57] Adding codec 0x100 (g729) to SDP</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">[Mar 11 17:55:57] Adding non-codec 0x1 (telephone-event) to S</FONT></FONT>DP<BR>
<BR>
This is what Asterisk sends to the Zoiper in the INVITE (sdp) :<BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">Content-Type: application/sdp</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">Content-Length: 263</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">v=0</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">o=root 3208 3208 IN IP4 192.168.1.150</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">s=session</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">c=IN IP4 192.168.1.150</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">t=0 0</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">m=audio 11586 RTP/AVP 18 101</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0000ff">a=rtpmap:18 G729/8000</FONT></FONT><BR>
<BR>
<FONT COLOR="#000000">Why isn't Asterisk negotiating with the Zoiper for the alaw-codec ??</FONT><BR>
<BR>
<FONT COLOR="#000000">The sip-configuration (realtime</FONT> MySQL<FONT COLOR="#000000">) for the Grandstream is :</FONT><BR>
<BR>
<FONT COLOR="#0000ff">allow : </FONT><FONT COLOR="#0000ff"><B>g729;alaw;gsm</B></FONT><BR>
<BR>
and the Zoiper softphone :<BR>
<BR>
<FONT COLOR="#0000ff">allow : </FONT><FONT COLOR="#0000ff"><B>alaw;gsm;g729</B></FONT><BR>
<BR>
<BR>
Kind regards,<BR>
<BR>
Jonas.
</BODY>
</HTML>