Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道如何将传入呼叫者(在 PBX 上配置的呼叫者)的分机存储在变量中。在接听电话后,我需要在星号拨号计划中执行此操作。
;Answer call exten => 1234,1,Answer() ;Store caller's extension in a variable
我认为您应该解析 sip 标头,这可能是您想要的
exten => 1234,1,Answer() same => n,Set(FROM=${CUT(SIP_HEADER(From),@,1)}) same => n,Set(EXT=${CUT(FROM,:,2)}) same => n,NoOp(ext: ${EXT})
你可以这样做:
Set(_CALLERPEERNAME=${CHANNEL(peername)});
下划线字符将允许该变量被继承。