Asterisk query on companding.

Hello,

I’m new to asterisk.

My setup is like telco T1/E1 terminating on NAT-> dahdi->statis app.

When a call is tried; I see below logs:
[Jul 24 02:03:55] DEBUG[4908][C-00000005]: sig_pri.c:213 PVT_TO_CHANNEL: prioffset: 8 mastehrtrunkgroup: 0 logicalspan: 0 result: 8
[Jul 24 02:03:55] DEBUG[4908][C-00000005]: channel_internal_api.c:703 ast_channel_nativeformats_set: : Formats: (none)
[Jul 24 02:03:55] DEBUG[4908][C-00000005]: channel_internal_api.c:713 ast_channel_nativeformats_set: Channel is being initialized or destroyed

[Jul 24 02:03:55] DEBUG[4908][C-00000005]: stasis.c:580 stasis_topic_create_with_detail: Creating topic. name: channel:1721804635.7, detail:
[Jul 24 02:03:55] DEBUG[4908][C-00000005]: stasis.c:614 stasis_topic_create_with_detail: Topic ‘channel:1721804635.7’: 0x7f41d8001820 created

[Jul 24 02:03:55] DEBUG[4908][C-00000005]: channel.c:949 __ast_channel_alloc_ap: Channel 0x7f41d8001b80 ‘DAHDI/i1/2000-5’ allocated
[Jul 24 02:03:55] DEBUG[4908][C-00000005]: channel_internal_api.c:703 ast_channel_nativeformats_set: DAHDI/i1/2000-5: Formats: (ulaw)

So, i was checking the source code. Not sure if I was correct on tracing the code flow.
I see the default law is alaw. then how did ulaw appeared above.
Please help to uderstand.

thanks,
Divya

To find out what is happening in a specific case, you have to record the data traffic with Wireshark or something similar. Codecs are negotiated and if the other side offers only alaw instead of ulaw, you are stuck with it. Another reason is priority. In this sense, there is no default codec. If ulaw has a higher priority, ulaw wins.

You’ve not provided enough information to accurately determine the reason for the behavior in your case.

Codecs are not negotiated on most or all circuit switched systems. DAHDI is used for such systems.

I used to set up ISDN systems myself years ago. There are always both G.711 flavors unless you exclude one.

I think you’re right. With Wanpipe drivers I had to specify one or the other flavor. On the other hand, changes were quick.

thank you for respone.

So when the run the CLI. It shows alaw as default .
localhostCLI> dahdi show channel 1
Channel: 1
Description:
File Descriptor: 16
Span: 1
Extension:
Dialing: no
Context: default
Caller ID:
Calling TON: 0
Caller ID subaddress:
Caller ID name:
Mailbox: none
Destroy: 0
InAlarm: 0
Signalling Type: ISDN PRI
Radio: 0
Owner:
Real:
Callwait:
Threeway:
Confno: -1
Propagated Conference: -1
Real in conference: 0
DSP: no
Busy Detection: no
TDD: no
Relax DTMF: no
Dialing/CallwaitCAS: 0/0
Default law: alaw
Fax Handled: no
Pulse phone: no
HW Gains (RX/TX): Disabled/Disabled
SW Gains (RX/TX): 0.00/0.00
Dynamic Range Compression (RX/TX): 0.00/0.00
DND: no
Echo Cancellation:
none
Wait for dialtone: 0ms
PRI Flags:
PRI Logical Span: Implicit
Hookstate (FXS only): Onhook
localhost
CLI>

I’ve spans configured as below.

Span 1: NAT 8-port Span 1

span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16

Span 2: NAT 8-port Span 2

span=2,2,0,ccs,hdb3,crc4
bchan=32-46,48-62
dchan=47

Span 3: NAT 8-port Span 3

span=3,3,0,ccs,hdb3,crc4
bchan=63-77,79-93
dchan=78

Span 4: NAT 8-port Span 4

span=4,4,0,ccs,hdb3,crc4
bchan=94-108,110-124
dchan=109

Span 5: NAT 8-port Span 5

span=5,5,0,ccs,hdb3,crc4
bchan=125-139,141-155
dchan=140

Span 6: NAT 8-port Span 6

span=6,6,0,ccs,hdb3,crc4
bchan=156-170,172-186
dchan=171

Span 7: NAT 8-port Span 7

span=7,7,0,ccs,hdb3,crc4
bchan=187-201,203-217
dchan=202

Span 8: NAT 8-port Span 8

span=8,8,0,ccs,hdb3,crc4
bchan=218-232,234-248
dchan=233

alaw = 1-248

Global data

loadzone = de
defaultzone = de

I’m not sure I can share audio files here?

On PRI logging at the console.

it shows ulaw is used.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.