在 Asterisk 中转发 X 标头 [英] Forwarding X Headers in Asterisk

查看:39
本文介绍了在 Asterisk 中转发 X 标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个软电话,它通过我们的 Asterisk 服务器在 SIP 中继上拨出.软电话正在发送我们想要发送到目的地的 X 标头.我们看到标题进入 Asterisk,但没有出去.我们可以做些什么来将标头转发到目的地?

We have a soft phone that's dialing out, on a SIP trunk, through our Asterisk server. The soft phone is sending X Headers that we want to send on to the destination. We see the headers coming into Asterisk, but not going out. Is there something we can do to forward the headers along to the destination?

推荐答案

Asterisk 不是 SIP 代理,而是 B2BUA.这实际上意味着它没有转发原始请求.来自您的软电话的呼叫在 Asterisk 上终止.Asterisk 开始第二次呼叫到您呼叫的逻辑目的地并将两个呼叫连接在一起.

Asterisk is no SIP proxy but a B2BUA. This actually means, that it is not forwarding the original request. The call from your softphone gets terminated on Asterisk. Asterisk starts a second call to the logical destination of your call and connects both calls together.

这就是为什么在拨出电话中您没有在拨入电话中添加的标头的原因.呼出呼叫由 Asterisk 发起.如果你想从来电中添加任何标题,你必须像 miken32 所说的那样手动添加:

This is why on the outgoing call you don't have the headers you added on the incoming call. The outgoing call is initiated by Asterisk. If you want to add any headers from the incoming call, you manually have to to it like miken32 said:

    exten => _X.,n,SIPAddHeader(X-Foobar: ${SIP_HEADER(X-Foobar)})
    exten => _X.,n,Dial(SIP/${EXTEN})

这篇关于在 Asterisk 中转发 X 标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆