aiosip
aiosip copied to clipboard
Dialplan needs to be more sophisticated
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.