Asterisk SipHeader Diversion - PullRequest
       35

Asterisk SipHeader Diversion

0 голосов
/ 03 мая 2018

Здравствуйте, Ремесленник Звездочка, У меня есть проблема, я не могу извлечь в переменной из 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))

RECIVED:

глотка: +4917645615686@public-vip.cisco.de>; причина = безусловная

но мне также нужен второй ряд!

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

Может кто-нибудь мне помочь?

1 Ответ

0 голосов
/ 03 мая 2018

Может быть, вам следует прочитать справку и использовать второй параметр?

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
...