AddPac GS 1002. Две симкарты: мегафон и билайн. Подключен к астериску. В настройка диалплана в исходящих, в зависимости от номера клиента, звонок должен идти с мегафона (если у клиента мегафоновский номер) и с билайна (если у клиента номер билайн). Но все происходит наоборот: если номер билайновский у клиента, то звонок идет с мегафона.
Код:
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.11.231 255.255.0.0
ip nat outside
speed auto
no qos-control
!
interface FastEthernet0/1
no ip address
ip nat outside
shutdown
speed auto
no qos-control
!
ip route 0.0.0.0 0.0.0.0 192.168.11.221
!
!
!
!
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 7928....................
ring detect-timeout 70
dial-tone-generate
caller-id enable
caller-id type etsi
!
!
! GSM
voice-port 0/1
connection plar 7964..............
ring detect-timeout 70
dial-tone-generate
caller-id enable
caller-id type etsi
!
!
!
!
! service port group configuration.
!
!
!
! Pots peer configuration.
!
dial-peer voice 0 pots
destination-pattern 00T
port 0/0
call-waiting
user-name 79285610070
user-password sip-secret
translate-outgoing called-number 0
!
dial-peer voice 1 pots
destination-pattern 01T
port 0/1
call-waiting
user-name 79640070707
user-password sip-secret2
translate-outgoing called-number 1
preference 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.11.221
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.11.221 5060 1
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 300
mobile dev-restart-by-unknown-error
mobile cell-monitor 30
!
mobile 0/0
gsm sms-language utf8
!
mobile 0/1
gsm sms-language utf8
!
Конфиг исходящих Asterisk
Код:
[dial_to_megafon] ; контекст исходящих звонков на мегафон
exten => _[7,8]92.,1,NoOP("Звоним на мегафоновский номер ${EXTEN} с номера ${CALLERID(num)}")
exten => _[7,8]92.,n,Dial(SIP/79285610070/007${EXTEN:1:10},30,mtT)
[dial_to_beeline] ; контекст исходящих звонков на билайн
exten => _[7,8]96.,1,NoOP("Звоним на билайновский номер ${EXTEN} с номера ${CALLERID(num)}")
exten => _[7,8]96.,n,Dial(SIP/79640070707/017${EXTEN:1:10},30,mtT)
в чем проблема?