0

您好工匠星号,我有一个问题,我无法从 SipHeader 中提取变量。我跟着我得到的转储:

Diversion: <sip:+4917645615686@public-vip.cisco.de>;reason=unconditional

Diversion: "Anonymous"sip<:Anonymous@47.23.21.9>;reason=unknow;privacy=full;counter=1

我在拨号方案中设置:

same => n,Set(diversion=${SIP_HEADER(Diversion))

收到:

sip:+4917645615686@public-vip.cisco.de>;reason=unconditional

但我也需要第二排!

Diversion: "Anonymous"sip<:Anonymous@47.23.21.9>;reason=unknow;privacy=full;counter=1

有人能帮我吗?

4

1 回答 1

2

也许您应该阅读帮助并使用第二个参数?

pro-sip*CLI> core show function SIP_HEADER 

  -= Info about function 'SIP_HEADER' =- 

[Synopsis]
Gets the specified SIP header from an incoming INVITE message. 

[Description]
Since there are several headers (such as Via) which can occur multiple times,
SIP_HEADER takes an optional second argument to specify which header with that
name to retrieve. Headers start at offset '1'.
Please observe that contents of the SDP (an attachment to the SIP request)
can't be accessed with this function.

[Syntax]
SIP_HEADER(name[,number])

[Arguments]
number
    If not specified, defaults to '1'.

[See Also]
Not available
于 2018-05-03T17:10:45.140 回答