简体   繁体   English

星号:设置IAX中继时显示原始呼叫者的呼叫者ID

[英]Asterisk : Display Caller ID of original caller when an IAX Trunk is set

Friendly greetings, everyone ! 大家友好的问候!

I set up two Asterisk boxes : one with 2000 to 2999 extensions, the other with 5000 to 5999 extensions. 我设置了两个Asterisk框:一个扩展为2000到2999,另一个扩展为5000到5999。 On both, I have SIP users : 2005 and 2025 on one, 5002 and 5025 on the other. 在这两者上,我都有SIP用户:一个是2005和2025,另一个是5002和5025。

I set up an IAX trunk between the two, using Asterisk-GUI : on my trunks, the user's extensions are 2999 and 5999. The trunks are registered, everything is OK on this matter. 我使用Asterisk-GUI在这两者之间设置了一个IAX中继:在我的中继上,用户的扩展名为2999和5999。已注册了中继,此事一切正常。

Let's say user SIP 2005 (on one side) wants to call user SIP 5002 (on the other side). 假设用户SIP 2005(在一侧)要呼叫用户SIP 5002(在另一侧)。 I make the call, the call is normally relayed (I can join the other side) but, on 5002's phone, the displayed Caller ID is "2999" (trunk ID), which is bothersome. 我拨打电话,该电话通常已转接(我可以加入另一端),但是在5002的电话上,显示的主叫方ID为“ 2999”(中继ID),这很麻烦。

Is there a way to keep the original Caller ID (so, in my example, 2005) and display it on 5002's phone ? 有没有办法保留原始的呼叫方ID(在我的示例中为2005)并将其显示在5002的电话上?

I consulted Asterisk's doc and voip-info.org, but I haven't found my answer as of yet. 我查阅了Asterisk的doc和voip-info.org,但到目前为止我还没有找到答案。

That mean you trunk have callerid= or fromuser= in definition. 这意味着您的主干在定义中具有callerid =或fromuser =。 If you remove it, will be original callerid. 如果删除它,将是原始的callerid。

Also please note, you should use dial command with "o" flag when calling trunk. 另请注意,在呼叫中继时,应使用带有“ o”标志的拨号命令。

o([x]): If <x> is not provided, specify that the CallerID that was
    present on the *calling* channel be stored as the CallerID on the *called*
    channel. This was the behavior of Asterisk 1.0 and earlier. If <x> is
    provided, specify the CallerID stored on the *called* channel. Note that
    o(${CALLERID(all)}) is similar to option o without the parameter.

Not sure which version of Asterisk your using but you need to set the caller id in the dial plan. 不确定您使用的是哪个版本的Asterisk,但需要在拨号计划中设置呼叫者ID。 That way you can send whatever you like rather than being fixed to sending 1 caller ID for any call on that trunk. 这样,您可以发送任何您喜欢的消息,而不必固定为该中继线上的任何呼叫发送1个呼叫者ID。

In extensions.conf you should have something like this (taken from my conf) extensions.conf您应该有类似以下内容(摘自我的conf)

[to_hq]
exten => _7900.,1,Set(CALLERID(num)=7000${CALLERID(num)})
exten => _7900.,2,Dial(IAX2/to_hq/${EXTEN:4})

In my config I dial 7900 to access the iax trunk then the remote ext I'm trying to reach. 在我的配置中,我拨打7900来访问iax中继,然后再尝试访问的远程分机。 The caller id sends and displays on the remote phone as 7000xxxx where xxxx=the local ext I'm calling from. 呼叫者ID发送并在远程电话上显示为7000xxxx ,其中xxxx =我正在从中呼叫的本地分机。

7000 in my config is my local trunk code so that when I call a remote user they can call me back without having to dial the routing code. 配置中的7000是我的本地中继代码,因此当我呼叫远程用户时,他们可以回叫我而不必拨打路由代码。

The other side of the config on the remote node would look like this; 远程节点上配置的另一端看起来像这样;

[to_me]
exten => _7000.,1,Set(CALLERID(num)=7900${CALLERID(num)})
exten => _7000.,2,Dial(IAX2/to_me/${EXTEN:4})

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM