Jump to content

Recommended Posts

Posted

Здраствуйте! Есть проблемы с сабжем. А именно: в fxo воткнута аналоговая линия, которая идет в город. В ethernet порт воткнут сервер с астериском. Задача в том, чтобы входящие на fxo вызовы прокидывалиь на астериск. конфиг cisco такой:

Current configuration : 1650 bytes
!
! Last configuration change at 02:58:30 GMT Mon Apr 11 2011
! NVRAM config last updated at 00:42:47 GMT Mon Apr 11 2011
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Cisco-gateway-1751-Phone
!
boot-start-marker
boot-end-marker
!
enable password xxxxx
!
clock timezone GMT 6
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
voice-card 0
!
voice-card 2
!
no aaa new-model
ip subnet-zero
ip cef
!
no ip domain lookup
no ftp-server write-enable
!
voice rtp send-recv
!
voice service voip
!
interface FastEthernet0/0
ip address eee.eee.eee.eee 255.255.255.0
speed auto
full-duplex
!
ip default-gateway rrr.rrr.rrr.rrr
no ip classless
!
voice-port 0/0
signal groundStart
cptone RU
connection plar 5113
description 5113
!
voice-port 0/1
signal groundStart
cptone RU
connection plar 5114
description 5114
!
dial-peer voice 1 pots
destination-pattern .....
port 0/0
!
dial-peer voice 2 pots
destination-pattern .....
port 0/1
!
dial-peer voice 3 voip
destination-pattern .....
session target ipv4:zzz.zzz.zzz.zzz
!
dial-peer voice 4 pots
incoming called-number .
port 0/0
!
sip-ua
aaa username proxy-auth
retry invite 3
retry response 3
retry bye 3
retry cancel 3
timers trying 1000
sip-server ipv4:zzz.zzz.zzz.zzz:5060
!
!
line con 0
line aux 0
line vty 0 4
password xxxxx
logging synchronous
login
line vty 5 15
exec-timeout 0 0
password xxxxx
logging synchronous
login
!
end

астериск:

host=eee.eee.eee.eee
type=peer
insecure=port,invite
context=from-trunk
canreinvite=no
nat=no
port=5060

Исходящие звонки проходят, при входящем на циску звонке циска сразу же пищит в линию busy тон. Куда копать даже и не знаю. Может кто подскажет?!

Posted

destination-pattern прописаны неправильно, как будут матчиться "5113" и "5114" в VoIP если в POTS стоит "...."?

По хорошему надо сделать префиксы для каждого POTS и матчить VoIP по "511[34]"

 

Примерно так:

 

! Префикс "0000" добавляем на * и режем на порту.
dial-peer voice 1 pots
destination-pattern 0000....
port 0/0
!
! Префикс "0001" добавляем на * и режем на порту.
dial-peer voice 2 pots
destination-pattern 0001.....
port 0/1
!
dial-peer voice 3 voip
destination-pattern 511[34]
session target ipv4:zzz.zzz.zzz.zzz
!

Posted (edited)

Я в VoIP не силен, мягко говоря. а тут еще и циска, блин... Больше с Длинками работал и c SNR vp-7020. Как добавить префикс? когда с телефона набираю 0000+ номер телефона внешний, исходящий звонок проходит, но это мелочи, входящей связи так и нет! (сделал как у Вас в конфиге). причем в отладке астериска нет никакой реакции на входящий вызов, т.е. до него даже не доходит от циски запрос!

Edited by breusovok
Posted

входящей связи так и нет!

session target ipv4:zzz.zzz.zzz.zzz - это правильно прописано?

 

Попробовать так:

session protocol sipv2

session target ipv4:zzz.zzz.zzz.zzz:5060

 

Дебажить на цыске sip, вывод при попытке звонка - сюда.

 

Про добавление префикса - смотри howto для *

 

когда с телефона набираю 0000+ номер

Это должен делать * самостоятельно, если выбрано соответствующее направление.

Posted

я думаю если бы сервер не правильно был прописан, исходящей связи бы не было. Про * почитаю в нете. а по дебагу... первое, что я сделал, когда у меня не пошел звонок, включил дебаг сипа, но в консоли ноль реакции. где его смотреть?

Posted


Cisco-gateway-1751-Phone#htsp_release_req: cause 27, no_onhook 0
Apr 11 19:23:14.511: htsp_process_event: [0/0, FXOLS_OFFHOOK, E_HTSP_RELEASE_REQ]fxols_offhook_release
Apr 11 19:23:14.511: htsp_timer_stop
Apr 11 19:23:14.511: htsp_timer_stop2
Apr 11 19:23:14.511: [0/0] set signal state = 0x4 timestamp = 0
Apr 11 19:23:14.511: dsp_set_sig_state: [0/0] packet_len=12 channel_id=128 packet_id=39 state=0x4 timestamp=0x0
Apr 11 19:23:14.511: TGRM: reg_invoke_tgrm_call_update(0, 0, 0, 0, 1, TGRM_CALL_IDLE, TGRM_CALL_VOICE, TGRM_DIRECTION_IN)
Apr 11 19:23:14.511: htsp_timer - 2000 msec
Apr 11 19:23:14.511: TGRM: reg_invoke_tgrm_call_update(0, 0, 0, 0, 1, TGRM_CALL_BUSY, TGRM_CALL_VOICE, TGRM_DIRECTION_OUT)
Apr 11 19:23:14.519: ipm_dsprm_close_cleanup
Apr 11 19:23:14.519: regxrule_stack_pop_RegXruleNumInfo: stack=0x814FB038; count=2
Apr 11 19:23:16.511: htsp_process_event: [0/0, FXOLS_GUARD_OUT, E_HTSP_EVENT_TIMER]fxols_guard_out_timeout
Apr 11 19:23:16.511: TGRM: reg_invoke_tgrm_call_update(0, 0, 0, 0, 1, TGRM_CALL_IDLE, TGRM_CALL_VOICE, TGRM_DIRECTION_OUT)
Apr 11 19:23:16.511: dsp_req_sig_state: [0/0] packet_len=8 channel_id=128 packet_id=40
Apr 11 19:23:16.511: htsp_dsp_message: SEND/RESP_SIG_STATUS: state=0x4 timestamp=57000 systime=93079137
Apr 11 19:23:16.511: htsp_process_event: [0/0, FXOLS_ONHOOK, E_DSP_SIG_0100]
Apr 11 19:23:24.071: htsp_dsp_message: SEND/RESP_SIG_STATUS: state=0x0 timestamp=31285 systime=93079893
Apr 11 19:23:24.071: htsp_process_event: [0/0, FXOLS_ONHOOK, E_DSP_SIG_0000]fxols_onhook_ringing
Apr 11 19:23:24.075: TGRM: reg_invoke_tgrm_call_update(0, 0, 0, 0, 1, TGRM_CALL_PENDING, TGRM_CALL_VOICE, TGRM_DIRECTION_IN)
Apr 11 19:23:24.075: htsp_timer - 125 msec
Apr 11 19:23:24.203: htsp_process_event: [0/0, FXOLS_WAIT_RING_MIN, E_HTSP_EVENT_TIMER]fxols_wait_ring_min_timer
Apr 11 19:23:24.203: htsp_timer - 10000 msec
Apr 11 19:23:25.063: htsp_dsp_message: SEND/RESP_SIG_STATUS: state=0x4 timestamp=32275 systime=93079992
Apr 11 19:23:25.063: htsp_process_event: [0/0, FXOLS_RINGING, E_DSP_SIG_0100]
Apr 11 19:23:25.063: fxols_ringing_not
Apr 11 19:23:25.063: htsp_timer_stop htsp_setup_ind
Apr 11 19:23:25.063: [0/0] get_local_station_id calling num= calling name= calling time=04/12 01:23
Apr 11 19:23:25.063: TGRM: reg_invoke_tgrm_accept_call(1, TGRM_CALL_VOICE, TGRM_DIRECTION_IN, 0, 0, 0, 0)
Apr 11 19:23:25.063: TGRM: Calling vtsp_tsp_call_setup_ind().
Apr 11 19:23:25.067: regxrule_get_profile_from_voiceport: Found profile 1 defined on voice-port
Apr 11 19:23:25.067: regxrule_get_RegXruleProfile: Error: Profile 1 doesn't exist
Apr 11 19:23:25.067: regxrule_get_profile_from_trunkgroup: Voice port 0x8258F278 does not belong to any trunk group
Apr 11 19:23:25.075: regxrule_stack_pop_RegXruleNumInfo: stack=0x814ECA60; count=1
Apr 11 19:23:25.075: htsp_process_event: [0/0, FXOLS_WAIT_SETUP_ACK, E_HTSP_SETUP_ACK]
Apr 11 19:23:25.075: fxols_wait_setup_ack:
Apr 11 19:23:25.075: [0/0] set signal state = 0xC timestamp = 0
Apr 11 19:23:25.079: dsp_set_sig_state: [0/0] packet_len=12 channel_id=128 packet_id=39 state=0xC timestamp=0x0fxols_check_auto_call
Apr 11 19:23:25.079: regxrule_stack_push_RegXruleNumInfo: stack=0x814ECA60; count=0
Apr 11 19:23:25.079: regxrule_profile_translate: Error: invalid input; callinfo=0x814F8878 profilep=0x0 rtype=calling
Apr 11 19:23:25.079: regxrule_profile_translate: Error: invalid input; callinfo=0x814F8878 profilep=0x0 rtype=redirect-called
Apr 11 19:23:25.079: regxrule_profile_translate: Error: invalid input; callinfo=0x814F8878 profilep=0x0 rtype=called
Apr 11 19:23:25.083: regxrule_stack_push_RegXruleNumInfo: stack=0x814ECA60; count=1
Apr 11 19:23:25.083: regxrule_dp_translate: No profile found in peer 3 for outgoing direction
Apr 11 19:23:25.083: regxrule_dp_translate: calling_number= calling_octet=0x0
       called_number=5113 called_octet=0x81
       redirect_number= redirect_type=0 redirect_plan=0        redirect_PI=0 redirect_SI=0
Apr 11 19:23:25.083: htsp_process_event: [0/0, FXOLS_PROCEEDING, E_HTSP_PROCEEDING]fxols_offhook_proc
Apr 11 19:23:25.087: htsp_timer - 120000 msec
Apr 11 19:23:25.087: regxrule_stack_pop_RegXruleNumInfo: stack=0x814ECA60; count=2
Apr 11 19:23:25.087: regxrule_stack_push_RegXruleNumInfo: stack=0x814ECA60; count=1
Apr 11 19:23:25.091: regxrule_stack_pop_RegXruleNumInfo: stack=0x814ECA60; count=2
Apr 11 19:23:25.091: regxrule_stack_push_RegXruleNumInfo: stack=0x814ECA60; count=1
Apr 11 19:23:25.099: htsp_pre_connect_disconnect, cdb = 827E7730 cause = 1B

Apr 11 19:23:25.099: htsp_process_event: [0/0, FXOLS_PROCEEDING, E_HTSP_PRE_CONN_DISC]

Вывод дебага во время входящего звонка. Про префиксы я так и не понял. Создал, назначил, а толку 0!

Posted

Ну вот тебе рабочий конфиг:

!
voice-card 0
!
no aaa new-model
ip subnet-zero
ip cef
!
!
no ip bootp server
no ip domain lookup
no ftp-server write-enable
!
!
! Codecs
!
voice class codec 1
codec preference 1 g711ulaw
codec preference 2 g711alaw
!
!
! Voice port configuration.
!
! FXO #0
voice-port 0/0
no non-linear
no vad
no comfort-noise
cptone RU
connection plar 5113
low-dtmf-gain  -31
high-dtmf-gain  3
caller-id enable
!
!
! FXO #1
voice-port 0/1
no non-linear
no vad
no comfort-noise
cptone RU
connection plar 5114
low-dtmf-gain  -31
high-dtmf-gain  3
caller-id enable
!
!
! Pots peer configuration.
!
dial-peer voice 0 pots
destination-pattern 0000T
port 0/0 
digit-strip 4
!
dial-peer voice 1 pots
destination-pattern 0001T
port 0/1
digit-strip 4
!
! 
! Voip peer configuration. 
! 
dial-peer voice 2 voip
huntstop
destination-pattern 511[34]
session target sip-server
session protocol sipv2
voice-class codec 1
no vad
dtmf-relay rtp-nte
fax protocol pass-through g711ulaw
!
!
! SIP
!
sip-ua
retry invite 3
retry bye 3
retry cancel 3
retry register 10
timers register 150
sip-server ipv4:zzz.zzz.zzz.zzz:5060
!

  • 4 weeks later...
Posted

Поторопился я немного. Есть проблемка. Иногда циска не отключает линию после звонка. Т.Е. городская атс думает, что снята трубка после звонка и не положена на место. Чтобы линия заработала, надо либо циску перегрузить, либо линию физически вытащить из порта и потом назад вернуть. Чтобы покрутить такого чтобы пофиксить это? конфиг мой выше на пару постов.

Posted

иногда помогает подкручивание cp tone

voice class custom-cptone GTS
dualtone disconnect
 frequency 425
 cadence 400 400

voice-port 1/0
supervisory disconnect dualtone mid-call
supervisory custom-cptone GTS

Posted (edited)

Поторопился я немного. Есть проблемка. Иногда циска не отключает линию после звонка. Т.Е. городская атс думает, что снята трубка после звонка и не положена на место. Чтобы линия заработала, надо либо циску перегрузить, либо линию физически вытащить из порта и потом назад вернуть. Чтобы покрутить такого чтобы пофиксить это? конфиг мой выше на пару постов.

Об этом смотри здесь.

 

Помогает всегда.

Edited by Deac
  • 3 years later...
Posted (edited)

У меня такая же проблема в город (FXO) можно звонить, из города нет.

У меня такое устройство:

cisco-2fxo#show version
Cisco Internetwork Operating System Software
IOS (tm) C1700 Software (C1700-IPVOICE-M), Version 12.3(23), RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by cisco Systems, Inc.
Compiled Tue 24-Jul-07 14:47 by stshen
Image text-base: 0x8000816C, data-base: 0x81455D6C

ROM: System Bootstrap, Version 12.2(4r)XL, RELEASE SOFTWARE (fc1)

cisco-2fxo uptime is 15 minutes
System returned to ROM by reload at 12:05:11 Moscow Wed May 27 2015
System restarted at 12:07:15 Moscow Wed May 27 2015
System image file is "flash:c1700-ipvoice-mz.123-23.bin"

cisco 1760 (MPC860P) processor (revision 0x200) with 59225K/6311K bytes of memory.
Processor board ID FOC071218L4 (1906716500), with hardware revision BB67
MPC860P processor: part number 5, mask 2
Bridging software.
X.25 software, Version 3.0.0.
1 Ethernet/IEEE 802.3 interface(s)
1 FastEthernet/IEEE 802.3 interface(s)
2 Voice FXO interface(s)
32K bytes of non-volatile configuration memory.
32768K bytes of processor board System flash (Read/Write)

Configuration register is 0x2102

cisco-2fxo#

 

Также после прочтения этой ветки форума переделал свой конфиг на следующий:

cisco-2fxo#show running-config
Building configuration...

Current configuration : 2141 bytes
!
! No configuration change since last restart
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname cisco-2fxo
!
boot-start-marker
boot system flash:c1700-ipvoice-mz.123-23.bin
boot system flash:c1700-sv3y-mz.123-26.bin
boot-end-marker
!
enable secret 5 $1$G2kC$.k32309gSDYcDmcwRXZYh.
!
clock timezone Moscow 3
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
voice-card 1
!
no aaa new-model
ip subnet-zero
ip cef
!
voice service pots
!
voice service voip
sip
!
voice class codec 1
codec preference 1 g729r8
codec preference 2 g711alaw
codec preference 3 g711ulaw
!
voice class codec 2
codec preference 1 g711ulaw
codec preference 2 g711alaw
codec preference 3 g729r8
!
interface Ethernet0/0
no ip address
shutdown
half-duplex
!
interface FastEthernet0/0
ip address dhcp hostname cisco-2fxo
speed auto
!
ip classless
no ip http server
!
voice-port 1/0
supervisory disconnect dualtone mid-call
no non-linear
no vad
no comfort-noise
cptone RU
connection plar 551
impedance complex1
description tel 53-09-31
station-id name 53-09-31
caller-id enable
!
voice-port 1/1
supervisory disconnect dualtone mid-call
input gain 6
output attenuation 0
no comfort-noise
cptone RU
timeouts initial 30
timeouts call-disconnect 3
timeouts wait-release 10
connection plar 552
impedance complex1
description tel 53-93-00
station-id name 53-93-00
!
dial-peer voice 1 pots
description tel 53-09-31
destination-pattern 703......
port 1/0
forward-digits 6
!
dial-peer voice 2 pots
description tel 53-93-00
destination-pattern 704......
port 1/1
forward-digits 6
!
dial-peer voice 10 voip
description all
destination-pattern 55[12]
voice-class codec 2
session protocol sipv2
session target sip-server
session transport udp
dtmf-relay rtp-nte
no vad
!
sip-ua
sip-server ipv4:192.168.51.13:5060
!
!
line con 0
line aux 0
line vty 0 4
password 12345
login
!
ntp clock-period 17208540
ntp server 195.2.64.6
ntp server 192.168.51.1
end

cisco-2fxo#

 

Астериск имеет следующий конфиг

[703]
type=friend
host=192.168.51.14
qualify=yes
qualifyfreq=10
disallow=all
allow=ulaw
allow=alaw
context=main
;port=5060
nat=no
insecury=port,invite

[704]
type=peer
host=192.168.51.14
qualify=yes
qualifyfreq=10
disallow=all
allow=ulaw
allow=alaw
context=main
nat=no
insecury=port,invite

 

Звоню в город по следующему экстеншену

exten => _XXXXXX,1,Dial(SIP/192.168.51.14/703${EXTEN},60)
exten => _XXXXXX,n,HangUp()

 

Проблема в следующем:

При звонке на FXO из города идет два гудка и занято.

Звонки в город проходят нормально.

 

Думаю второй день где накосячил?

Edited by lockdoc
Posted

lockdoc

А что в логах астериска?

Вызов вообще в * отправляется, а то вдруг он отвечает 603 Decline, поснифать обмен между кошкой и * tcpdumpом во время входящего вызова на FXO.

Как обрабатываются номера 55[12] на *?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...
На сайте используются файлы cookie и сервисы аналитики для корректной работы форума и улучшения качества обслуживания. Продолжая использовать сайт, вы соглашаетесь с использованием файлов cookie и с Политикой конфиденциальности.