Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP transport sendto blocking when using hostname #103

Open
ovv opened this issue Apr 19, 2018 · 2 comments
Open

UDP transport sendto blocking when using hostname #103

ovv opened this issue Apr 19, 2018 · 2 comments

Comments

@ovv
Copy link
Contributor

ovv commented Apr 19, 2018

Using the subscribe client example with a hostname as srv_host (sip.example.com) the call to transport.send_to blocked and not packets are sent.

https://github.com/Eyepea/aiosip/blob/master/aiosip/protocol.py#L24

Not sure if that's something on my side, aiosip side or else.

@vodik
Copy link
Contributor

vodik commented Apr 19, 2018

Yeah, its a thin wrapper around socket.sendto which expects an actual address relevant to the given socket family. DNS resolution will have to happen separately.

https://docs.python.org/3/library/socket.html#socket.socket.sendto

@ovv
Copy link
Contributor Author

ovv commented Apr 20, 2018

I believe passing a hostname is authorized.

A pair (host, port) is used for the AF_INET address family, where host is a string representing either a hostname in Internet domain notation like 'daring.cwi.nl' or an IPv4 address like '100.50.200.5', and port is an integer.

https://docs.python.org/3/library/socket.html#socket-families

But it's probably a bug on my laptop since it's working fine on TCP. Just wanted to have it here in the slim chance it's not and someone else stumble on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants