我在星号实例消息中有一个问题,我使用的是Asterisk版本11,消息是通过没有TLS的服务器,但同样的事情我正在使用TLS,消息不会发生,我在这里附上我的啜饮。 conf和extensions.conf
This Is My extensions.conf
[outgoing]
exten => 12345,1,NoOp()
same => n,Verbose(1, Outgoing Caller ID: {$CALLERID(all)})
;same => n,Dial(SIP/${EXTEN})
same => n,Dial(${CHANNEL})
same => n,Hangup()
[home]
;3001 to dial phone 1
;tmpA(beep) performs call screening
;exten => 3001,1,Dial(SIP/9738441908,18,tmpA(beep))
;exten => 3001,n,Hangup()
exten => yash5,1,NoOp()
same => n,Verbose(1, Outgoing Caller ID: {$CALLERID(all)})
same => n,Dial(SIP/${EXTEN})
same => n,Hangup()
[incoming]
exten => alos,1,Dial(SIP/alos)
exten => alos,n,Wait(2)
exten => alos,n,Hangup()
[incoming]
exten => 9738441908,1,NoOp(${CALLERID(all)})
exten => 9738441908,2,Dial(SIP/9738441908)
exten => 9738441908,n,MixMonitor(${UNIQUEID}.wav,W(4))
exten => 9738441908,n,Hangup()
[incoming]
exten => 9738441907,1,NoOp(${CALLERID(all)})
exten => 9738441907,2,Dial(SIP/9738441907)
exten => 9738441907,n,MixMonitor(${UNIQUEID}.wav,W(4))
exten => 9738441907,n,Hangup()
[astsms]
exten => 9738441907,1,NoOp(SMS receiving dialplan invoked)
exten => 9738441907,n,NoOp(To ${MESSAGE(to)})
exten => 9738441907,n,NoOp(From ${MESSAGE(from)})
exten => 9738441907,n,NoOp(Body ${MESSAGE(body)})
exten => 9738441907,n,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => 9738441907,n,MessageSend(${ACTUALTO},${MESSAGE(from)})
exten => 9738441907,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
exten => 9738441907,n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?sendfailedmsg)
exten => 9738441907,n,Hangup()
;
; Handle failed messaging
exten => 9738441907,n(sendfailedmsg),Set(MESSAGE(body)="[${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)}] Your message to ${EXTEN} has failed.Logesh Retry later.")
exten => 9738441907,n,Set(ME_1=${CUT(MESSAGE(from),<,2)})
exten => 9738441907,n,Set(ACTUALFROM=${CUT(ME_1,@,1)})
exten => 9738441907,n,MessageSend(${ACTUALFROM},ServiceCenter)
exten => 9738441907,n,Hangup()
exten => 9738441907,n,Hangup()
[astsms]
exten => 9738441908,1,NoOp(SMS receiving dialplan invoked)
exten => 9738441908,n,NoOp(To ${MESSAGE(to)})
exten => 9738441908,n,NoOp(From ${MESSAGE(from)})
exten => 9738441908,n,NoOp(Body ${MESSAGE(body)})
exten => 9738441908,n,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => 9738441908,n,MessageSend(${ACTUALTO},${MESSAGE(from)})
exten => 9738441908,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
exten => 9738441908,n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?sendfailedmsg)
exten => 9738441908,n,Hangup()
;
; Handle failed messaging
exten => 9738441908,n(sendfailedmsg),Set(MESSAGE(body)="[${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)}] Your message to ${EXTEN} has failed.Logesh 08 Retry later.")
exten => 9738441908,n,Set(ME_1=${CUT(MESSAGE(from),<,2)})
exten => 9738441908,n,Set(ACTUALFROM=${CUT(ME_1,@,1)})
exten => 9738441908,n,MessageSend(${ACTUALFROM},ServiceCenter)
exten => 9738441908,n,Hangup()
exten => 9738441908,n,Hangup()
; 3002 dials phone 2
;exten => 3002,1,Dial(SIP/9738441908,18)
;exten => 3002,n,Hangup()
exten => 8904470154,1,Dial(SIP/8904470154)
exten => 8904470154,n,MixMonitor(${UNIQUEID}.wav,W(4))
exten => 8904470154,n,Hangup()
;first is to record some messages.
exten => 3003,1,Answer()
same => n,Wait(2)
same => n,Playback(hello-world)
same => n,Wait(2)
same => n,MixMonitor(${UNIQUEID}.wav,W(4))
same => n,Wait(500)
same => n,Hangup
This Is My sip.conf
;!
;! Automatically generated configuration file
;! Filename: sip.conf (/etc/asterisk/sip.conf)
;! Generator: Manager
;! Creation Date: Wed Dec 4 11:48:13 2013
;!
;[general]
;realm = 115.241.32.128
;realm = 192.168.1.2
;notifyringing = yes
;notifycid = yes
;notifyhold = yes
;call-limit = 1
;callcounter = yes
;busylevel = 2
;context=incoming
;rtcachefriends = yes
;subscribecontext = default
[general]
realm = 101.63.195.134
;realm = 192.168.1.6
context=incoming
;rtcachefriends = yes
subscribecontext = default
pedantic=no
accept_outofcall_message = yes
outofcall_message_context = astsms
auth_message_requests = yes
tlsenable=yes
tlsbindaddr=101.63.195.134
;tlsbindaddr=117.239.232.59
;tlscertfile=/home/yashaswini/tls_certs/root.pem
tlscertfile=/etc/asterisk/certificate/asterisk.acsm.com.pem
tlsdontveriyserver=no
tlscipher=DES-CBC3-SHA
tlsclientmethod=tlsv1
;tlscafile=/home/yashaswini/tls_certs/server-cert.pem ; This is the CA file used to generate both certificates
;register => tls://100:9611547121@192.168.1.9:5061
;register => tls://100:100@192.168.1.11:5061
;register =>5678:1234@117.239.232.59:5060
[9738441908]
type=friend
host=dynamic
username=9738441908
nat = yes
secret=
allow=all
transport=tls
canreinvite=no
qualify=yes
[9738441907]
type=friend
host=dynamic
username=9738441907
nat = yes
secret=
allow=all
transport=tls
canreinvite=no
qualify=yes
[5678]
type=friend
host=dynamic
username=5678
nat = yes
secret=
;allow=all
allow=speex
context=incoming
transport=tls
canreinvite=no
And This Is my ErrorLog
<--- SIP read from TLS:27.107.28.28:14381 --->
MESSAGE sip:9738441907@101.63.80.30;transport=tls SIP/2.0
Via: SIP/2.0/TLS 27.107.28.28:14381;rport;branch=z9hG4bKPjfhtsdFvEtdGif8mv5zLgLwuPifg4bq3d
Max-Forwards: 70
From: <sip:9738441908@101.63.80.30>;tag=0YovvR3giNYNZXs8mOBd5sMJQOyaa8Ia
To: <sip:9738441907@101.63.80.30>
Call-ID: RTs4.W6bwxf765sF4yxHNh9QyNdcD0cX
CSeq: 61338 MESSAGE
Accept: text/plain, application/im-iscomposing+xml
Contact: <sip:9738441908@49.200.41.178:53543;transport=tls;ob>
Content-Type: text/plain
Content-Length: 17
dbxhfgxh
15:16:55
<------------->
--- (11 headers 2 lines) ---
Receiving message!
Found peer '9738441908' for '9738441908' from 27.107.28.28:14381
Looking for 9738441907 in dialplan_name (domain 101.63.80.30)
<--- Transmitting (NAT) to 27.107.28.28:14381 --->
SIP/2.0 202 Accepted
Via: SIP/2.0/TLS 27.107.28.28:14381;branch=z9hG4bKPjfhtsdFvEtdGif8mv5zLgLwuPifg4bq3d;received=27.107.28.28;rport=14381
From: <sip:9738441908@101.63.80.30>;tag=0YovvR3giNYNZXs8mOBd5sMJQOyaa8Ia
To: <sip:9738441907@101.63.80.30>;tag=as2f83043e
Call-ID: RTs4.W6bwxf765sF4yxHNh9QyNdcD0cX
CSeq: 61338 MESSAGE
Server: Asterisk PBX 11.2.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'RTs4.W6bwxf765sF4yxHNh9QyNdcD0cX' in 15232 ms (Method: MESSAGE)
Reliably Transmitting (NAT) to 27.107.28.28:14381:
MESSAGE sip:9738441908@27.107.28.28:14381;transport=tls;ob SIP/2.0
Via: SIP/2.0/UDP [fe80::f2de:f1ff:fec3:9397]:5060;branch=z9hG4bK475f9c7a
Max-Forwards: 70
From: "ServiceCenter" <sip:asterisk@101.63.80.30>;tag=as5a8cadd7
To: <sip:9738441908@27.107.28.28:14381;transport=tls;ob>
Contact: <sip:asterisk@101.63.80.30:5061;transport=TLS>
Call-ID: 55c682543c1ef160137e31c613848da2@[fe80::f2de:f1ff:fec3:9397]:5060
CSeq: 102 MESSAGE
User-Agent: Asterisk PBX 11.2.1
Content-Type: text/plain;charset=UTF-8
Content-Length: 83
"[24112014-15:17:51] Your message to 9738441907 has failed. Sending when available"
---
Scheduling destruction of SIP dialog '55c682543c1ef160137e31c613848da2@[fe80::f2de:f1ff:fec3:9397]:5060' in 15232 ms (Method: MESSAGE)
/bin/sh: sip:9738441908@101.63.80.30: No such file or directory
/bin/sh: $'\342\200\223MSG': command not found
/bin/sh: line 1: $'15:16:55\342\200\231': command not found
<--- SIP read from TLS:27.107.28.28:14381 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP [fe80::f2de:f1ff:fec3:9397]:5060;received=101.63.80.30;branch=z9hG4bK475f9c7a
Call-ID: 55c682543c1ef160137e31c613848da2@[fe80::f2de:f1ff:fec3:9397]:5060
From: "ServiceCenter" <sip:asterisk@101.63.80.30>;tag=as5a8cadd7
To: <sip:9738441908@27.107.28.28;ob>;tag=z9hG4bK475f9c7a
CSeq: 102 MESSAGE
Content-Length: 0
<------------->
--- (7 headers 0 lines) ---
Really destroying SIP dialog '55c682543c1ef160137e31c613848da2@[fe80::f2de:f1ff:fec3:9397]:5060' Method: MESSAGE
Really destroying SIP dialog 'nKK0jAsJi2TkihJZybj3KPvq3KZZUUTU' Method: REGISTER
Really destroying SIP dialog 'RTs4.W6bwxf765sF4yxHNh9QyNdcD0cX' Method: MESSAGE
Really destroying SIP dialog 'nKK0jAsJi2TkihJZybj3KPvq3KZZUUTU' Method: REGISTER