Задать вопрос
gadzhi15
@gadzhi15

Asterisk 13 + Addpac. Почему не работает один из GSM каналов?

Добрый вечер всем.

Имеется Asterisk + Addpac GS-1002 в локальной сети. В слот 1 на Addpac поставлен мегафон, в слот 2 билайн.
С билайном проблем нет, входящие и исходящие работают исправно. С мегафоном беда. Не работает ни то, ни другое. Идут гудки, но звонок в Asterisk не падает.

sip.conf
[general]
trustrpid=yes
tcpenable=yes
useragent=D-link ; типа реальное железо. чтобы меньше привлекать внимание хацкеров которые ищут астериски
externip=192.168.5.100
localnet=192.168.5.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=5182



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


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

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

[my_sip_user](!)
type=friend                   ; входящие и исходящие
Call-limit=2                  ; лимит количества одновременных звонков
host=dynamic                  ; обязательная регистрация
nat=force_rport,comedia       ; используется ли натирование адресов?
canreinvite=no                ; разрешает (yes) или запрещает (no) установку прямого соединения между участниками (минуя Asterisk).
directmedia=no                ; гнать трафик напрямую
dtmfmode=auto
disallow=all                  ; запретить все кодеки
;allow=alaw
;allow=ulaw
;allow=gsm                     ; разрешить нужные
;allow=g729
;allow=g723
port=5182
insecure=invite,port
context=_sip                  ; Контекст плана набора в extensions.conf, в который изначально попадают звонки с GSM-линий
transfer=yes
;transport=tcp                             ; В него включен основной контекст _sip для всего SIP-направления.


При sip show оба пира register

Конфиг Addpac

!
! APOS(tm) configuration saved from vty
!  2016/11/06 19:41:52
!
version 8.51.011
!
hostname GS1002
!
username *****
!
!
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.5.110 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
!
ip route 0.0.0.0 0.0.0.0 192.168.5.254
!
!
!
!
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 79298835533
 ring detect-timeout 70
 dial-tone-generate
 caller-id enable
 caller-id type etsi
!
!
! GSM
voice-port 0/1
 connection plar 79640095533
 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 79298835533
 user-password ****
 translate-outgoing called-number 0
 diversion 1
!
dial-peer voice 1 pots
 destination-pattern 01T
 port 0/1
 call-waiting
 user-name 79640095533
 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.5.100
 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-secret
 sip-server 192.168.5.100 5182 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
!


В чем ошибка?
  • Вопрос задан
  • 940 просмотров
Подписаться 1 Оценить Комментировать
Решения вопроса 1
включать дебаг на шлюзе всего и вся и смотреть
Ответ написан
Пригласить эксперта
Ответы на вопрос 2
@awsswa59
Не пробовали поиском пользоваться ?
awsswa.livejournal.com/22887.html
Ответ написан
gadzhi15
@gadzhi15 Автор вопроса
Дебаг на Addpac

Received SIP PDU from ( 192.168.5.100:5182 )
OPTIONS sip:79298835533@192.168.5.110 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.100:5182;branch=z9hG4bK38acdae6
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.5.100:5182>;tag=as73d493c2
To: <sip:79298835533@192.168.5.110>
Contact: <sip:asterisk@192.168.5.100:5182>
Call-ID: 0cab9ef20d2b01d46b1eeae901b25c94@192.168.5.100:5182
CSeq: 102 OPTIONS
User-Agent: D-link
Date: Wed, 09 Nov 2016 22:39:18 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0



        Sending SIP PDU to ( 192.168.5.100:5182 ) from 5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.100:5182;branch=z9hG4bK38acdae6
From: "asterisk" <sip:asterisk@192.168.5.100:5182>;tag=as73d493c2
To: <sip:79298835533@192.168.5.110>
Call-ID: 0cab9ef20d2b01d46b1eeae901b25c94@192.168.5.100:5182
CSeq: 102 OPTIONS
User-Agent: AddPac SIP Gateway
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REFER, NOTIFY
Content-Length: 0


        Received SIP PDU from ( 192.168.5.100:5182 )
OPTIONS sip:79640095533@192.168.5.110 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.100:5182;branch=z9hG4bK39ee3f91
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.5.100:5182>;tag=as61c3b219
To: <sip:79640095533@192.168.5.110>
Contact: <sip:asterisk@192.168.5.100:5182>
Call-ID: 5fcfbaef466b8f0c55781c4f095366c7@192.168.5.100:5182
CSeq: 102 OPTIONS
User-Agent: D-link
Date: Wed, 09 Nov 2016 22:39:18 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0



        Sending SIP PDU to ( 192.168.5.100:5182 ) from 5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.100:5182;branch=z9hG4bK39ee3f91
From: "asterisk" <sip:asterisk@192.168.5.100:5182>;tag=as61c3b219
To: <sip:79640095533@192.168.5.110>
Call-ID: 5fcfbaef466b8f0c55781c4f095366c7@192.168.5.100:5182
CSeq: 102 OPTIONS
User-Agent: AddPac SIP Gateway
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REFER, NOTIFY
Content-Length: 0
�


Вот дебаг со второй симки которая работает
135     <CEP    000100> : Call Received
136     <CEP    000100> : Call Received
137     <CEP    000100> : Call Initiated : calledNumber() crv(0) total(0)
138     <Call   179>    : ******  Call Created status(InitiatedByMobile) ver(8.5
139     <CEP    000100> : Decode CID : FFFFFF80  E 10  C 2B 37 39 36 37 39 33 32
140     <CEP    000100> : Mobile CID : time() callingNumber(79679328252) calling
141     <CEP    000100> : Calling number(79679328252)
142     <CEP    000100> : Call id(ecb02358-e738-ab8a-8143-0002a409fd2e) callNum(
143     <Call   179>    : MatchAllProcess After Sorted
                          <0>  id(2000) dest(T) prefer(0) selected(71)
144     <Call   179>    : Initiate callee with dial-peer(T) status(CalleeDetermi
145     <NetEP  179>    : InitiateOutCall: calledNum(79640095533) callingNum(796
146     <NetEP  179>    : DoCall: calledAddr(sip:79640095533@192.168.5.100:5182)
147     <SIP    179>    : SetLocalAudioFormats : outbound(TRUE) hqaEnable(FALSE)
148     <SIP    179>    : SetLocalAudioFormats : myVoipPeer(2000) is not NULL, v
149     <SIP    179>    : SetLocalAudioFormats : outbound(TRUE) hqaEnable(FALSE)
150     <SIP    179>    : SetLocalAudioFormats : myVoipPeer(2000) is not NULL, v
151     <SIP    0>      : No authentication information available
152     <SIP    179>    : Send INVITE Request

        Sending SIP PDU to ( 192.168.5.100:5182 ) from 5060
INVITE sip:79640095533@192.168.5.100:5182 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.110:5060;branch=z9hG4bKec58d244a4112
From: <sip:79640095533@192.168.5.100>;tag=ec58d244a4
To: <sip:79640095533@192.168.5.100:5182>
Call-ID: ecb02358-9066-d215-8144-0002a409fd2e@192.168.5.110
CSeq: 112 INVITE
Supported: replaces, timer, 100rel, early-session
Min-SE: 1800
Date: Wed, 09 Nov 2016 23:27:40 GMT
Session-Expires: 1800
User-Agent: AddPac SIP Gateway
Contact: <sip:79640095533@192.168.5.110>
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, PRACK, REFER, NOTIFY, INFO
Content-Type: application/sdp
Content-Length: 290
Max-Forwards: 70
Remote-Party-ID: <sip:79679328252@192.168.5.100>;screen=yes;party=calling

v=0
o=79640095533 1478734060 1478734060 IN IP4 192.168.5.110
s=AddPac Gateway SDP
c=IN IP4 192.168.5.110
t=1478734060 0
m=audio 23358 RTP/AVP 8 0 18 101
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

        Received SIP PDU from ( 192.168.5.100:5182 )
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.5.110:5060;branch=z9hG4bKec58d244a4112;received=192.168
From: <sip:79640095533@192.168.5.100>;tag=ec58d244a4
To: <sip:79640095533@192.168.5.100:5182>
Call-ID: ecb02358-9066-d215-8144-0002a409fd2e@192.168.5.110
CSeq: 112 INVITE
Server: D-link
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:79640095533@192.168.5.100:5182>
Content-Length: 0


153     <SIP    179>    : Receive 100 Trying
154     <SIP    179>    : Transaction (112 INVITE) proceeding

        Received SIP PDU from ( 192.168.5.100:5182 )
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.5.110:5060;branch=z9hG4bKec58d244a4112;received=192.168
From: <sip:79640095533@192.168.5.100>;tag=ec58d244a4
To: <sip:79640095533@192.168.5.100:5182>;tag=as14eba75c
Call-ID: ecb02358-9066-d215-8144-0002a409fd2e@192.168.5.110
CSeq: 112 INVITE
Server: D-link
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:79640095533@192.168.5.100:5182>
Content-Type: application/sdp
Require: timer
Content-Length: 275

v=0
o=root 984719863 984719863 IN IP4 192.168.5.100
s=Asterisk PBX 13.11.2
c=IN IP4 192.168.5.100
t=0 0
m=audio 6240 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

155     <SIP    179>    : Receive 183 Session Progress
156     <SIP    179>    : Transaction (112 INVITE) proceeding
157     <SIP    179>    : Received Session Progress response
158     <SIP    179>    : SetLocalAudioFormats : outbound(TRUE) hqaEnable(FALSE)
159     <SIP    179>    : SetLocalAudioFormats : myVoipPeer(2000) is not NULL, v
160     <SIP    179>    : Get SIP Audio MediaFormat : 8
161     <Call   179>    : PreConnected from(fffffffe)
162     <NetCon 179>    : Alert received (inband tone explicitly).
163     <Call   179>    : Alert from(fffffffe) pseudo(0) inband(1) status(Callee
164     <SIP    178>    : Set Terminated Success for 111 INVITE

        Received SIP PDU from ( 192.168.5.100:5182 )
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.110:5060;branch=z9hG4bKec58d244a4112;received=192.168
From: <sip:79640095533@192.168.5.100>;tag=ec58d244a4
To: <sip:79640095533@192.168.5.100:5182>;tag=as14eba75c
Call-ID: ecb02358-9066-d215-8144-0002a409fd2e@192.168.5.110
CSeq: 112 INVITE
Server: D-link
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:79640095533@192.168.5.100:5182>
Content-Type: application/sdp
Require: timer
Content-Length: 275

v=0
o=root 984719863 984719863 IN IP4 192.168.5.100
s=Asterisk PBX 13.11.2
c=IN IP4 192.168.5.100
t=0 0
m=audio 6240 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

165     <SIP    179>    : Receive 200 OK
166     <SIP    179>    : Received INVITE OK response
167     <SIP    179>    : Send ACK Request

        Sending SIP PDU to ( 192.168.5.100:5182 ) from 5060
ACK sip:79640095533@192.168.5.100:5182 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.110:5060;branch=z9hG4bKec58d244a4112
From: <sip:79640095533@192.168.5.100>;tag=ec58d244a4
To: <sip:79640095533@192.168.5.100:5182>;tag=as14eba75c
Call-ID: ecb02358-9066-d215-8144-0002a409fd2e@192.168.5.110
CSeq: 112 ACK
Content-Length: 0
Max-Forwards: 70

168     <SIP    179>    : SetLocalAudioFormats : outbound(TRUE) hqaEnable(FALSE)
169     <SIP    179>    : SetLocalAudioFormats : myVoipPeer(2000) is not NULL, v
170     <SIP    179>    : Get SIP Audio MediaFormat : 8
171     <Call   179>    : Connected from(fffffffe)
172     <NetEP  179>    : Call with sip:79640095533@192.168.5.100:5182 establish
173     <SIP    179>    : Check Event Relation code(200)
174     <SIP    179>    : Set Terminated Success for 112 INVITE
175     <CEP    000100> : Disconnected(16) at Busy
176     <Call   179>    : Terminated from(100) this(Local:CallClear) before(NULL
177     <CEP    000100> : DisconnectCall at Idle
178     <SIP    179>    : ReleaseWithBYE
179     <SIP    179>    : Send BYE Request
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы