Ended up using something similar for some FreeSWITCH cluster testing and figured it might as well be part of the pysipp API:
from contextlib import contextmanager
@contextmanager
def multicall(dialers):
finalizers = []
for for dialer in dialers:
finalizers.append(dialer(block=False))
yield dialers
for finalize in finalizers:
finalize()
It basically wraps the async usage from the README.
Ended up using something similar for some FreeSWITCH cluster testing and figured it might as well be part of the
pysipp
API:It basically wraps the async usage from the README.