星号13.10.0不检测用户输入.DTMF 不起作用



我正在尝试从电话拨号盘获取用户输入,但它不起作用。似乎 DTMF 不起作用

[general]
;context=unauthenticated
context=callingout
type=peer
;host=dynamic
allowguest=yes
 alwaysauthreject=yes
srvlookup=yes
 udpbindaddr=0.0.0.0
 tcpenable=no
;port=5038
 match_auth_username=yes
;alwaysauthreject=no
allowoverlap=no
allowtransfer=no
canreinvite=no
disallow=all
allow=g729
allow=ulaw
allow=alaw
;allow=gsm
;    allow=all
  directmedia=no
  ;nat=force_rport,comedia
   nat=yes
   externip=xx.xx.xx.xx
  ;localnet=192.168.0.3/255.255.0.0
   ;allow=speex
   dtmfmode=rfc2833
    qualify=yes

[callingout]
 srvlookup=no
 udpbindaddr=0.0.0.0
  type=friend
  host=xx.xx.xx.xx
     ;host=dynamic
 context=callingout
 canreinvite=no
 disallow=all
 allow=g729
 allow=ulaw
 allow=alaw
 dtmfmode=rfc2833
 extenip=xx.xx.xx.xx
 nat=yes
 qualify=yes
  [plan]
  srvlookup=no
   udpbindaddr=0.0.0.0
   type=friend
    host=xx.xx.xx.xx
   ;host=dynamic
   context=callingout
    canreinvite=no
    disallow=all
     allow=g729
     allow=ulaw
     allow=alaw
     dtmfmode=rfc2833
      extenip=xx.xx.xx.xx
       nat=yes
       qualify=yes

      [gateway-default] ; call is routed to this server IP
       type=peer
        insecure=invite,port
        nat=no
         directmedia=no
           host=xx.xx.xx.xx
           ;context=callingout
            disallow=all
            allow=g729
             allow=ulaw
         allow=alaw
         dtmfmode=rfc2833

我尝试使用拨号计划中 Read 语句获取用户输入

same => n,Read(pin_entered,/var/lib/asterisk/sounds/es/enter_PIN,4,i,1,5)

但是当我设置 sip 和 rtp 调试时,我得到以下输出

    -- Accepting a maximum of 4 digits.
 Audio is at 17380
Adding codec g729 to SDP
Adding codec ulaw to SDP
Adding codec alaw to SDP
<--- Reliably Transmitting (NAT) to 46.19.209.14:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 46.19.209.14;branch=z9hG4bK6vxvLaBc;received=46.19.209.14;rport                                                                                        =5060
From: 16173730982 <sip:16173730982@46.19.209.14>;tag=3B8DECC2-58A132ED0008B979-D                                                                                        29D1700
To: <sip:17818100188@xx.xx.xx.xx:5060>;tag=as6ad8c2be
Call-ID: 16-471011CE-58A132ED0008BA04-D29D1700
CSeq: 10 INVITE
Server: Asterisk PBX 13.10.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS                                                                                        H, MESSAGE
Supported: replaces, timer
Contact: <sip:17818100188@xx.xx.xx.xx:5060>
Content-Type: application/sdp
Content-Length: 269
v=0
o=root 876537524 876537524 IN IP4 xx.xx.xx.xx
s=Asterisk PBX 13.10.0
c=IN IP4 xx.xx.xx.xx
t=0 0
m=audio 17380 RTP/AVP 18 0 8
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=ptime:20
a=maxptime:150
a=sendrecv
<------------>
<--- SIP read from UDP:46.19.209.14:5060 --->
ACK sip:17818100188@xx.xx.xx.xx:5060 SIP/2.0
Via: SIP/2.0/UDP 46.19.209.14;branch=z9hG4bKtk4jVaWe;rport
From: 16173730982 <sip:16173730982@46.19.209.14>;tag=3B8DECC2-58A132ED0008B979-D                                                                                        29D1700
To: <sip:17818100188@xx.xx.xx.xx:5060>;tag=as6ad8c2be
CSeq: 10 ACK
Call-ID: 16-471011CE-58A132ED0008BA04-D29D1700
Contact: <sip:46.19.209.14:5060>
Max-Forwards: 70
Content-Length: 0
<------------->

-- <SIP/46.19.209.14-0000023b> Playing '/var/lib/asterisk/sounds/es/enter_PI                                                                                        N.slin' (language 'es')
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027986, ts 000320, len                                                                                         000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027987, ts 000480, len                                                                                         000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027988, ts 000640, len                                                                                         000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027989, ts 000800, len                                                                                         000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027990, ts 000960, len                                                                                         000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027991, ts 001120, len                                                                                         000020)
   > 0x7fb8f0019460 -- Probation passed - setting RTP source address to 46.1                                                                                        9.209.79:51054
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021627, ts 2308319632,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027992, ts 001280, len                                                                                         000020)
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021628, ts 2308319792,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027993, ts 001440, len                                                                                         000020)
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021629, ts 2308319952,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027994, ts 001600, len                                                                                         000020)
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021630, ts 2308320112,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027995, ts 001760, len                                                                                         000020)
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021631, ts 2308320272,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027996, ts 001920, len                                                                                         000020)
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021632, ts 2308320432,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027997, ts 002080, len                                                                                         000020)
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021633, ts 2308320592,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027998, ts 002240, len                                                                                         000020)
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021634, ts 2308320752,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 027999, ts 002400, len                                                                                         000020)
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021635, ts 2308320912,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 028000, ts 002560, len                                                                                         000020)
Got  RTP packet from    46.19.209.79:51054 (type 18, seq 021636, ts 2308321072,                                                                                         len 000020)
Sent RTP packet to      46.19.209.79:51054 (type 18, seq 028001, ts 002720, len                                                                                         000020)

我建议切换到SIP INFO dtmf模式(在您的SIP客户端和Asterisk"dtmfmode"中设置它(。

然后,您将能够在 SIP 信令中清楚地看到 DTMF 消息。

相关内容

  • 没有找到相关文章

最新更新