End a call in asterisk, when i send a command from openhab?

is there a way to end a asterisk phone call, when i send a command with openhab?

My problem is this:
I have a sip-door-phone, which calls my asterisk-server, when someone is ringing - and then all my phones inside the house are ringing for some time. Even if i open the door, the phones are still ringing.

Now i want to kill the call, when i open the door and my contact-item from the frontdoor sends “open”.

Is this possible? Maybe with a script?

I guess it would be bettet to ask this in the Asterisk community, as you are loopings for an Asterisk feature, that is not relaxed to openHAB.