[ previous ] [ next ] [ threads ]
 To :  <yate@v...>
 From :  "Andrew Checkov" <expert@a...>
 Subject :  SS7 and mulaw
 Date :  Thu, 17 Jun 2010 13:30:43 +0400
Hi,

I has the yate switch with 2 SS7 linksets - one is alaw and works fine and
second is an ulaw.

Here's it's definition at ysigchan.conf

[link2]
enable=yes
type=ss7-isup
switchtype=national-isdn
pointcodetype=ITU
pointcode=14213
defaultpointcode=14213
remotepointcode=14500
lockgroup=yes
earlyacm=yes
sig=wanpipe2
voice=wanpipe2
userparttest=0
strategy=decrement
channelsync=1000
numplan=isdn
numtype=national
presentation=allowed
screening=user-provided
format=mulaw
print-messages=yes
extended-debug=yes
ReservedNational = 0xc0
netindicator=0xc0

As you can see there's format=mulaw parameter.

Meantime incoming call from this linkset routed to 'milliwatt' show the
following:

 Received message (0x9e8dd78)
-----
IAM [cic=1 label=7-20-4:6-240-5:1]  00 20 01 0a 03 02 08 06 81 10 21 43 65
0f 0a 07 03 11 94 95 08 30 02 0b 07 03 10 09 51 47 38 87 13 02 03 31 28 07
03 10 09 51 47 38 87 31 02 00 00 39 02 31 c0 00
  protocol-type='itu-t'
  message-type='IAM'
  NatureOfConnectionIndicators='0sat,cont-check-none'
 
ForwardCallIndicators='national,e2e-none,isup-path,isup-pref,isdn-orig,sccp-
none'
  CallingPartyCategory='ordinary'
  TransmissionMediumRequirement='3.1khz-audio'
  CalledPartyNumber='123456.'
  CalledPartyNumber.nature='subscriber'
  CalledPartyNumber.plan='isdn'
  CalledPartyNumber.inn='true'
  CallingPartyNumber='4959800320'
  CallingPartyNumber.nature='national'
  CallingPartyNumber.plan='isdn'
  CallingPartyNumber.complete='true'
  CallingPartyNumber.restrict='allowed'
  CallingPartyNumber.screened='user-provided-passed'
  RedirectingNumber='9015748378'
  RedirectingNumber.nature='national'
  RedirectingNumber.plan='isdn'
  RedirectingNumber.restrict='allowed'
  RedirectionInformation='03 31'
  OriginalCalledNumber='9015748378'
  OriginalCalledNumber.nature='national'
  OriginalCalledNumber.plan='isdn'
  OriginalCalledNumber.restrict='allowed'
  PropagationDelayCounter='0'
  ParameterCompatInformation.PropagationDelayCounter='transit'
-----
 Call(1) direction=incoming routing-label=6-240-5:7-20-4:1
range= [0x9e91f58]
 Incoming call from=4959800320 to=123456. trunk=link2
sigcall=0x9e91f58 [0x9e92bc0]
 Could not classify call from '4959800320', wasted 14 usec
 Got message 'call.route' for untracked id 'sig/1'
PHP Event: incoming
PHP Message: call.route params=Array
(
    [id] => sig/1
    [module] => sig
    [status] => incoming
    [address] => link2/1
    [billid] => 1276765865-1
    [answered] => false
    [caller] => 4959800320
    [called] => 123456.
    [format] => alaw
    [callernumtype] => national
    [callernumplan] => isdn
    [callerpres] => allowed
    [callerscreening] => user-provided-passed
    [callednumtype] => subscriber
    [callednumplan] => isdn
    [inn] => true
    [message-prefix] => isup.
    [isup.protocol-type] => itu-t
    [isup.message-type] => IAM
    [isup.NatureOfConnectionIndicators] => 0sat,cont-check-none
    [isup.ForwardCallIndicators] =>
national,e2e-none,isup-path,isup-pref,isdn-orig,sccp-none
    [isup.CallingPartyCategory] => ordinary
    [isup.TransmissionMediumRequirement] => 3.1khz-audio
    [isup.CalledPartyNumber] => 123456.
    [isup.CalledPartyNumber.nature] => subscriber
    [isup.CalledPartyNumber.plan] => isdn
    [isup.CalledPartyNumber.inn] => true
    [isup.CallingPartyNumber] => 4959800320
    [isup.CallingPartyNumber.nature] => national
    [isup.CallingPartyNumber.plan] => isdn
    [isup.CallingPartyNumber.complete] => true
    [isup.CallingPartyNumber.restrict] => allowed
    [isup.CallingPartyNumber.screened] => user-provided-passed
    [isup.RedirectingNumber] => 9015748378
    [isup.RedirectingNumber.nature] => national
    [isup.RedirectingNumber.plan] => isdn
    [isup.RedirectingNumber.restrict] => allowed
    [isup.RedirectionInformation] => 03 31
    [isup.OriginalCalledNumber] => 9015748378
    [isup.OriginalCalledNumber.nature] => national
    [isup.OriginalCalledNumber.plan] => isdn
    [isup.OriginalCalledNumber.restrict] => allowed
    [isup.PropagationDelayCounter] => 0
    [isup.ParameterCompatInformation.PropagationDelayCounter] => transit
    [isup.sls] => 1
)

 Routing call to '123456.' in context 'default' via 'tone/milliwatt'
in 605 usec
 ToneChan::ToneChan("milliwatt") [0x9e95c30]
 ToneSource::ToneSource(0x173074) 'milliwatt' [0x9e95538]
 Created DataTranslator 0x9e948d8 for 'slin' -> 'alaw' by factory
0x3fd468 (len=1)
 DataTranslator::attachChain [0x9e95538] 'slin' -> [0x9e83220] 'alaw'
succeeded
 ToneSource::run() [0x9e95538]
 Sending message (0x9e94a70)
-----
ACM [cic=1 label=6-240-5:7-20-4:1]  00 00 00
-----
 Answering now call sig/1 because we have no targetid
[0x9e92bc0]
 Call answered [0x9e92bc0]
 Sending message (0x9e94a70)
-----
ANM [cic=1 label=6-240-5:7-20-4:1]  00
-----
 Received message (0x9e8e4e0)

As you can see there's [format] => alaw  at call.route message
and following lines at the log:

 Created DataTranslator 0x9e948d8 for 'slin' -> 'alaw' by factory
0x3fd468 (len=1)
 DataTranslator::attachChain [0x9e95538] 'slin' -> [0x9e83220] 'alaw'
succeeded
 ToneSource::run() [0x9e95538]

As a result sound is distorted.

I'm using latest SVN R3387.

How the problem can be fixed or there's some other reason of distorted
sound?

Regards,
Andrew Checkov