Asterisk ignoring the codec support

Hi,

I am fairly new to Asterisk and I ran into the following issue when attempting to enable G722 codec. Despite enabling G722 via Settings–>SIP Settings Asterisk, the outbound INVITE doesn’t include the G722 codec. Here is what /etc/asterisk/sip_general_additional.conf looks like:

... alwaysauthreject=yes useragent=FPBX-2.10.1(1.8.22.0) disallow=all allow=g722 allow=ulaw allow=alaw allow=gsm ...

Here is a snippet of the sip debug trace:

Phone call is placed from the phone and as witnessed by Asterisk

<--- SIP read from UDP:<<<phone IP addr>>> ---> INVITE sip:xxx@yyyyy.zzz;user=phone SIP/2.0 … m=audio 53936 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 …

Asterisk turns around and forwards the call setup to the next hop

Reliably Transmitting (NAT) to ...<<<SIP server>>> INVITE xxx@yyyyy.zzz SIP/2.0 … m=audio 11938 RTP/AVP 0 3 101 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 …

Besides not include G722 codec, I also notice that the ;user=phone

Lastly, here are some relevant environment info:

PIAF Installed Version = 2.0.6.4 under *HARDWARE* │ │ FreePBX Version = 2.10.1.16 │ │ Running Asterisk Version = 1.8.22.0 │ │ Asterisk Source Version = 1.8.22.0

Any help to fix this issue will be much appreciated. I am looking forward to ramp up my knowledge of asterisk and contribute to the forum.

thanks,

-Syed

You need to see what codecs are explicitly allowed for the outbound peer.

You are right. I had to explicitly “allow=g722” in the outbound route definition in order for it to be included in the outbound session setup request.

Any ideas on how to keep the “;user=phone” from falling off?

thanks.

Try:
usereqphone=yes

I tried your suggestion it works.

Thanks a ton.

-Syed

Yay :smiley:

I have been searching about this option ;usereqphone = no

; If yes, “;user=phone” is added to uri that contains ; a valid phone number

Im just curious, if can you malcolm explain a little bit deeper about this option please ?

Howdy,

It first came from:
issues.asterisk.org/jira/browse/ASTERISK-2214

which said it was added in order to make Broadworks happy.

That’s the best I’ve got, it’s an old, old option :smiley: