Open vodik opened 6 years ago
And I forgot to fix up the examples as well...
And lastly, I didn't put too much effort in the get_details
because its going to change with #112, which can change it to frozendict((call_id, from_details.tag, to_details.tag))
Do you guys have any plans to support other things than URI in ursine ? I think we already had a bit of a discussion about removing part of the aiosip parsing into an external library. We could do it step by step with ursine as some part of the API could afford a rework.
And I'm fairly confident it would make the aiosip code much more readable
@dtkerr has SIP Header and URI support in there at the moment. There are rough plans to add support for Via headers as well.
Which is something I've been meaning to bring up. @dtkerr been itching to move it to some sort of parser generator library (not sure if he has one in mind), but I've been resistent for now as I wanted to keep the dependency footprint small and not make that decisoin alone.
Completely seperating the SIP message parser would probably be ideal. I'm a big fan of that kind of seperation in general and opens the door to optimizing it (for example, replace it with cython)
Completely seperating the SIP message parser would probably be ideal. I'm a big fan of that kind of seperation in general and opens the door to optimizing it (for example, replace it with cython)
We have the same goal :+1:
There are rough plans to add support for Via headers as well.
Awesome :tada: !
move it to some sort of parser generator library
To be honest I'm not sure what that would exactly requires
Moving in that direction it might be time to create that org we talked about so those projects live together.
Hi @vodik and @dtkerr,
Thanks a lot for your awesome work, I'm OK to replace the internal URI parser of aiosip by ursine.
Completely seperating the SIP message parser would probably be ideal. I'm a big fan of that kind of seperation in general and opens the door to optimizing it (for example, replace it with cython)
It looks like the sans I/O approach. I'm agree with this approach, while we try to keep simple the maintenance ;-)
BTW, when I have created aiosip, I have taken some inspiration from @theintencity with this document and p2p-sip.
Moving in that direction it might be time to create that org we talked about so those projects live together.
Yes, definitely, and I still need to answer to #98 and #99 ;-) I will answer you between now and next week.
Have a nice week-end.
My (potential) parser-generator plans would just be that it's probably easier to cover all parts of the URI grammar with a language meant to express a grammar, but if I ever jump for doing that I'd try to choose a parser generator that outputs code. (IE: no dependencies for the user, only for build-time).
For the time being, though, the pure python stuff in ursine looks like it functions well enough.
This PR got a bit stale pretty quickly, though, because I did some non-trivial overhauling of ursine and I'm working now on bringing this PR up to to date again.
Funny enough, I think that's the same guy my friend @moises-silva pointed me to - just rather to his blog posts.
I'm digging into it, its giving me ideas for #124
So, @dtkerr did the hard work, and we ported aiosip to using them.
Few things to look at before merge them:
But that said, this helps cleanup the API.