Перейти к содержимому
Калькуляторы

Астериск->Cisco->PSTN. Проблема с воспроизведением сообщения абоненту

Здравствуйте. Имеем Asterisk 13.22.0 (FreePBX 14) в качестве АТС, Cisco2911 с модулями FXO в качестве шлюза в городскую телефонную сеть. Исходящая маршрутизация настроена, звонки ходят. 

Поставлена задача проигрывать вызываемым абонентам сообщения о записи звонков. Реализована как добавление опции A(custom/DialogIsRecorded) к транку.

Проблема в том что проигрывание записи начинается после соединения Астериска с циской, а не с абонентом. В результате абонент в лучшем случае слышит часть проигрываемой фразы, в худшем (если поднял трубку совсем не сразу) - вообще ничего.

Мне кажется что ситуация выглядит примерно так: при исходящем звонке Астериск соединяется по протоколу SIP с циской, циска дает в ответ статус SIP 200 OK, и Астериск считает что соединение установлено и начинает проигрывать сообщение. Но Циска в этот момент только начинает набирать номер абонента, поэтому сообщение уходит в пустоту.

Как заставить Астериск проигрывать сообщение после поднятия трубки вызываемым абонентом?

 

sip.conf

[general]
accept_outofcall_message=yes
auth_message_requests=no
outofcall_message_context=dpma_message_context
faxdetect=no
vmexten=*97
useragent=FPBX-14.0.5.25(13.22.0)
language=ru
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=g726
allow=g722
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
limitonpeers=yes
progressinband=yes
prematuremedia=no
rtpend=20000
context=from-sip-external
callerid=Unknown
rtpstart=10000
tcpenable=no
callevents=yes
bindport=5060
jbenable=no
checkmwi=10
maxexpiry=3600
minexpiry=60
srvlookup=no
tlsenable=no
allowguest=yes
notifyhold=yes
rtptimeout=30
canreinvite=no
tlsbindaddr=[::]:5061
rtpkeepalive=0
videosupport=no
defaultexpiry=120
notifyringing=yes
maxcallbitrate=384
rtpholdtimeout=300
g726nonstandard=no
registertimeout=20
tlsclientmethod=tlsv1
registerattempts=0
nat=force_rport,comedia
ALLOW_SIP_ANON=no
tlscafile=/etc/pki/tls/certs/ca-bundle.crt
accept_outofcall_message=yes
auth_message_requests=no
outofcall_message_context=dpma_message_context

 

;настройки транка

[uru-gw1]
disallow=all
host=192.168.0.1
port=5060
type=friend
language=ru
allow=ulaw
allow=alaw
qualify=yes
dtmfmode=rfc2833
context=from-trunk
insecure=port,invite
nat=no

 

sh run

!
! Last configuration change at 23:03:08 VLG Tue Mar 12 2019
!
version 15.4
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
no service password-encryption
!
hostname uru-gw1
!
boot-start-marker
boot system flash0:c2900-universalk9-mz.SPA.154-3.M7.bin
boot-end-marker
!
!
logging rate-limit all 10 except errors
no logging console
!
aaa new-model
!
!
!
!
!
voice-card 0
!
!
voice call send-alert
voice call disc-pi-off
!
voice service voip
 ip address trusted list
  ipv4 192.168.0.0 255.255.0.0
 allow-connections sip to sip
 fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback none
 sip
!
!
!
!
!
!
voice translation-rule 1
 rule 1 /^\(.*\)/ /19\1/
!
voice translation-rule 2
 rule 1 /^\(.*\)/ /29\1/
!
voice translation-rule 3
 rule 1 /^\(.*\)/ /39\1/
!
voice translation-rule 4
 rule 1 /^\(.*\)/ /49\1/
!
voice translation-rule 5
 rule 1 /^\(.*\)/ /59\1/
!
voice translation-rule 6
 rule 1 /^\(.*\)/ /69\1/
!
voice translation-rule 7
 rule 1 /^\(.*\)/ /79\1/
!
voice translation-rule 100
 rule 1 /^..\(.*\)/ /\1/
!
!
voice translation-profile TP41640
 translate called 5
!
voice translation-profile TP42914
 translate called 2
!
voice translation-profile TP42920
 translate called 4
!
voice translation-profile TP42963
 translate called 7
!
voice translation-profile TP42974
 translate called 3
!
voice translation-profile TP42982
 translate called 1
!
voice translation-profile TP45713
 translate called 6
!
voice translation-profile TP_StripTwoDigit
 translate called 100
!
!
control-plane
!
!
voice-port 0/0/0
 no battery-reversal
 no non-linear
 no vad
 no comfort-noise
 cptone RU
 timeouts interdigit 2
 connection plar 000042982
 description from_fxo
 caller-id enable
!
voice-port 0/0/1
 no battery-reversal
 no non-linear
 no vad
 no comfort-noise
 cptone RU
 connection plar 000042914
 description from_fxo
 caller-id enable
!
voice-port 0/0/2
 no battery-reversal
 no non-linear
 no vad
 no comfort-noise
 cptone RU
 connection plar 000042974
 description from_fxo
 caller-id enable
!
voice-port 0/0/3
 no battery-reversal
 no non-linear
 no vad
 no comfort-noise
 cptone RU
 connection plar 000042920
 description from_fxo
 caller-id enable
!
voice-port 0/1/0
 no battery-reversal
 no non-linear
 no vad
 no comfort-noise
 cptone RU
 connection plar 000041640
 description from_fxo
 caller-id enable
!
voice-port 0/1/1
 no battery-reversal
 no non-linear
 no vad
 no comfort-noise
 cptone RU
 connection plar 000045713
 description from_fxo
 caller-id enable
!
voice-port 0/1/2
 no battery-reversal
 no non-linear
 no vad
 no comfort-noise
 cptone RU
 connection plar 000042963
 description from_fxo
 caller-id enable
!
voice-port 0/1/3
 no battery-reversal
 no non-linear
 no vad
 no comfort-noise
 cptone RU
 connection plar 000045713
 description from_fxo
 caller-id enable
 !
 !
 !
 !
!
mgcp behavior rsip-range tgcp-only
mgcp behavior comedia-role none
mgcp behavior comedia-check-media-src disable
mgcp behavior comedia-sdp-force disable
!
mgcp profile default
!
!
!
!
dial-peer voice 1 voip
 tone ringback alert-no-PI
 description to_asterisk
 huntstop
 preference 2
 destination-pattern 0000.....
 session protocol sipv2
 session target sip-server
 session transport udp
 voice-class sip early-offer forced
 no voice-class sip send 180 sdp
 dtmf-relay rtp-nte
 codec g711ulaw
!
dial-peer voice 42982 pots
 description to_fxo_42982
 translation-profile outgoing TP_StripTwoDigit
 destination-pattern 19T
 port 0/0/0
 forward-digits all
!
dial-peer voice 42914 pots
 description to_fxo_42914
 translation-profile outgoing TP_StripTwoDigit
 destination-pattern 29T
 port 0/0/1
 forward-digits all
!
dial-peer voice 2 voip
 description For out to 42982
 translation-profile incoming TP42982
 answer-address [78]8444242982
 codec g711ulaw
 ip qos dscp cs3 signaling
!
dial-peer voice 3 voip
 description from_asterisk_to_42914
 translation-profile incoming TP42914
 answer-address [78]8444242914
 codec g711ulaw
 ip qos dscp cs3 signaling
!
dial-peer voice 4 voip
 description from_asterisk_to_42974
 translation-profile incoming TP42974
 answer-address [78]8444242974
 codec g711ulaw
 ip qos dscp cs3 signaling
!
dial-peer voice 42974 pots
 description to_fxo_42974
 translation-profile outgoing TP_StripTwoDigit
 destination-pattern 39T
 port 0/0/2
 forward-digits all
!
dial-peer voice 5 voip
 description For out to 42920
 translation-profile incoming TP42920
 answer-address [78]8444242920
 codec g711ulaw
 ip qos dscp cs3 signaling
!
dial-peer voice 42920 pots
 description to_fxo_42920
 translation-profile outgoing TP_StripTwoDigit
 destination-pattern 49T
 port 0/0/3
 forward-digits all
!
dial-peer voice 6 voip
 description For out to 41640
 translation-profile incoming TP41640
 answer-address [78]8444241640
 codec g711ulaw
 ip qos dscp cs3 signaling
!
dial-peer voice 41640 pots
 description to_fxo_41640
 translation-profile outgoing TP_StripTwoDigit
 destination-pattern 59T
 port 0/1/0
 forward-digits all
!
dial-peer voice 7 voip
 description For out to 45713
 translation-profile incoming TP45713
 answer-address [78]8444245713
 codec g711ulaw
 ip qos dscp cs3 signaling
!
dial-peer voice 45713 pots
 description to_fxo_45713
 translation-profile outgoing TP_StripTwoDigit
 destination-pattern 69T
 port 0/1/1
 forward-digits all
!
dial-peer voice 8 voip
 description For out to 42963
 translation-profile incoming TP42963
 answer-address [78]8444242963
 codec g711ulaw
 ip qos dscp cs3 signaling
!
dial-peer voice 42963 pots
 description to_fxo_42963
 translation-profile outgoing TP_StripTwoDigit
 destination-pattern 79T
 port 0/1/2
 forward-digits all
!
!
sip-ua 
 disable-early-media 180
 retry invite 3
 retry response 3
 retry bye 3
 retry cancel 3
 retry register 10
 timers trying 1000
 timers register 150
 registrar ipv4:192.168.0.7 expires 65535
 sip-server ipv4:192.168.0.7:5060
!
 

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Надо настроить answer connect - это обычно для биллинга настраивается и коннект отдается только тогда когда абонент действительно поднял трубу и сказал алло.
На самом деле это нетривиальная задача в аналоговых сетях и все зависит от шлюза.
Напрмер это умеют делать аналоговуе  Аддпаки, квинтумы, аудиокодесы.
А вот насчет аналоговой циске - не уверен, возможно что она так не умеет вообще..
Имхо, надо попробовать другой шлюз из выше перечисленных..

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Join the conversation

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

Гость
Ответить в тему...

×   Вставлено в виде отформатированного текста.   Вставить в виде обычного текста

  Разрешено не более 75 смайлов.

×   Ваша ссылка была автоматически встроена.   Отобразить как ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.