Codec issue

Hi,

I am using Asterisk 1.2.27 on SIP. Only G729 and G711 codecs are enabled on my Asterisk. I have disabled all the other codecs with noload=> at modules.conf.

At my eyebeam on G729 is enabled and service also supports g729. But for some calls I found either it does not connect or if the call is established there was complete silence. When i run the debug on sip i found the for these calls asterisk trying to use GSM, PCM codecs while they are disabled here.

Below are the debug for two diffent calls

localhost*CLI>
<-- SIP read from 216.181.122.44:5060:
SIP/2.0 183 Session Progress
Call-ID: 682db2192d13392543b8c8d006acf3e9@x.x.x.x
From: "Agent " <sip:12127762895@x.x.x.x(asterisk IP)>;tag=as6555010d
To: sip:17145565585@216.181.122.44;tag=23945
Content-Type: application/sdp
CSeq: 102 INVITE
Via: SIP/2.0/UDP x.x.x.x(asterisk IP):5060;branch=z9hG4bK2162d074;rport
Supported: timer,100rel
Content-Length: 270

v=0
o=root 1395323097 1395323097 IN IP4 67.203.64.22
s=Cisco-SIPGateway/IOS-12.x
c=IN IP4 67.203.64.22
t=0 0
=audio 15856 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

— (9 headers 13 lines) —
Found RTP audio format 0
Found RTP audio format 101
Peer audio RTP is at port 67.203.64.22:15856
Found description format PCMU
Found description format telephone-event
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
– SIP/216.181.122.44-082f2c38 is making progress passing it to SIP/cc1001-082d1d70
Retransmitting #1 (no NAT) to 202.5.140.36:5070:
OPTIONS sip:cc1002@202.5.140.36:5070 SIP/2.0
Via: SIP/2.0/UDP x.x.x.x(asterisk IP):5060;branch=z9hG4bK0b0fdff7;rport
From: “asterisk” <sip:asterisk@x.x.x.x(asterisk IP)>;tag=as51ca8b7b
To: sip:cc1002@202.5.140.36:5070
Contact: <sip:asterisk@x.x.x.x(asterisk IP)>
Call-ID: 34b3a2a74f0b4f0d3757593f28371455@x.x.x.x(asterisk IP)
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 19 Jun 2008 16:19:59 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


-- Executing Set("SIP/cc1001-082f26a8", "CALLERID(num)=7035471212") in new stack
-- Executing Dial("SIP/cc1001-082f26a8", "sip/12123798353@65.216.143.6:4060||ro") in new stack

We’re at x.x.x.x(asterisk IP) port 11892
Adding codec 0x2 (gsm) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
13 headers, 12 lines
Reliably Transmitting (no NAT) to 65.216.143.6:4060:
INVITE sip:12123798353@65.216.143.6:4060 SIP/2.0
Via: SIP/2.0/UDP x.x.x.x(asterisk IP):5060;branch=z9hG4bK6cfbfa2b;rport
From: "Agent " <sip:7035471212@x.x.x.x(asterisk IP)>;tag=as559cbd4d
To: sip:12123798353@65.216.143.6:4060
Contact: <sip:7035471212@x.x.x.x(asterisk IP)>
Call-ID: 36a12b6e54fc932b4c1c1e596910e749@x.x.x.x(asterisk IP)
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 19 Jun 2008 16:45:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 259

v=0
o=root 3104 3104 IN IP4 x.x.x.x(asterisk IP)
s=session
c=IN IP4 x.x.x.x(asterisk IP)
t=0 0
m=audio 11892 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -


-- Called 12123798353@65.216.143.6:4060

Transmitting (no NAT) to 202.5.140.9:43588:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 202.5.140.9:43588;branch=z9hG4bK-d87543-c761d40c874db668-1–d87543-;received=202.5.140.9;rport=43588
From: "Agent "<sip:cc1001@x.x.x.x(asterisk IP)>;tag=4f68272e
To: “212123798353”<sip:212123798353@x.x.x.x(asterisk IP)>;tag=as591817ac
Call-ID: 3174a35e0e6c1b55NDgwYzQ1MmVmYjI3YTZmY2I3NzNiYzdlOTIzMWEwODM.
CSeq: 2 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:212123798353@x.x.x.x(asterisk IP)>
Content-Length: 0

Is there any idea why Asterisk goes for other codec which i have disabled.

Thanks

[quote=“brainwhistler”]Hi,

I am using Asterisk 1.2.27 on SIP. Only G729 and G711 codecs are enabled on my Asterisk. I have disabled all the other codecs with noload=> at modules.conf.
[/quote]

The right way to do this:

disallow = all
allow = ulaw
allow = g729  

Put this in your sip.conf, in [general] and/or in the peer definitions.

[quote]
At my eyebeam on G729 is enabled and service also supports g729. [/quote]

Not sure this relevant to you, but read this support.counterpath.com/viewtopic.php?t=9142