настройка pjsip нет звука
Добавлено: 13 мар 2017, 14:41
Добрый день.
Есть freebsd 11 и asterisk 13
Собран по следующими параметрами.
В modules.conf добавлено
Настраивал по этой
https://wiki.asterisk.org/wiki/display/ ... hrough+NAT
и этой https://asterisk-pbx.ru/wiki/asterisk/res_pjsip_nat
инструкции.
В pjsip.conf
В extensions.conf
В общем.
Совершаю звонок между 115 и 133 звук есть.
Когда тестирую конференцию звука нет. Просто тишина
Когда добавляю Макрос в диаплане звука нет при звонке.
Когда убираю макрос из диаплана и добавляю в секцию [endpoint-basic](!) в файле pjsip.conf direct_media=no
То звука тоже нет.
Почему-то звук не проходи
При звонке на конференцию
На chan_sip.so проверил. Всё нормально работает. Звук есть. Звоник пишутся. Конференция работает.
Прошу помощи в настроике. Незнаю куда копать.
Есть freebsd 11 и asterisk 13
Собран по следующими параметрами.
Код: Выделить всё
┌──────────────────────────── asterisk13-13.14.0 ──────────────────────────────┐
│ ┌──────────────────────────────────────────────────────────────────────────┐ │
│ │ [x] ASTVERSION Install astversion (requires bash) │ │
│ │ [x] BACKTRACE Stack backtrace support via (lib)execinfo │ │
│ │ [x] CURL Data transfer support via cURL │ │
│ │ [ ] DAHDI DAHDI support │ │
│ │ [ ] EXCHANGE Exchange calendar support │ │
│ │ [ ] FREETDS FreeTDS library support │ │
│ │ [x] LDAP LDAP protocol support │ │
│ │ [x] LUA Lua scripting language support │ │
│ │ [x] MP3PLAYER Install MP3 Player for Music-On-Hold (mpg123) │ │
│ │ [x] OOH323 ooh323 support │ │
│ │ [x] OPTIMIZED_CFLAGS Use extra compiler optimizations │ │
│ │ [x] PJSIP Build the PJSIP based SIP channel │ │
│ │ [ ] PORTAUDIO PortAudio library support │ │
│ │ [ ] RADIUS RADIUS protocol support │ │
│ │ [ ] SNMP SNMP network protocol support │ │
│ │ [x] SPANDSP SpanDSP faxing support │ │
│ │ [x] SRTP SecureRTP support │ │
│ │ [x] SYSINFO Use devel/libsysinfo to get system information │ │
│ │ [x] XMPP XMPP/GTALK support │ │
│ │───────────────────── Encoder/Decoder (Codec) Support ────────────────────│ │
│ │ [x] GSM GSM codec support │ │
│ │ [x] NEWG711 New G711 Codec │ │
│ │ [x] SPEEX Speex audio format support │ │
│ │ [x] VORBIS Ogg Vorbis audio codec support │ │
│ │───────────────────────────── Database Support ───────────────────────────│ │
│ │ [ ] MYSQL MySQL database support │ │
│ │ [ ] ODBC ODBC database backend │ │
│ │ [x] PGSQL PostgreSQL database support │ │
│ │ [ ] SQLITE2 SQLite 2 database support │ │
│ │───────────────── Core and Music-on-Hold (MoH) Sound Files ───────────────│ │
│ │ [x] G729 Install G.729 format sounds │ │
│ │─────────────────────── Menuselect Interface Backend ─────────────────────│ │
│ │ [x] NCURSES Console (text) interface support │ │
│ │ [x] NEWT Newt User Interface │ │
│ │───────────────────────────── Compiler to use ────────────────────────────│ │
│ │ ( ) BASE Use base compiler (experimental) │ │
│ │ (*) GCC Build with modern GCC (from ports) │ │
│ └──────────────────────────────────────────────────────────────────────────┘ │
├──────────────────────────────────────────────────────────────────────────────┤
│ < OK > <Cancel>
Код: Выделить всё
noload => chan_sip.so;
load => res_pjsip.so
load => res_pjsip_pubsub.so
load => res_pjsip_session.so
load => chan_pjsip.so
load => res_pjsip_exten_state.so
load => res_pjsip_log_forwarder.so
https://wiki.asterisk.org/wiki/display/ ... hrough+NAT
и этой https://asterisk-pbx.ru/wiki/asterisk/res_pjsip_nat
инструкции.
В pjsip.conf
Код: Выделить всё
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
;############### шаблон ########
[aor-basic](!)
type = aor
max_contacts = 2
maximum_expiration=160
[endpoint-basic](!)
type = endpoint
language=ru
context=out-exten
transport=transport-udp
disallow=all
allow=ulaw
direct_media=no
[auth-userpass](!)
type=auth
auth_type=userpass
;###############################
[133](auth-userpass)
username=133
password=133
[133](endpoint-basic)
callerid = 133
aors = 133
auth = 133
[115](auth-userpass)
username=115
password=115
[133](aor-basic)
[115](endpoint-basic)
callerid = test
aors = 115
auth = 115
[115](aor-basic)
Код: Выделить всё
[macro-crm-record-mp3]
exten => s,1,NoOp(${ARG1} ${ARG2})
exten => s,n,GotoIf(${DB_EXISTS(NORECNUM/${ARG1})}?gtme)
exten => s,n,GotoIf(${DB_EXISTS(NORECNUM/${ARG2})}?gtme)
exten => s,n,Set(F=/var/spool/asterisk/recording/mp3/${STRFTIME(${EPOCH},,%Y)}/${STRFTIME(${EPOCH},,%m)}/${STRFTIME(${EPOCH},,%d)}/${STRFTIME(${EPOCH},,%Y-%m-%d-%H-%M-%S)}_${ARG1}_${ARG2})
exten => s,n,MixMonitor(${F}.wav,W(1),lame ${F}.wav ${F}.mp3 && rm ${F}.wav)
exten => s,n,Set(CDR(recording)=${F}.mp3)
exten => s,n(gtme),MacroExit
[out-exten]
exten => _XXX,1,Dial(pjsip/${EXTEN},60,M(crm-record-mp3))
exten => _XXX,n,Hangup()
exten => 200,1,Answer
exten => 200,2,ConfBridge(200)
Совершаю звонок между 115 и 133 звук есть.
Когда тестирую конференцию звука нет. Просто тишина
Когда добавляю Макрос в диаплане звука нет при звонке.
Когда убираю макрос из диаплана и добавляю в секцию [endpoint-basic](!) в файле pjsip.conf direct_media=no
То звука тоже нет.
Почему-то звук не проходи
При звонке на конференцию
Код: Выделить всё
<--- Received SIP request (711 bytes) from UDP:10.72.1.133:32511 --->
INVITE sip:200@10.72.1.142;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.72.1.133:32511;branch=z9hG4bK-524287-1---382457636f185d6d;rport
Max-Forwards: 70
Contact: <sip:115@10.72.1.133:32511;transport=UDP>
To: <sip:200@10.72.1.142;transport=UDP>
From: <sip:115@10.72.1.142;transport=UDP>;tag=4c3bb23a
Call-ID: -1kLJSVvl8jMk8j9XOCMKQ..
CSeq: 1 INVITE
Content-Type: application/sdp
User-Agent: Zoiper rv2.8.30
Allow-Events: presence, kpml, talk
Content-Length: 239
v=0
o=Zoiper 0 0 IN IP4 10.72.1.133
s=Zoiper
c=IN IP4 10.72.1.133
t=0 0
m=audio 57774 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<--- Transmitting SIP response (497 bytes) to UDP:10.72.1.133:32511 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.72.1.133:32511;rport=32511;received=10.72.1.133;branch=z9hG4bK-524287-1---382457636f185d6d
Call-ID: -1kLJSVvl8jMk8j9XOCMKQ..
From: <sip:115@10.72.1.142>;tag=4c3bb23a
To: <sip:200@10.72.1.142>;tag=z9hG4bK-524287-1---382457636f185d6d
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1489404967/2dd59fd5f28dc6c9a832c49994626f65",opaque="552367d1077537a8",algorithm=md5,qop="auth"
Server: Asterisk PBX 13.14.0
Content-Length: 0
<--- Received SIP request (342 bytes) from UDP:10.72.1.133:32511 --->
ACK sip:200@10.72.1.142;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.72.1.133:32511;branch=z9hG4bK-524287-1---382457636f185d6d;rport
Max-Forwards: 70
To: <sip:200@10.72.1.142>;tag=z9hG4bK-524287-1---382457636f185d6d
From: <sip:115@10.72.1.142;transport=UDP>;tag=4c3bb23a
Call-ID: -1kLJSVvl8jMk8j9XOCMKQ..
CSeq: 1 ACK
Content-Length: 0
<--- Received SIP request (1005 bytes) from UDP:10.72.1.133:32511 --->
INVITE sip:200@10.72.1.142;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.72.1.133:32511;branch=z9hG4bK-524287-1---076322f59426b802;rport
Max-Forwards: 70
Contact: <sip:115@10.72.1.133:32511;transport=UDP>
To: <sip:200@10.72.1.142;transport=UDP>
From: <sip:115@10.72.1.142;transport=UDP>;tag=4c3bb23a
Call-ID: -1kLJSVvl8jMk8j9XOCMKQ..
CSeq: 2 INVITE
Content-Type: application/sdp
User-Agent: Zoiper rv2.8.30
Authorization: Digest username="115",realm="asterisk",nonce="1489404967/2dd59fd5f28dc6c9a832c49994626f65",uri="sip:200@10.72.1.142;transport=UDP",response="8c0175f426feacea8d155208a0ba68e9",cnonce="85a3f4d643baef935d6c204835b10fea",nc=00000001,qop=auth,algorithm=md5,opaque="552367d1077537a8"
Allow-Events: presence, kpml, talk
Content-Length: 239
v=0
o=Zoiper 0 0 IN IP4 10.72.1.133
s=Zoiper
c=IN IP4 10.72.1.133
t=0 0
m=audio 57774 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:<--- Transmitting SIP response (304 bytes) to UDP:10.72.1.133:32511 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.72.1.133:32511;rport=32511;received=10.72.1.133;branch=z9hG4bK-524287-1---076322f59426b802
Call-ID: -1kLJSVvl8jMk8j9XOCMKQ..
From: <sip:115@10.72.1.142>;tag=4c3bb23a
To: <sip:200@10.72.1.142>
CSeq: 2 INVITE
Server: Asterisk PBX 13.14.0
Content-Length: 0
<--- Transmitting SIP response (784 bytes) to UDP:10.72.1.133:32511 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.72.1.133:32511;rport=32511;received=10.72.1.133;branch=z9hG4bK-524287-1---076322f59426b802
Call-ID: -1kLJSVvl8jMk8j9XOCMKQ..
From: <sip:115@10.72.1.142>;tag=4c3bb23a
To: <sip:200@10.72.1.142>;tag=8e66f7a8-a536-4326-8ea4-a5ca88d2e425
CSeq: 2 INVITE
Server: Asterisk PBX 13.14.0
Contact: <sip:10.72.1.142:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 217
v=0
o=- 0 2 IN IP4 10.72.1.142
s=Asterisk
c=IN IP4 10.72.1.142
t=0 0
m=audio 12022 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
<--- Received SIP request (397 bytes) from UDP:10.72.1.133:32511 --->
ACK sip:10.72.1.142:5060 SIP/2.0
Via: SIP/2.0/UDP 10.72.1.133:32511;branch=z9hG4bK-524287-1---f5840104a6c31138;rport
Max-Forwards: 70
Contact: <sip:115@10.72.1.133:32511;transport=UDP>
To: <sip:200@10.72.1.142>;tag=8e66f7a8-a536-4326-8ea4-a5ca88d2e425
From: <sip:115@10.72.1.142>;tag=4c3bb23a
Call-ID: -1kLJSVvl8jMk8j9XOCMKQ..
CSeq: 2 ACK
User-Agent: Zoiper rv2.8.30
Content-Length: 0
<--- Received SIP request (678 bytes) from UDP:10.72.1.133:32511 --->
BYE sip:10.72.1.142:5060 SIP/2.0
Via: SIP/2.0/UDP 10.72.1.133:32511;branch=z9hG4bK-524287-1---9876e8798b07b2bd;rport
Max-Forwards: 70
Contact: <sip:115@10.72.1.133:32511;transport=UDP>
To: <sip:200@10.72.1.142>;tag=8e66f7a8-a536-4326-8ea4-a5ca88d2e425
From: <sip:115@10.72.1.142>;tag=4c3bb23a
Call-ID: -1kLJSVvl8jMk8j9XOCMKQ..
CSeq: 3 BYE
User-Agent: Zoiper rv2.8.30
Authorization: Digest username="115",realm="asterisk",nonce="1489404967/2dd59fd5f28dc6c9a832c49994626f65",uri="sip:10.72.1.142:5060",response="6e4c28ba1ed813eee443dbe3eabba2f7",cnonce="9b086b685a65b95e8264e23cde746fc3",nc=00000002,qop=auth,algorithm=md5,opaque="552367d1077537a8"
Content-Length: 0
<--- Transmitting SIP response (338 bytes) to UDP:10.72.1.133:32511 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.72.1.133:32511;rport=32511;received=10.72.1.133;branch=z9hG4bK-524287-1---9876e8798b07b2bd
Call-ID: -1kLJSVvl8jMk8j9XOCMKQ..
From: <sip:115@10.72.1.142>;tag=4c3bb23a
To: <sip:200@10.72.1.142>;tag=8e66f7a8-a536-4326-8ea4-a5ca88d2e425
CSeq: 3 BYE
Server: Asterisk PBX 13.14.0
Content-Length: 0
Прошу помощи в настроике. Незнаю куда копать.