Diaplan logic based on sip message ringing


Is it possible to have in the dialplan a logic where after executing dial(), one can monitor the incoming sip messages and add logic to the dialplan based on these messages. As a concrete example I would like to cancel the dialling once I get the 180 sip message (i.e. ringing) back from the peer. Is this even possible?

Thanks for your replies.


This is not he support forum.

Why would you want you want to abandon a call at a point where ringing was not certain and is likely to be of a short, but indeterminate duration, if it happens?

Hi David,

Well the idea is to somehow confirm that the number is a valid number without actually connecting with the number. So I thought if there is a way to monitor the sip messages coming back during the call set up and when seeing the 180 ringing signal (which indicates that the number is valid) then to cancel the dialling/connection.

That will produce silent calls. At least in the UK, there are rules against silent calls. They were introduced because of predictive dialers that failed to come up with an agent, but 100% missed calls would be even more annoying to victims.

Here I am not aware of such a rule. But I was just curious if technically this is possible to implement in the “dialplan”.