[[+content_image]]
G
G
gadzhi152016-10-17 23:49:28
Asterisk
gadzhi15, 2016-10-17 23:49:28

Asterisk 13 and Addpac. Why doesn't outgoing work?

There is Asterisk 13 and AddPac gs1002. Incoming is working fine, but outgoing is not working.

Using SIP RTP CoS mark 5 -- Executing [[email protected]_sip:1] Goto("SIP/100-00000004", "dial_to_beeline,89679328252,1),NoOP(Исходящий на номер 89679328252 с номера 100") in new stack -- Goto (dial_to_beeline,89679328252,1) -- Executing [[email protected]_to_beeline:1] NoOp("SIP/100-00000004", ""Звоним на билайновский номер 89679328252 с номера 100"") in new stack -- Executing [[email protected]_to_beeline:2] Set("SIP/100-00000004", "CALLERID(number)=79034814792") in new stack -- Executing [[email protected]_to_beeline:3] Dial("SIP/100-00000004", "SIP/79034814792/89679328252,30,m") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/79034814792/89679328252 -- Started music on hold, class 'default', on channel 'SIP/100-00000004' > 0xb6843868 -- Probation passed - setting RTP source address to 192.168.1.6:52890 == Everyone is busy/congested at this time (1:0/0/1) -- Stopped music on hold on SIP/100-00000004 -- Auto fallthrough, channel 'SIP/100-00000004' status is 'CHANUNAVAIL'

Addpack config:
!
! APOS(tm) configuration saved from vty
!  2016/10/17 19:58:47
!
version 8.51.011
!
hostname GS1002
!
username root password ********* administrator
!
!
script ntpdate default
 server ip time.nist.gov
 server ip time.windows.com
!
interface Loopback0
 ip address 127.0.0.1 255.0.0.0
!
interface FastEthernet0/0
 ip address 192.168.1.100 255.255.255.0
 speed auto
 no qos-control
!
interface FastEthernet0/1
 ip address 192.168.10.1 255.255.255.0
 speed auto
 no qos-control
!
!
!
!
http server
!
logging command
logging event 4-warning
logging on
!
!
!
!
! VoIP configuration.
!
!
! Voice service voip configuration.
!
voice service voip
 protocol sip
 dtmf-relay rfc-2833
 fax protocol t38 redundancy 0
 fax rate 9600
 h323 call start fast
 h323 call tunnel enable
 no call-barring unconfigured-ip-address
 no voip-inbound-call-barring enable
!
!
! Voice port configuration.
!
! GSM
voice-port 0/0
 connection plar 7929******
 ring detect-timeout 70
 dial-tone-generate
 caller-id enable
 caller-id type etsi
!
!
! GSM
voice-port 0/1
 connection plar 7903*******
 ring detect-timeout 70
 dial-tone-generate
 caller-id enable
 caller-id type etsi
!
!
! FXO
voice-port 0/2
 no caller-id enable
!
!
! FXO
voice-port 0/3
 no caller-id enable
!
!
!
!
! service port group configuration.
!
!
!
! Pots peer configuration.
!
dial-peer voice 0 pots
 destination-pattern 00T
 port 0/0
 call-waiting
 user-name 7929881*****
 user-password ***********
 translate-outgoing called-number 0
 preference 1
 diversion 1
!
dial-peer voice 1 pots
 destination-pattern 01T
 port 0/1
 call-waiting
 user-name 79034******
 user-password *********
 translate-outgoing called-number 1
 preference 2
 diversion 2
!
!
!
! Voip peer configuration.
!
dial-peer voice 2000 voip
 destination-pattern T
 session target sip-server
 session protocol sip
 voice-class codec 1
 no vad
 dtmf-relay rtp-2833
 description asterisk
!
!
!
dial-peer call-hold h
dial-peer call-transfer h
!
!
!
gatekeeper
!
!
! Gateway configuration.
!
gateway
 h323-id voip.192.168.1.8
 no ignore-msg-from-other-gk
!
!
! Codec classes configuration.
!
voice class codec 0
 codec preference 1 g711alaw
 codec preference 2 g711ulaw
 codec preference 3 g729
!
voice class codec 1
 codec preference 1 g711alaw
 codec preference 2 g711ulaw
 codec preference 3 g729
!
!
!
! Translation Rule configuration.
!
translation-rule 0
 rule 0      007T                     8T
!
translation-rule 1
 rule 0      017T                     8T
!
!
!
! SIP UA configuration.
!
sip-ua
 user-register
 sip-username addpac
 sip-password *********
 sip-server 192.168.1.8 5060 1
 timeout treg 400
 called-party-number to-field
 remote-party-id
 session-refresh update
 register e164
!
!
! Tones
!
!
! SMS delivery configuration
!
sms-delivery
!
!
!
!
voip-interface ip FastEthernet0/0
!
line console
!
line vty
!
mobile dev-restart-by-unreg 180
mobile failed-call-retry 0
mobile ussd inter-frame-gap 100
mobile ussd balance-interval 120
mobile ussd retry-count 2
mobile ussd retry-interval 5
mobile ussd response-protection-time 5
mobile dev-restart-by-unknown-error
mobile cell-monitor 30
!
mobile 0/0
 gsm sms-language utf8
!
mobile 0/1
 gsm sms-language utf8
!

sip.conf
[general]
trustrpid=yes
tcpenable=yes
useragent=D-link ; типа реальное железо. чтобы меньше привлекать внимание хацкеров которые ищут астериски
;externip=176.122.61.94
localnet=192.168.1.0/24
qualify=yes               ; проверка доступности абонента - 2s - если больше, что считаем что недоступен
prematuremedia = no
progressinband = never
srvlookup=no
canreinvite=no              ; разрешает (yes) или запрещает (no) установку прямого соединения(минуя Asterisk).
directmedia=no              ; гнать трафик напрямую
allowguest = no             ; запрет регистрации "левых" аккунтов
transfer=yes                ; запрет трансфера вызовов глобально, включать вручную для нужных пиров
allowsubscribe=no           ; отказ от использования voicemail и соответствующего спама в консоли
alwaysauthreject=yes        ; на REGISTER Asterisk станет отвечать «401 Unathorized»
jbenable = yes              ; Enables the use of a jitterbuffer on the receiving side of a SIP
jbforce = no                ; Forces the use of a jitterbuffer on the receive side of a SIP
jbmaxsize=300
jbimpl = adaptive           ; Jitterbuffer implementation, used on the receiving side of a SIP
jbresyncthreshold=100       ;adaptive jbimpl had troubles without thresh... Asterisk 1.6.2.9.
;jblog = yes                ; Enables jitterbuffer frame logging. Defaults to "no".
context=default             ; всех левых в дефротный контекст на отбой
relaxdtmf=yes
dtmfmode=auto
disallow=all
;allow=g729
;allow=g723
allow=alaw
allow=ulaw
allow=gsm
bindport=5060


[addpac_channels](!)            ; шаблон дублирующихся настроек для каналов шлюза
host=dynamic
;deny=0.0.0.0/0
permit=192.168.1.100
fromdomain=192.168.1.100
type=friend
context=from_trunk                ; входящие с SIP попадают в этот контекст в extensions.conf
qualify=yes
nat=force_rport,comedia
canreinvite=no
insecure=port,invite            ; игнорировать порт и инвайт
disallow=all
allow=alaw
allow=ulaw
allow=gsm
maxcallbitrate=64
dtmfmode=rfc2833
port=5060
;directmedia=no



[7903********](addpac_channels)
defaultuser=********
secret=********
call-limit=2
callerid=79034********
relaxdtmf=yes

[79298********](addpac_channels)
defaultuser=********
secret=********
call-limit=1
callerid=********
relaxdtmf=yes

extensions.conf
]
[general]
static=yes
writeprotect=yes
autofallthrough=yes             ; завершить вызов после всех команд екстеншена
clearglobalvars=no
;priorityjumping=no

[_sip]
exten => _+7.,1,Goto(_sip,${EXTEN:1:11},1) ; обрезание плюса в начале номера
exten => _[7,8]9XXXXXXXXX,1,Goto(dial_to_beeline,${EXTEN},1),NoOP(Исходящий на номер ${EXTEN} с номера ${CALLERID(num)})

[dial_to_beeline] ; контекст исходящих звонков на билайн
exten => _[7,8]9.,1,NoOP("Звоним на билайновский номер ${EXTEN} с номера ${CALLERID(num)}")
same => n,Set(CALLERID(number)=790348****)
same => n,Dial(SIP/7903481****/${EXTEN},30,m)

debug addpac
: ****** Call Created status(InitiatedByNet) ver(8.51:2011-02-06-00-00) time(1476739401) ****
2 : Receive INVITE Request
3 : Found inbound voip peer(2000) result(2) peer->fixedPatternSize(0) mostMatchingSize(-1)
4 : Found inbound voip peer by dest-pattern id(2000)
5 : From Net - calledParty(79679328252) callingParty(79034814792)
6 : Unmatched
7 : Terminated from(fffffff7) this(Local:InvalidNumber) before(NULL) forced(0) time(1476739401)
8 : Call FROM <79034814792> terminated reason(Local:InvalidNumber)
9 : Receive ACK Request
10 : Set Terminated Success for 102 INVITE

What could be the problem?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
G
gadzhi15, 2016-10-18
@gadzhi15

Understood. In the dialplan Dial(SIP/7903481****/017${EXTEN:1:10},30,m)
Specify 017, as 017T was specified in the addpac settings in the translation rules

S
silverjoe, 2016-10-18
@silverjoe

Judging by Aster's logs, when he calls, he receives
You would also look at sip debug to be sure.
Does addpac have logs at the time of the call?
You have a limitation of 2 or 1 channel on the gsm modem - can it work?
if yes, then in the dialplan it is necessary to resolve with the help of GROUP.

V
Viktor, 2016-10-18
@awsswa59

www.awsswa.livejournal.com/22887.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question