SIP incoming Alert-Info to ALERT_INFO


#1

I need to be able to do things differently based on the Alert-Info in the incoming SIP call. I did not find a mechanism to get to this field, so I made one.

This may be architecturally stupid, but I only spend a few minutes
on the code. Maybe as/if I progress I find a more correct way, but for now the following works for me:

emc.rvt.com/diffs/alertinfo.diff


exten => s,1,NoOp(a=${ALERT_INFO} n=${CALLERIDNUM})
exten => s,2,GotoIf($["${ALERT_INFO}" = “”]?20)

That only differentiates between an empty/non-existing and a populated Alert-Info. All I need for now.

Oh, and if anybody cares, Broadvoice sends no Alert-Info on the primary number and “Alert-Info: http://127.0.0.1/Bellcore-dr3” on the first alias.