SIP.conf
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
port=5060
bindaddr=0.0.0.0
defaultexpiry=3600
allowguest=no
alwaysauthreject=yes<-->;
t38pt_udptl=yes,redundancy,maxdatagram=400.
faxdetect=yes
echocancel=yes
tcpenable=yes
allow=all
faxdetect=no
srvlookup=no
register=tcp://79223166313@multifon.ru:password:79223166313@sbc.megafon.ru:5060/79223166313
[multifon-out]
dtmfmode=inband
username=79223166313
type=peer
secret=password
host=sbc.megafon.ru
fromuser=79223166313
fromdomain=multifon.ru
port=5060
nat=yes
context=MULTIFON_IN_
insecure=port,invite
qualify=yes
transport=tcp
[305]
secret=123
context=MULTI_
bindaddr=0.0.0.0
defaultexpiry=3600
allowguest=no
alwaysauthreject=yes<-->;
t38pt_udptl=yes,redundancy,maxdatagram=400.
faxdetect=yes
echocancel=yes
tcpenable=yes
allow=all
faxdetect=no
srvlookup=no
register=tcp://79223166313@multifon.ru:password:79223166313@sbc.megafon.ru:5060/79223166313
[multifon-out]
dtmfmode=inband
username=79223166313
type=peer
secret=password
host=sbc.megafon.ru
fromuser=79223166313
fromdomain=multifon.ru
port=5060
nat=yes
context=MULTIFON_IN_
insecure=port,invite
qualify=yes
transport=tcp
[305]
secret=123
context=MULTI_
Extensions.conf
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[MULTI_]
include => MULTIFON_IN_
include => MULTIFON_OUT_
[MULTIFON_IN_]
exten => 79223166313,1,Verbose(1, ====== -> Number ${CDR(src)} calling to us ===== )
exten => 79223166313,1,Dial(SIP/305,60,rt)
[MULTIFON_OUT_]
exten=>_8XXXXXXXXXX,1,Dial(SIP/${EXTEN}@multifon-out,30,r)
include => MULTIFON_IN_
include => MULTIFON_OUT_
[MULTIFON_IN_]
exten => 79223166313,1,Verbose(1, ====== -> Number ${CDR(src)} calling to us ===== )
exten => 79223166313,1,Dial(SIP/305,60,rt)
[MULTIFON_OUT_]
exten=>_8XXXXXXXXXX,1,Dial(SIP/${EXTEN}@multifon-out,30,r)
sip set debug ip sbc.megafon.ru
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
Reliably Transmitting (NAT) to 193.201.229.35:5060:
OPTIONS sip:sbc.megafon.ru SIP/2.0
Via: SIP/2.0/TCP 188.161.136.70:5060;branch=z9hG4bK07913894;rport
Max-Forwards: 70
From: "Unknown" <sip:79223166313@188.161.136.70>;tag=as3017cefe
To: <sip:sbc.megafon.ru>
Contact: <sip:79223166313@188.161.136.70:5060;transport=TCP>
Call-ID: 1284b77f022f0d057cc41a5b6363342e@188.161.136.70:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.31.0
Date: Thu, 05 Feb 2015 07:29:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from TCP:193.201.229.35:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/TCP 188.161.136.70:5060;received=188.161.136.70;branch=z9hG4bK07913894;rport=48817
From: "Unknown" <sip:79223166313@multifon.ru>;tag=as3017cefe
To: <sip:multifon.ru>;tag=aprqngfrt-lcctdi00000c6
Call-ID: 1284b77f022f0d057cc41a5b6363342e@188.161.136.70:5060
CSeq: 102 OPTIONS
Reason: Q.850;cause=55;text="Call Terminated"
Content-Length: 0
OPTIONS sip:sbc.megafon.ru SIP/2.0
Via: SIP/2.0/TCP 188.161.136.70:5060;branch=z9hG4bK07913894;rport
Max-Forwards: 70
From: "Unknown" <sip:79223166313@188.161.136.70>;tag=as3017cefe
To: <sip:sbc.megafon.ru>
Contact: <sip:79223166313@188.161.136.70:5060;transport=TCP>
Call-ID: 1284b77f022f0d057cc41a5b6363342e@188.161.136.70:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.31.0
Date: Thu, 05 Feb 2015 07:29:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from TCP:193.201.229.35:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/TCP 188.161.136.70:5060;received=188.161.136.70;branch=z9hG4bK07913894;rport=48817
From: "Unknown" <sip:79223166313@multifon.ru>;tag=as3017cefe
To: <sip:multifon.ru>;tag=aprqngfrt-lcctdi00000c6
Call-ID: 1284b77f022f0d057cc41a5b6363342e@188.161.136.70:5060
CSeq: 102 OPTIONS
Reason: Q.850;cause=55;text="Call Terminated"
Content-Length: 0
Пробовал поставить Zoiper на компьютере - входящие/исходящие проходят нормально.
Еще я не понял одну вещь.
В настройках zoiper я указывал только логин (79223166313), пароль и хост multifon.ru.
Адрес sbc.megafon.ru там вообще не используется. Почему тогда для астериска нужна такая длинная строка регистрации.
Почему например не написать просто register=79223166313:password@multifon.ru/79223166313