Cisco AS5300 - transcoding ulaw na g729

Problemy związane z Unified Communications
Wiadomość
Autor
pretenderek
member
member
Posty: 21
Rejestracja: 19 cze 2009, 10:39

Cisco AS5300 - transcoding ulaw na g729

#1

#1 Post autor: pretenderek »

Witam,

Jestem od niedawna w temacie voice na Cisco ale
chcialbym skonfigurowac Cisco AS5300/4xE1
IOS (tm) 5300 Software (C5300-JK8S-M), Version 12.2(10a)
z Asteriskiem w taki sposob aby miec mozliwosc zmiany voice codeka z np. ulaw na g729.

Scenariusz dzialania jest taki:
SIP numer 1111(kodek ulaw) zarejestrowany pod Asterisk dzwoni na numer 1234, rozmowa kierowana powinna byc na port E1 serial 0 w cisco, nastepnie kierowana na serial 1 E1 i spowrotem do Asteriska na numer 2222. Porty E1 serial 0 i serial 1 spiete sa kablem (loopback).

Czy ktos z mogłby pomoc z taka konfiguracja?

Pozdr,
P.

Awatar użytkownika
peper
CCIE / Site Admin
CCIE / Site Admin
Posty: 5005
Rejestracja: 13 sie 2004, 12:19
Lokalizacja: Warsaw, PL
Kontakt:

#2

#2 Post autor: peper »

A może pokarz co już zrobiłeś to ci podpowiemy? Tak będzie łatwiej
Szkoła DevNet: https://szkoladevnet.pl


Facebook: https://www.facebook.com/Piotr.Wojciechowski.CCIE
LinkedIn: https://www.linkedin.com/in/peper
Twitter: https://www.twitter.com/PiotrW_CCIE

"Zapomniałem że od kilku lat wszyscy giną jakby nigdy ich nie miało być
w stu tysiącach jednakowych miast giną jak psy"

pretenderek
member
member
Posty: 21
Rejestracja: 19 cze 2009, 10:39

#3

#3 Post autor: pretenderek »

Tutaj mam aktualny konfig:

Kod: Zaznacz cały

!
isdn switch-type primary-net5
isdn display layer2-status
!
voice service voip
!
voice class codec 1
 codec preference 1 g729r8 bytes 40
 codec preference 2 g711ulaw
 codec preference 3 g711alaw
 codec preference 4 g723r63 bytes 96
 codec preference 5 g726r16 bytes 80
 codec preference 6 gsmfr bytes 132
!
!
fax interface-type modem
mta receive maximum-recipients 0
!
call-history-mib retain-timer 120
call-history-mib max-size 500
dial-control-mib retain-timer 120
!
controller E1 0
 framing NO-CRC4
 clock source line primary
 pri-group timeslots 1-31
!
controller E1 1
 framing NO-CRC4
 clock source line secondary 1
 pri-group timeslots 1-31
!
controller E1 2
 framing NO-CRC4
 pri-group timeslots 1-31
!
controller E1 3
 framing NO-CRC4
 pri-group timeslots 1-31
!
translation-rule 2
 Rule 1 ^1234 2222
!
!
interface Serial0:15
 no ip address
 isdn switch-type primary-net5
 isdn overlap-receiving
 isdn send-alerting
 isdn disconnect-cause busy
 isdn outgoing-voice info-transfer-capability 3.1kHz-audio
 fair-queue 64 256 0
 no cdp enable
!
interface Serial1:15
 no ip address
 isdn switch-type primary-net5
 isdn overlap-receiving
 isdn incoming-voice modem
 fair-queue 64 256 0
 no cdp enable
!
interface Serial2:15
 no ip address
 isdn switch-type primary-net5
 isdn incoming-voice modem
 fair-queue 64 256 0
 no cdp enable
!
interface Serial3:15
 no ip address
 isdn switch-type primary-net5
 isdn incoming-voice modem
 fair-queue 64 256 0
 no cdp enable
!
voice-port 0:D
 input gain 3
 echo-cancel coverage 32
 cptone US
!
voice-port 1:D
 input gain 3
 echo-cancel coverage 32
 cptone US
!
voice-port 2:D
 input gain 3
 echo-cancel coverage 32
 cptone US
!
voice-port 3:D
 input gain 3
 echo-cancel coverage 32
 cptone US
!
dial-peer voice 1 pots
 incoming called-number .
 direct-inward-dial
 port 0:D
!
dial-peer voice 1234 pots
 max-conn 60
 destination-pattern 1234
 translate-outgoing called 2
 no digit-strip
 direct-inward-dial
 port 0:D
 forward-digits all
!
dial-peer voice 2222 voip
 destination-pattern 2222
 session protocol sipv2
 session target ipv4:10.0.0.3:5060
 codec g729r8
 no vad
!
gateway
!
sip-ua
 retry invite 4
 retry response 3
 retry bye 2
 retry cancel 2
 sip-server ipv4:10.0.0.3:5060
!
------------
10.0.0.3 - Asterisk
10.0.0.2 - Cisco

Z tego co czytalem to aby zmianić codec z ulaw na g729 to musze przepchać rozmowę przez E1 - serial0->serial1 dokonujac transodingu. Oba porty mam połaczone kabelkiem, który jest zarobiony zgodnie z: 1 -> 4, 2 -> 5, 4 -> 1, 5 -> 2.

Ponadto:

Kod: Zaznacz cały

ISDN Serial0:15 interface
        dsl 0, interface ISDN Switchtype = primary-net5
    Layer 1 Status:
        ACTIVE
    Layer 2 Status:
        TEI = 0, Ces = 1, SAPI = 0, State = TEI_ASSIGNED
    Layer 3 Status:
        0 Active Layer 3 Call(s)
    Active dsl 0 CCBs = 0
    The Free Channel Mask:  0x7FFF7FFF
    Number of L2 Discards = 0, L2 Session ID = 113
ISDN Serial1:15 interface
        dsl 1, interface ISDN Switchtype = primary-net5
    Layer 1 Status:
        ACTIVE
    Layer 2 Status:
        TEI = 0, Ces = 1, SAPI = 0, State = TEI_ASSIGNED
    Layer 3 Status:
        0 Active Layer 3 Call(s)
    Active dsl 1 CCBs = 0
    The Free Channel Mask:  0x7FFF7FFF
    Number of L2 Discards = 0, L2 Session ID = 113
Zastanawia mnie tez taka sprawa, że Layer 2 Status zmienia się co chwile z TE1_ASSIGNED na AWAITING_ESTABLISHMENT. Nie wiem czy tak powinno być.

Dodatkowo jak już dzwonie z konta SIP z numeru 1111 (zarejestrowany pod asterisk) na nr 1234 to komenda:

Kod: Zaznacz cały

#show call history voice brief
pokazuje:

Kod: Zaznacz cały

11FB : 1821230hs.38 +-1 +0 pid:1234 Originate 6666
 dur 00:00:00 tx:0/0 rx:0/0 22  (no circuit.)
 Telephony 0:D (41): tx:0/0/0ms g729r8 pre-ietf noise:0dBm acom:0dBm

11FB : 1821191hs.39 +-1 +39 pid:0 Answer 1111
 dur 00:00:00 tx:0/0 rx:0/0 22  (no circuit.)
 IP 10.0.0.77:12424 rtt:0ms pl:0/0ms lost:0/0/0 delay:0/0/0ms g729r8
Czy ktoś wie co ja robię nie tak?
Nie ukrywam, jestem nowy w temacie VOICE pod Cisco.


//edit peper: Do formatowania listingów używamy znaczników
Ostatnio zmieniony 19 cze 2009, 13:55 przez pretenderek, łącznie zmieniany 1 raz.

pretenderek
member
member
Posty: 21
Rejestracja: 19 cze 2009, 10:39

#4

#4 Post autor: pretenderek »

przepraszam, zamiast Originate 6666 jest Originate 2222.
Nie ten fragment skopiowałem.

Pozdrawiam,
P.

Awatar użytkownika
peper
CCIE / Site Admin
CCIE / Site Admin
Posty: 5005
Rejestracja: 13 sie 2004, 12:19
Lokalizacja: Warsaw, PL
Kontakt:

#5

#5 Post autor: peper »

No ale masz głosową E1, więc jak chcesz tam mieć kodek G.729? Po drugie do transkodowania musisz mieć DSP.
Szkoła DevNet: https://szkoladevnet.pl


Facebook: https://www.facebook.com/Piotr.Wojciechowski.CCIE
LinkedIn: https://www.linkedin.com/in/peper
Twitter: https://www.twitter.com/PiotrW_CCIE

"Zapomniałem że od kilku lat wszyscy giną jakby nigdy ich nie miało być
w stu tysiącach jednakowych miast giną jak psy"

pretenderek
member
member
Posty: 21
Rejestracja: 19 cze 2009, 10:39

#6

#6 Post autor: pretenderek »

:| to jak ugryźć ten temat ?

pretenderek
member
member
Posty: 21
Rejestracja: 19 cze 2009, 10:39

#7

#7 Post autor: pretenderek »

a DSP jest

Kod: Zaznacz cały

cisco AS5300 (R4K) processor (revision A.32) with 131072K/16384K
Processor board ID 11689696
R4700 CPU at 150Mhz, Implementation 33, Rev 1.0, 512KB L2 Cache
Channelized E1, Version 1.0.
Bridging software.
X.25 software, Version 3.0.0.
SuperLAT software (copyright 1990 by Meridian Technology Corp).
TN3270 Emulation software.
Primary Rate ISDN software, Version 1.1.
Backplane revision 2
1 Ethernet/IEEE 802.3 interface(s)
1 FastEthernet/IEEE 802.3 interface(s)
124 Serial network interface(s)
4 Channelized E1/PRI port(s)
60 DSP(s), 60 Voice resource(s)

Awatar użytkownika
cineklas
wannabe
wannabe
Posty: 169
Rejestracja: 10 lip 2006, 19:22
Lokalizacja: 3miasto

#8

#8 Post autor: cineklas »

pretenderek pisze:a DSP jest

Kod: Zaznacz cały

cisco AS5300 (R4K) processor (revision A.32) with 131072K/16384K
Processor board ID 11689696
R4700 CPU at 150Mhz, Implementation 33, Rev 1.0, 512KB L2 Cache
Channelized E1, Version 1.0.
Bridging software.
X.25 software, Version 3.0.0.
SuperLAT software (copyright 1990 by Meridian Technology Corp).
TN3270 Emulation software.
Primary Rate ISDN software, Version 1.1.
Backplane revision 2
1 Ethernet/IEEE 802.3 interface(s)
1 FastEthernet/IEEE 802.3 interface(s)
124 Serial network interface(s)
4 Channelized E1/PRI port(s)
60 DSP(s), 60 Voice resource(s)
1) konfig nie jest cały a jak zapewne wiesz forumowicznie nie wroza z fusów
2) nie widze wpisow mowiacych o partycypacji poszczegolnych voice-portow w dsp sharingu
(network participate)
3) nie widze to czego synchonizujesz zegar (network clock select)
4) nie widze ustawien voice-card mowiacych o dsp-farmingu (E1 masz 4 a tylko 60 DSP)

stad nie moge pomoc...

pretenderek
member
member
Posty: 21
Rejestracja: 19 cze 2009, 10:39

#9

#9 Post autor: pretenderek »

Kod: Zaznacz cały

Cisco Internetwork Operating System Software
IOS (tm) 5300 Software (C5300-JK8S-M), Version 12.2(10a), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Mon 20-May-02 17:18 by pwade
Image text-base: 0x60008938, data-base: 0x61282000

ROM: System Bootstrap, Version 12.0(2)XD1, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)

System returned to ROM by reload at 11:48:13 UTC Tue Jun 16 2009
System image file is "flash:c5300-jk8s-mz.122-10a.bin"

cisco AS5300 (R4K) processor (revision A.32) with 131072K/16384K bytes of memory.
Processor board ID 11689696
R4700 CPU at 150Mhz, Implementation 33, Rev 1.0, 512KB L2 Cache
Channelized E1, Version 1.0.
Bridging software.
X.25 software, Version 3.0.0.
SuperLAT software (copyright 1990 by Meridian Technology Corp).
TN3270 Emulation software.
Primary Rate ISDN software, Version 1.1.
Backplane revision 2
Manufacture Cookie Info:
 EEPROM Type 0x0001, EEPROM Version 0x01, Board ID 0x30,
 Board Hardware Version 1.80, Item Number 800-2544-03,
 Board Revision A0, Serial Number 11689696,
 PLD/ISP Version 0.0,  Manufacture Date 3-May-1999.
1 Ethernet/IEEE 802.3 interface(s)
1 FastEthernet/IEEE 802.3 interface(s)
124 Serial network interface(s)
4 Channelized E1/PRI port(s)
60 DSP(s), 60 Voice resource(s)
128K bytes of non-volatile configuration memory.
32768K bytes of processor board System flash (Read/Write)
8192K bytes of processor board Boot flash (Read/Write)

Configuration register is 0x2102

Kod: Zaznacz cały

version 12.2
service timestamps debug uptime
service timestamps log uptime
!
boot system flash c5300-is-mz.122-2.XB2.bin
!
resource-pool disable
!
call rsvp-sync
ip subnet-zero
no ip source-route
no ip domain-lookup
ip domain-name cisco5300
!
isdn switch-type primary-net5
isdn display layer2-status
!
voice service voip
!
voice class codec 1
 codec preference 1 g729r8 bytes 40
 codec preference 2 g711ulaw
 codec preference 3 g711alaw
 codec preference 4 g723r63 bytes 96
 codec preference 5 g726r16 bytes 80
 codec preference 6 gsmfr bytes 132
!
voice class h323 1
 call start slow
!
fax interface-type modem
mta receive maximum-recipients 0
!
call-history-mib retain-timer 120
call-history-mib max-size 500
dial-control-mib retain-timer 120
!
controller E1 0
 framing NO-CRC4
 clock source line primary
 pri-group timeslots 1-31
!
controller E1 1
 framing NO-CRC4
 clock source line secondary 1
 pri-group timeslots 1-31
!
controller E1 2
 framing NO-CRC4
 pri-group timeslots 1-31
!
controller E1 3
 framing NO-CRC4
 pri-group timeslots 1-31
!
translation-rule 1234
 Rule 1 ^001234 5555
!
translation-rule 2
 Rule 1 ^1234 2222
!
interface Ethernet0
 ip address 192.168.1.5 255.255.255.0
 no ip mroute-cache
!
interface Serial0:15
 no ip address
 isdn switch-type primary-net5
 isdn overlap-receiving
 isdn incoming-voice modem
 isdn send-alerting
 isdn disconnect-cause busy
 fair-queue 64 256 0
 no cdp enable
!
interface Serial1:15
 no ip address
 isdn switch-type primary-net5
 isdn overlap-receiving
 isdn incoming-voice modem
 fair-queue 64 256 0
 no cdp enable
!
interface Serial2:15
 no ip address
 isdn switch-type primary-net5
 isdn incoming-voice modem
 fair-queue 64 256 0
 no cdp enable
!
interface Serial3:15
 no ip address
 isdn switch-type primary-net5
 isdn incoming-voice modem
 fair-queue 64 256 0
 no cdp enable
!
interface FastEthernet0
 ip address 10.0.0.2 255.255.255.0
 no ip mroute-cache
 duplex auto
 speed auto
!
no ip http server
ip pim bidir-enable
!
!
voice-port 0:D
 input gain 3
 echo-cancel coverage 32
 cptone US
!
voice-port 1:D
 input gain 3
 echo-cancel coverage 32
 cptone US
 timeouts initial 0
 timeouts wait-release 5
!
voice-port 2:D
 input gain 3
 echo-cancel coverage 32
 cptone US
!
voice-port 3:D
 input gain 3
 echo-cancel coverage 32
 cptone US
!
dial-peer voice 1 pots
 incoming called-number .
 direct-inward-dial
 port 0:D
!
dial-peer voice 5555 voip
 destination-pattern 5555
 session target ipv4:10.0.0.3:5060
 codec g711ulaw
 no vad
!
dial-peer voice 1234 pots
 max-conn 60
 destination-pattern 1234
 translate-outgoing called 2
 port 0:D
 forward-digits all
!
dial-peer voice 2222 voip
 incoming called-number 2222
 destination-pattern 2222
 session protocol sipv2
 session target ipv4:10.0.0.3:5060
 session transport tcp
 codec g711ulaw
 no vad
!
gateway
!
sip-ua
 retry invite 4
 retry response 3
 retry bye 2
 retry cancel 2
 sip-server ipv4:10.0.0.3:5060
!
facility-alarm detect interface Ethernet0
!

pretenderek
member
member
Posty: 21
Rejestracja: 19 cze 2009, 10:39

#10

#10 Post autor: pretenderek »

Powyżej mój konfig. Nie mam nic ponadto.
Jak wspominałem jestem od niedawna w VOICE na Cisco.
Prosiłbym o pare informacji od czego zacząć.

Awatar użytkownika
brth
wannabe
wannabe
Posty: 171
Rejestracja: 14 mar 2009, 15:42

#11

#11 Post autor: brth »

Proponowałbym Ci wyczyścić konfig bo masz tam mocno namieszane i wkleić poniższe:

Kod: Zaznacz cały

isdn switch-type primary-net5
isdn gateway-max-interworking
voice call send-alert
voice rtp send-recv

voice service pots
voice service voip

controller E1 0
 clock source internal
 pri-group timeslots 1-31
 description --- E1 0 - master ---
 framing crc4
 linecode hdb3
 no shut

controller E1 1
 clock source line primary 
 pri-group timeslots 1-31
 description --- E1 1 - slave ---
 framing crc4
 linecode hdb3
 no shut


interface Serial0:15
 no ip address
 no logging event link-status
 no snmp trap link-status
 isdn switch-type primary-net5
 isdn protocol-emulate network
 isdn incoming-voice modem
 isdn send-alerting
 isdn sending-complete
 no cdp enable

interface Serial0:15
 no ip address
 no logging event link-status
 no snmp trap link-status
 isdn switch-type primary-net5
 isdn incoming-voice modem
 isdn send-alerting
 isdn sending-complete
 no cdp enable

voice-port 0:D
 cptone PL
 bearer-cap Speech

voice-port 1:D
 cptone PL
 bearer-cap Speech

voice translation-rule 2222
 rule 1 /^1234$/ /2222/


dial-peer cor custom
 name IN-PSTN
 name OUT-VOIP
 name OUT-PSTN
 name IN-VOIP
!
!
dial-peer cor list IN-PSTN
 member IN-PSTN
 member OUT-VOIP
!
dial-peer cor list OUT-VOIP
 member OUT-VOIP
!
dial-peer cor list OUT-PSTN
 member OUT-PSTN
!
dial-peer cor list IN-VOIP
 member OUT-PSTN
 member IN-VOIP


dial-peer voice 1 pots
 port 1:D
 corlist incoming IN-PSTN
 description --- incoming from PSTN ---
 huntstop
 incoming called-number 2222
 direct-inward-dial
 forward-digits all
!
dial-peer voice 2 voip
 corlist outgoing OUT-VOIP
 description --- outgoing to * ---
 preference 1
 destination-pattern 2222
 codec g729r8
 session protocol sipv2
 session target ipv4:X.X.X.X
 no vad
!
dial-peer voice 101 voip
 corlist incoming IN-VOIP
 description --- incoming from * ---
 session protocol sipv2
 huntstop
 incoming called-number 1234
 codec g711ulaw
 no vad
!
dial-peer voice 102 pots
 port 0:D
 corlist outgoing OUT-PSTN
 description --- outgoing to PSTN ---
 huntstop
 destination-pattern 1234
 direct-inward-dial
 forward-digits all
 translate called 2222
Uwagi:
- E1 0 daje zegar, E1 1 bierze
- nie wiem jaki masz adres * więc wpisałem X.X.X.X
- call wchodzi z * z DNIS 1234 i na wyjściu do E1 0 translowany jest na 2222
- sprawdź najpierw czy wstaną Ci porty ISDN:

Kod: Zaznacz cały

sh isdn status

Kod: Zaznacz cały

sh controller e1 
bez tego nie będą banglały calle

W razie problemów podeślij output z

Kod: Zaznacz cały

sh call hist voi

ODPOWIEDZ