aiosip icon indicating copy to clipboard operation
aiosip copied to clipboard

New middleware

Open vodik opened this issue 7 years ago • 1 comments
trafficstars

I want to play around with creating an aiosip_auth package to be able to layer in authentication APIs, but the current middleware APIs aren't sufficient.

I really need to be able to intercept every incoming SIP message, so I think we'll need to change its design so that its done as a chained iterator: the middleware first received the message and then optionally yields it down to the actual handler below.

This would let me, for example, challenge all SUBSCRIPTION or REGISTER messages, regardless of when they show up in the dialog, without having the layer below having to handle being aware of the challenge authentication messages.

vodik avatar Mar 19 '18 03:03 vodik

I'm agree with your suggestion.

Be my guest to architecture the API for that.

ludovic-gasc avatar Mar 19 '18 14:03 ludovic-gasc