HT-286 codec negotiation problem

Hello. I have a new HT-286 which reports itself in the SIP headers as “Grandstream HT287 1.1.0.31”. I’m using this device with an Asterisk 1.4.23.1 server and am trying to get it to use a G726-32 codec. The HT-286 appears to only want to use PCMU/8000 as seen in this debug output:

v=0 o=shop 8000 8000 IN IP4 192.168.2.105 s=SIP Call c=IN IP4 192.168.2.105 t=0 0 m=audio 5004 RTP/AVP 0 101 a=sendrecv a=rtpmap:0 PCMU/8000 a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15

I have tried various things in the “Preferred Vocoders” settings in the ATA, even going so far as to set all seven options to G726. I have also reset the device to the factory defaults. Nothing I do changes this behavior. The ATA seems to be stuck on PCMU/8000.

I’ve also tried various codec settings in my sip.conf file on the asterisk server. However, unless I include the ulaw codec on the asterisk side, I cannot establish a successful voice connection with the HT-286. I’ve also tested this with an Asterisk 1.6.0.9 server with the same results.

Any ideas? Grandstream support says they cannot reproduce this problem.

could you provide us with cli show codecs and the relevant sip.conf parts?

Sure. Here’s my show codecs:

[code]Disclaimer: this command is for informational purposes only.
It does not indicate anything about your configuration.
INT BINARY HEX TYPE NAME DESC

      1 (1 <<  0)      (0x1)  audio       g723   (G.723.1)
      2 (1 <<  1)      (0x2)  audio        gsm   (GSM)
      4 (1 <<  2)      (0x4)  audio       ulaw   (G.711 u-law)
      8 (1 <<  3)      (0x8)  audio       alaw   (G.711 A-law)
     16 (1 <<  4)     (0x10)  audio   g726aal2   (G.726 AAL2)
     32 (1 <<  5)     (0x20)  audio      adpcm   (ADPCM)
     64 (1 <<  6)     (0x40)  audio       slin   (16 bit Signed Linear PCM)
    128 (1 <<  7)     (0x80)  audio      lpc10   (LPC10)
    256 (1 <<  8)    (0x100)  audio       g729   (G.729A)
    512 (1 <<  9)    (0x200)  audio      speex   (SpeeX)
   1024 (1 << 10)    (0x400)  audio       ilbc   (iLBC)
   2048 (1 << 11)    (0x800)  audio       g726   (G.726 RFC3551)
   4096 (1 << 12)   (0x1000)  audio       g722   (G722)
  65536 (1 << 16)  (0x10000)  image       jpeg   (JPEG image)
 131072 (1 << 17)  (0x20000)  image        png   (PNG image)
 262144 (1 << 18)  (0x40000)  video       h261   (H.261 Video)
 524288 (1 << 19)  (0x80000)  video       h263   (H.263 Video)
1048576 (1 << 20) (0x100000)  video      h263p   (H.263+ Video)
2097152 (1 << 21) (0x200000)  video       h264   (H.264 Video)[/code]

My sip.conf:

[shop] type=friend host=dynamic username=shop secret=***** context=phones callerid=Shop <101> disallow=all ;allow=ulaw allow=g726 g726nonstandard=yes dtmfmode=rfc2833

Again, it only works if I uncomment allow=ulaw. The Asterisk 1.4 box that this ATA is talking to is running on an OpenWRT router. Running “core show translation” shows that I have support for gsm, ulaw, g726, g726aal2, and slin. There’s also a Linksys SPA-3102 talking to the same Asterisk 1.4 using g726aal2 without any problems. So I think the asterisk part is correct, unless you see something wrong in the above sip.conf section.

What is seen in the sip debug when a call is established and the codecs negotiated. Its this that will show you the problem

Ian

[quote=“ianplain”]What is seen in the sip debug when a call is established and the codecs negotiated. Its this that will show you the problem

Ian[/quote]

I hate to post all that stuff to the forum so grab it from here if you don’t mind:

http://home.hiwaay.net/~gentlec/sip_debug_1.txt

This was a sip to sip call behind my asterisk router. The call was placed from extension 100 (192.168.2.102) to extension 101 (192.168.2.105).

Capabilities: us - 0x800 (g726), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x0 (nothing)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
[Sep 3 22:42:51] NOTICE[2784]: chan_sip.c:5593 process_sdp: No compatible codecs, not accepting this offer!
list_route: hop: sip:shop@192.168.2.105

heres the problem it seems one is set to g726 only and the other ulaw only

check your configs

Ian

[quote=“ianplain”]heres the problem it seems one is set to g726 only and the other ulaw only

check your configs [/quote]

Thanks for your reply. Yes, the asterisk box is set to g726 only but the ATA is set to allow these codecs in this order:

PCMU
PCMA
G723
G729
G726-32
iLBC

But it appears from the SIP debug messages that the ATA doesn’t attempt to negotiate anything but PCMU. If G726 is in the ATA’s list, why won’t it use that?

Can you post a screen grab of the page of the router for setup of the codecs, Some GS ATAs have a setting to use on ly the prefered codec IE the first

Ian

[quote=“ianplain”]Can you post a screen grab of the page of the router for setup of the codecs, Some GS ATAs have a setting to use on ly the prefered codec IE the first

Ian[/quote]

OK, here you go:

http://home.hiwaay.net/~gentlec/01-status.pdf
http://home.hiwaay.net/~gentlec/02-basic_settings.pdf
http://home.hiwaay.net/~gentlec/03-advanced_settings_1.pdf
http://home.hiwaay.net/~gentlec/04-advanced_settings_2.pdf

This is right after a factory reset. The only settings I modified was the sip server and authentication info.