Jump to content
Vodia PBX forum
koolandrew

How to enable g726 codec

Recommended Posts

There are actually a couple of those codecs. The first variable is the bandwidth, where the PBX supports 32 kbit/s. The second variable is the nibble order, where we support the IETF order (dynamic codec). You should be able to see by the phone SDP if that is compatible with the PBX SDP. IF not, just copyx & paste the SDP here so that we can take a look.

Share this post


Link to post
Share on other sites

I am not totally clear in what you have mentioned here but in my previous attempts to start this topic, i mentioned that i disabled all codecs but g726 in the pbx, then enabled all the g726 codecs on the csipsimple softphone, and i got a message on the pbx logs that there were no codecs available, so it appeared that the codec was not installed or enabled.

Share this post


Link to post
Share on other sites

This is what happens when i try to connect

 

[3] 2016/04/19 14:55:35: Port 45: Update codecs preference size 1, available codecs list is empty

[5] 2016/04/19 14:55:35: Port 45: Available codec list is empty when trying to connect

I get an error 415 from the phone.

I am not sure what else you need, please try it yourself.

Thanks

Share this post


Link to post
Share on other sites

8] 2016/04/19 15:36:44: Tagging request with existing tag

[8] 2016/04/19 15:36:44: Port 56: Added rtpmap codec 19 (mapped to 116)

[8] 2016/04/19 15:36:44: Port 56: Added rtpmap codec 5 (mapped to 115)

[8] 2016/04/19 15:36:44: Port 56: Added rtpmap codec 21 (mapped to 114)

[8] 2016/04/19 15:36:44: Port 56: Added rtpmap codec 20 (mapped to 113)

[8] 2016/04/19 15:36:44: Port 56: Added rtpmap codec 1 (mapped to 101)

[6] 2016/04/19 15:36:44: Port 56: Sending RTP to localpublicip.com:4000, codec not set yet

[5] 2016/04/19 15:36:44: Port 56: Incoming call in domain vodiapbx.com on port 56 extension 121

[8] 2016/04/19 15:36:44: Call state for call object 467: idle

[5] 2016/04/19 15:36:44: Port 56: New call created with number 467

[7] 2016/04/19 15:36:44: Port 56: Set codec preference count 1

[8] 2016/04/19 15:36:44: Call state for call object 467: connected

[8] 2016/04/19 15:36:44: Port 56: state code from 0 to 200

[8] 2016/04/19 15:36:44: Port 56: Ignore double SDP

[3] 2016/04/19 15:36:44: Port 56: Update codecs preference size 1, available codecs list is empty

[5] 2016/04/19 15:36:44: Port 56: Available codec list is empty when trying to connect

[8] 2016/04/19 15:36:44: Port 56: Send hangup with reason bye

[5] 2016/04/19 15:36:44: Port 56: 30 seconds callback set for force cleanup

[7] 2016/04/19 15:36:44: Messages in the call port 56

2016/4/19 15:36:44 Rx: udp:localpublicip.com:1072 (1249 bytes)
INVITE sip:*97@vodiapbx.com SIP/2.0
Via: SIP/2.0/UDP localpublicip.com:1072;rport;branch=z9hG4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Max-Forwards: 70
From: <sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To: <sip:*97@vodiapbx.com>
Contact: <sip:121@localpublicip.com:1072;ob>
Call-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CSeq: 4281 INVITE
Route: <sip:vodiapbx.com;transport=udp;lr>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: CSipSimple_zerofltebmc-22/r2457
Content-Type: application/sdp
Content-Length: 539

v=0
o=- 3670083402 3670083402 IN IP4 localpublicip.com
s=pjmedia
c=IN IP4 localpublicip.com
t=0 0
m=audio 4000 RTP/AVP 116 115 114 113 101
c=IN IP4 localpublicip.com
a=rtcp:4001 IN IP4 localpublicip.com
a=sendrecv
a=rtpmap:116 G726-40/8000
a=rtpmap:115 G726-32/8000
a=rtpmap:114 G726-24/8000
a=rtpmap:113 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:mCpWmYI+907R4p0eX3xuy6sO/rVLLeSSjBfLSwcy
a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:mnu3EI83ZCW0/Cipso5apz+JCmAkm46qL0EzE9F3
2016/4/19 15:36:44 Tx: udp:localpublicip.com:1072 (329 bytes)
SIP/2.0 100 Trying
Via: SIP/2.0/UDP localpublicip.com:1072;rport=1072;branch=z9hG4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
From: <sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To: <sip:*97@vodiapbx.com>;tag=cadxxxxxx
Call-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CSeq: 4281 INVITE
Content-Length: 0

2016/4/19 15:36:44 Tx: udp:localpublicip.com:1072 (525 bytes)
SIP/2.0 401 Authentication Required
Via: SIP/2.0/UDP localpublicip.com:1072;rport=1072;branch=z9hG4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
From: <sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To: <sip:*97@vodiapbx.com>;tag=cadxxxxxx
Call-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CSeq: 4281 INVITE
User-Agent: Vodia-PBX/5.3.0
WWW-Authenticate: Digest realm="vodiapbx.com",nonce="173f278f4f6fe8da87cc5d8b89c66cf7",domain="sip:*97@vodiapbx.com",algorithm=MD5
Content-Length: 0

2016/4/19 15:36:44 Rx: udp:localpublicip.com:1072 (416 bytes)
ACK sip:*97@vodiapbx.com SIP/2.0
Via: SIP/2.0/UDP localpublicip.com:1072;rport;branch=z9hG4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Max-Forwards: 70
From: <sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To: <sip:*97@vodiapbx.com>;tag=cadxxxxxx
Call-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CSeq: 4281 ACK
Route: <sip:vodiapbx.com;transport=udp;lr>
Content-Length: 0

2016/4/19 15:36:44 Rx: udp:localpublicip.com:1072 (1457 bytes)
INVITE sip:*97@vodiapbx.com SIP/2.0
Via: SIP/2.0/UDP localpublicip.com:1072;rport;branch=z9hG4bKPjRLpDgdP9I25MRXFt-1YKR1jdsRrQDDXc
Max-Forwards: 70
From: <sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To: <sip:*97@vodiapbx.com>
Contact: <sip:121@localpublicip.com:1072;ob>
Call-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CSeq: 4282 INVITE
Route: <sip:vodiapbx.com;transport=udp;lr>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: CSipSimple_zerofltebmc-22/r2457
Authorization: Digest username="121", realm="vodiapbx.com", nonce="173f278f4f6fe8da87cc5d8b89c66cf7", uri="sip:*97@vodiapbx.com", response="bdeacdc5725b2c3ae309c242b679d3e8", algorithm=MD5
Content-Type: application/sdp
Content-Length: 539

v=0
o=- 3670083402 3670083402 IN IP4 localpublicip.com
s=pjmedia
c=IN IP4 localpublicip.com
t=0 0
m=audio 4000 RTP/AVP 116 115 114 113 101
c=IN IP4 localpublicip.com
a=rtcp:4001 IN IP4 localpublicip.com
a=sendrecv
a=rtpmap:116 G726-40/8000
a=rtpmap:115 G726-32/8000
a=rtpmap:114 G726-24/8000
a=rtpmap:113 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:mCpWmYI+907R4p0eX3xuy6sO/rVLLeSSjBfLSwcy
a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:mnu3EI83ZCW0/Cipso5apz+JCmAkm46qL0EzE9F3
2016/4/19 15:36:44 Tx: udp:localpublicip.com:1072 (329 bytes)
SIP/2.0 100 Trying
Via: SIP/2.0/UDP localpublicip.com:1072;rport=1072;branch=z9hG4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
From: <sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To: <sip:*97@vodiapbx.com>;tag=cadxxxxxx
Call-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CSeq: 4282 INVITE
Content-Length: 0

2016/4/19 15:36:44 Tx: udp:localpublicip.com:1072 (562 bytes)
SIP/2.0 415 Unsupported Media Type
Via: SIP/2.0/UDP localpublicip.com:1072;rport=1072;branch=z9hG4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
From: <sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To: <sip:*97@vodiapbx.com>;tag=cadxxxxxx
Call-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CSeq: 4282 INVITE
Contact: <sip:121@vodiapbxip:5060>
Supported: 100rel, replaces, norefersub
Allow-Events: refer
Allow: INVITE, ACK, CANCEL, BYE, REFER, PRACK, INFO, UPDATE
Accept: application/sdp
User-Agent: Vodia-PBX/5.3.0
Content-Length: 0

2016/4/19 15:36:44 Rx: udp:localpublicip.com:1072 (416 bytes)
ACK sip:*97@vodiapbx.com SIP/2.0
Via: SIP/2.0/UDP localpublicip.com:1072;rport;branch=z9hG4bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Max-Forwards: 70
From: <sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To: <sip:*97@vodiapbx.com>;tag=cadxxxxxx
Call-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CSeq: 4282 ACK
Route: <sip:vodiapbx.com;transport=udp;lr>
Content-Length: 0

[8] 2016/04/19 15:36:44: Port 56: Clearing port with SIP Call-ID xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[6] 2016/04/19 15:36:44: Reg 9885, Sent MWI notification 5/0 (0/0) to user 121@vodiapbx.com

[6] 2016/04/19 15:36:44: Reg 9949, Sent MWI notification 5/0 (0/0) to user 121@vodiapbx.com

[9] 2016/04/19 15:36:44: Using outbound proxy sip:localpublicip.com:55463;transport=udp because of flow-label

[9] 2016/04/19 15:36:44: SOAP: Store CDR in http://pbxcdr.com/cdr.php

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sns="http://soap.com/pbx"><env:Body><sns:CDR><PrimaryCallID>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</PrimaryCallID><CallID>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</CallID><From>"Kool Tel.com" <sip:121@vodiapbx.com></From><To><sip:*97@vodiapbx.com></To><Direction>I</Direction><Type>mailbox</Type><AccountNumber>121@vodiapbx.com</AccountNumber><RemoteParty>"Kool Tel.com" <sip:121@vodiapbx.com></RemoteParty><LocalParty>121</LocalParty><TrunkName></TrunkName><TrunkID></TrunkID><Domain>vodiapbx.com</Domain><LocalTime>20160419153644</LocalTime><TimeStart>20160419193644</TimeStart><Extension>121@vodiapbx.com</Extension><TimeConnected>20160419193644</TimeConnected><DurationHHMMSS>0:00:00</DurationHHMMSS><Duration>0</Duration><TimeEnd>20160419193644</TimeEnd><IPAdr>udp:localpublicip.com:1072</IPAdr><IdleDuration>1825</IdleDuration><Quality>VQSessionReport: CallTerm
LocalMetrics:
CallID:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
FromID:<sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ToID:<sip:*97@vodiapbx.com>;tag=cadxxxxxx
LocalAddr:IP=0.0.0.0 PORT=51640 SSRC=0x9xxxxxx
RemoteAddr:IP=0.0.0.0 PORT=0 SSRC=0x
x-UserAgent:Vodia-PBX/5.3.0
x-SIPterm:SDC=OK SDR=OR
</Quality></sns:CDR></env:Body></env:Envelope>

[8] 2016/04/19 15:36:44: Remove leg 1081: Call port 56, SIP call id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[7] 2016/04/19 15:36:44: http:pbxcdr.com:80: DNS A returned cdrserver.com

[7] 2016/04/19 15:36:44: http:pbxcdr.com:80: Connect to cdrserver.com

[9] 2016/04/19 15:36:47: http:pbxcdr.com:80: Send request

POST /cdr.php HTTP/1.1
Host: pbxcdr.com
Content-Length: 1405
SOAPAction: Trunk-CDR
Content-Type: text/xml
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; PBX)

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sns="http://soap.com/pbx"><env:Body><sns:CDR><PrimaryCallID>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</PrimaryCallID><CallID>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</CallID><From>"Kool Tel.com" <sip:121@vodiapbx.com></From><To><sip:*97@vodiapbx.com></To><Direction>I</Direction><Type>mailbox</Type><AccountNumber>121@vodiapbx.com</AccountNumber><RemoteParty>"Kool Tel.com" <sip:121@vodiapbx.com></RemoteParty><LocalParty>121</LocalParty><TrunkName></TrunkName><TrunkID></TrunkID><Domain>vodiapbx.com</Domain><LocalTime>20160419153644</LocalTime><TimeStart>20160419193644</TimeStart><Extension>121@vodiapbx.com</Extension><TimeConnected>20160419193644</TimeConnected><DurationHHMMSS>0:00:00</DurationHHMMSS><Duration>0</Duration><TimeEnd>20160419193644</TimeEnd><IPAdr>udp:localpublicip.com:1072</IPAdr><IdleDuration>1825</IdleDuration><Quality>VQSessionReport: CallTerm
LocalMetrics:
CallID:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
FromID:<sip:121@vodiapbx.com>;tag=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ToID:<sip:*97@vodiapbx.com>;tag=cadxxxxxx
LocalAddr:IP=0.0.0.0 PORT=51640 SSRC=0x9xxxxxx
RemoteAddr:IP=0.0.0.0 PORT=0 SSRC=0x
x-UserAgent:Vodia-PBX/5.3.0
x-SIPterm:SDC=OK SDR=OR
</Quality></sns:CDR></env:Body></env:Envelope>

[9] 2016/04/19 15:36:47: Received 319 bytes




Share this post


Link to post
Share on other sites

Thanks, now we can see the SDP. The codec is properly advertised.

 

G.726 was introduced in version 5.1.3; maybe you have upgraded that system with codecs set which does not change during the upgrade. Check your codec preference on the system and trunk level, maybe it is just not enabled.

Share this post


Link to post
Share on other sites

I am not clear on this as the domain trunks generally dont differ with the settings for the system.

 

Can we add other codecs to the pbx like opus, is that possible.

 

Thanks

Share this post


Link to post
Share on other sites

The trunk settings override the global settings when the call leg is on that trunk. The problem with the codecs is that the PBX must be able to decode and encode them. E.g. when you call the mailbox with G711 and then later you want to listen to the recording, you want to hear it with that codec. OPUS is on our list, especially because of the whole WebRTC topic.

Share this post


Link to post
Share on other sites

I dont really understand your response.

 

I never changed any trunk settings, so again, why cant we use g726 when the device is using it, but the pbx doesnt recognize it.

 

Regarding OPUS being on our list, does that mean it is coming?

Share this post


Link to post
Share on other sites

Oh, the way the codecs are being negotiated is that the proposal from the phone or trunk are compared against the internal list of enabled (not available) codecs in the settings. Lets say in version 5.0 you set the preference to "ulaw alaw" and then upgraded your PBX to 5.2, those settings are still "ulaw alaw" even though more codecs might be available in the newer version.

Share this post


Link to post
Share on other sites

Thanks for responding.

 

 

To be honest, i dont think we have ever touched the codecs until now, as i was trying to explore better options for mobile devices.

 

I saw your article on G726, and i thought i would try it. In my travels, i have learned about opus, a free codec, and wondered why you havent added it to the list.

 

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×