Eyepea / aiosip

SIP support for AsyncIO (DEPRECATED)
Apache License 2.0
82 stars 41 forks source link

Dialplan needs to be more sophisticated #78

Open vodik opened 6 years ago

vodik commented 6 years ago

Currently, if the dialplan falls through, it returns a 501. But that strictly isn't correct.

For example, if the server implements SUBSCRIBE, but its gated behind a particular user, it should return 404 back, for example.

Maybe it even makes sense to just drop that and have a flat mapping of methods to callbacks and leave these kinds of decisions to the library users?

After all, I think a lot of this functionality could be nicely gated behind middleware.