从发件人标题中删除“匿名”文本 - SIP 邀请

问题描述 投票:0回答:1

我需要从 INVITE 请求中的 From 标头下方删除“匿名”文本。完成以下配置但没有运气。

使用由 root @ pilrh-noc-dynamicconivr-app01 在 2024-06-04 09:47:24 UTC 运行 Linux 的 x86_64 上构建的 Asterisk 18.23.1

  SIP/2.0 100 Trying
  Via: SIP/2.0/UDP 
  localip:5060;
  received=localip;branch=z9hG4bK30fa5b7b;rport=5060

   From: "Anonymous" <sip:0117411111@sipserverip>;tag=as032a1a5d
  To: <sip:07611111111@sipserverip>
  Call-ID: 3e6730894cf25b8a05ce3e40289d05bd@localip:5060
  CSeq: 102 INVITE
  Content-Length: 0    

sip.conf

[mytrunk]
type=peer
host=myhostip
port=5060
context=mycontext
disallow=all
allow=ulaw,alaw
fromuser=0117411111
fromdomain=localip
defaultuser=0117411111  ; Sometimes needed to ensure the user is sent correctly
callerid="<0117411111>
qualify=yes

扩展.conf

[from-dialog]
exten => _X.,1,Set(CALLERID(name)=)  ; Clear any name set for caller ID
exten => _X.,n,Set(CALLERID(num)=0117411111)  ; Set only the caller ID number
exten => _X.,n,Dial(SIP/dialog_axa/${EXTEN})
exten => _X.,n,Hangup()
sip asterisk
1个回答
0
投票

试试这个

   [from-dialog]
    exten => _X.,1,Set(CALLERID(name)=${CALLERID(num)})
© www.soinside.com 2019 - 2024. All rights reserved.