Integrating Asterisk with the Avaya Merlin Magix PBX

本文介绍了一种将Avaya Magix PBX与Asterisk VoIP服务器进行集成的方法,通过使用DTMF信号实现不同场景下电话呼叫的灵活路由,并详细解释了如何配置Asterisk来识别这些模式代码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I recently needed to replace the voicemail server for a customer with a flexible alternative. We weren't in a position to remove the Avaya Magix PBX, so continued (and seamless) integration was still necessary. The only problem was the integration between the two systems. The connection was easy enough: 8 FXO ports in the Asterisk server using 2 4-port Digium TDM cards connected to the 8 analog or "single line" extensions from the 016 card in the Avaya. But, with different scenarios on call-in (voicemail check, roll-over to voicemail, inbound call, etc), Asterisk would need to behave differently, so how would this be accomplished?

In short, it's really simple. Avaya/Lucent use what some call "mode code", or DTMF digits used to "direct" the voicemail system as to the type of inbound call. The original server used analog lines as well, so determining those mode codes was simple as attaching a digit grabber and watching the digits come across as different voicemail calls were made.

The following was crafted in my dialplan to route the calls properly:

Mode Code Integration


Beware - the following syntax will probably need to be reviewed for compatibility with later versions of Asterisk. This stuff was used on a v1.0 box.

 ; The following extensions grab the mode code
 ; coming from the Avaya PBX and route the
 ; call appropriately via the Voicemail()
 ; and VoiceMailMain() apps.
 ;
 ; someone pressed vmail check
 exten => _#XX#XXXX##,1,VoicemailMain(${EXTEN:4:4})
 exten => _#XX#XXXX##,2,Hangup()
 ; inside call rolled over to vmail
 exten => _#XX#XXXX#XXXX#,1,Voicemail(u${EXTEN:9:4})
 exten => _#XX#XXXX#XXXX#,2,Hangup()
 ; inside group call rolled over to vmail
 exten => _#XX#XXXX#XXX#,1,Voicemail(u${EXTEN:9:3})
 exten => _#XX#XXXX#XXX#,2,Hangup()
 ; outside/PSTN call rolled over to vmail
 exten => _#XX##XXX.,1,Voicemail(u${EXTEN:5:4})
 exten => _#XX##XXX.,2,Goto(s,7)
 ; outside call went direct to Asterisk box (call from PSTN) 
 exten => _#XX#XXX#,1,Wait(1)
 exten => _#XX#XXX#,2,Goto(s,7)

The only additional step is to ensure you do a WaitExten(1) right after answering as this is the timeframe when the mode code digits are sent across.

From here, you can do what you wish as far as giving your users the ability to leave and check voicemail, not to mention build a very nice automated attendant. As a side note, the Magix analog lines expect calls to be transferred by using the Flash() application, then SendDTMF(XXXX).

Voicemail or MWI (Message Waiting Indicator) Light Integration


The only thing left is to operate the voicemail lights properly, which again is accomplished by the Magix PBX using DTMF codes: *53XXXX for on, and #*53XXXX for off. This is accomplished by adding the following directive in your voicemail.conf:

 externnotify=/usr/local/bin/vmnotify.pl

As well as adding the required script, the original listed here, and a backup listed here. Huge thanks to the original author, Mike Cathey.. Mike's website.

The script requires a few additional directories which are spelled out in the script's contents. Just browse through and make whatever changes you require. It also contains the ability to perform outbound calling when there's messages waiting, but I haven't needed it and thus haven't used or tested it.

See also

### 将通用传感器融合算法状态表示通过流形封装集成 在信息技术背景下,将通用传感器融合算法状态表示通过流形封装集成为解决复杂环境感知问题提供了有效途径。流形学习是一种能够捕捉数据内在结构的方法,在多维空间中找到低维嵌入的可能性[^1]。 对于机器人导航中的同步定位地图构建(SLAM),利用流形理论可以更好地处理非线性和不确定性问题。具体来说,流形上的优化方法允许直接操作于特定几何结构之上,从而保持物理意义的同时提高计算效率和鲁棒性。 为了实现这种集成: - **定义合适的流形**:针对不同类型的传感器测量值及其对应的状态变量设计相应的黎曼流形或其它形式的流形模型。 - **开发基于流形的操作符**:创建适用于所选流形的各种算子,如加法、乘法以及指数映射等基本运算规则,以便有效地执行预测更新过程。 - **实施高效的数值求解器**:采用诸如共轭梯度下降(CG)或者信赖域反射(TRR)这样的最优化技术来寻找最优估计参数,并确保收敛速度满足实时应用需求。 ```python import numpy as np from scipy.optimize import minimize def cost_function(x, measurements, manifold): """ 定义代价函数用于最小化误差 参数: x : 当前状态向量 measurements : 测量集合 manifold : 使用的具体流形对象 返回: float : 总体误差大小 """ error = 0.0 for m in measurements: predicted_measurement = manifold.predict(m, x) residual = m - predicted_measurement error += np.dot(residual.T, residual) return error # 假设已知初始猜测值 initial_guess 和一组测量数据 measurements, # 并选择了适当类型的流形实例 manifold_instance 进行工作 result = minimize(cost_function, initial_guess, args=(measurements, manifold_instance)) optimized_state = result.x ``` 上述代码片段展示了如何设置并调用一个简单的优化程序以调整给定状态下测得的数据之间的差异。这里的关键在于`manifold`类实现了必要的接口来进行预测和其他必需的操作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值