Question: Is there a way for us to set up a VE machine take calls on all numbers “except” 1 number? I know we can list out all of the numbers we want to listen to, however that is not much fun when we have 400 numbers. We would like to have one machine listen to all numbers except a test number.
Answer: HMP Elements has to respond to all calls that are presented to it. To have a particular VE application accept all calls except one number, do this in your incoming logic:
Define the Session Progress
First of all there is a setting called SessionProgressControlledByApp:
<setting name="SessionProgressControlledByApp" serializeAs="String"> <value>False</value> </setting>
When this is set, HMPE will not send the SESSION PROGRESS until instructed to do so. This is helpful if you plan on rejecting calls.
Define the Call to Reject
In your new call event code, you would:
if (channelResource.Dnis == "3032345678") { channeResource.Disconnect(503); return; } // This tells HMPE to REJECT the call with a 503 Service Not Available. // You could also send Disconnect() and that would return a 486 busy here. SipChannel sipChannel = channelResource as SipChannel; if (sipChannel!=null) sc.AcceptCall(); // This sends the SESSION PROGRESS if the Setting above is set to TRUE. ... Continue on and Answer the call.