We have a need to add SIP SUBSCRIBE/NOTIFY messaging for SIP Registration events not supported in our current ISDN PRI to SIP+VoIP gateway on IAD2431 and ISR2921 IOS voice gateways (VGW). When a provisioning change is made to the VGW's IMS account, such as adding or deleting telephone numbers to the client PBX served by the VGW, the IMS automatically de-registers the VGW, which I believe is per 3GPP IMS spec. At this point, the IMS will not route incoming calls to the PBX, because it does not have a valid SIP Registration. This is a major service outage for the PBX customer that will last until the VGW's registration expires and it re-registers.
The 3GPP IMS spec says the VGW should send a SIP SUBSCRIBE message for registration events to the IMS immediately after it registers. Then when a provisioning event causes the IMS to de-register the VGW, the IMS will send a SIP NOTIFY to the VGW informing it that it has been de-registered. When the VGW registers recieves the NOTIFY we need to get the VGW to immediately re-register, which will then allow the IMS to route inbound PBX calls over SIP to VGW, which sends the call to to the PBX over ISDN Q.931 on the PBX's T1. Because the existing IOS SIP user agent does not support this capability natively, we want to add it using TCL or IOS EEM scripts.
We have already used EEM scripting to detect and respond to other SIP Registration fault scenarios that are problematic with the IOS SIP UA. We use EEM to poll the state of the IOS SIP UA by querying its SNMP OIDs. Then we use the EEM script to generate CLI commands to enter IOS configuration mode, delete the SIP UA's registrar command, and then add it back in. This makes the VGW try to Register again promptly, where otherwise a significant outage period would occur.
The IOS SIP Config Guide has several sections covering SUBSCRIBE and NOTIFY capabilities, but we need to find documentation or someone with experience on how to configure the use TCL to trigger the SIP UA to generate a SUBSCRIBE message on command, and to trigger an EEM event when it receives a NOTIFY. Does anyone have any experience with this type of application? Can you point us to existing documentation, or contribute example configs, scripts and debug traces?