Eyepea / aiosip

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

Lots of dialog work and a back to back useragent example. #72

Closed vodik closed 6 years ago

vodik commented 6 years ago

Two major changes with this pull request.

First, this hides create_dialog from the public API.

Instead of creating a dialog and then sending a SUBSCRIBE or REGISTER message on that dialog, we should couple dialog setup directly with the SIP transaction.

It makes for both a cleaner API that's more correct (okay, well, technically you could have always done the right thing with the old API, but you had to know what you're doing and do the appropriate bookkeeping yourself). If the transaction succeeds, you get a new dialog. See #69.

The tests and example code are both easier to follow with this change.

I also add a simple back to back useragent example. Its a variation of the subscription example that adds a third part - a location service.

vodik commented 6 years ago

Oh, also carries a copy of #71 in order to make this work.

codecov-io commented 6 years ago

Codecov Report

Merging #72 into master will decrease coverage by 0.97%. The diff coverage is 62.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #72      +/-   ##
==========================================
- Coverage   71.45%   70.48%   -0.98%     
==========================================
  Files          15       15              
  Lines        1461     1484      +23     
  Branches      262      263       +1     
==========================================
+ Hits         1044     1046       +2     
- Misses        311      333      +22     
+ Partials      106      105       -1
Impacted Files Coverage Δ
aiosip/dialog.py 75.83% <100%> (-0.84%) :arrow_down:
aiosip/application.py 67.04% <100%> (ø) :arrow_up:
aiosip/dialplan.py 86.66% <50%> (-3.81%) :arrow_down:
aiosip/peers.py 67.01% <59.09%> (-2.39%) :arrow_down:
aiosip/transaction.py 62.06% <0%> (-2.3%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fbb7705...7f83e77. Read the comment docs.

vodik commented 6 years ago

Okay, going to go ahead and merge since I got a warm reception with #69