-
Notifications
You must be signed in to change notification settings - Fork 84
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
add filter_registrar option #1160
Conversation
68b0bd1
to
918b22c
Compare
src/sip/transp.c
Outdated
&transp->laddr, | ||
sip_transp_name(transp->tp)); | ||
sip_transp_name(transp->tp), | ||
sa_port(&transp->laddr) ? "" : "not "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use positive logic?
- print "(listening)" only if listening is enabled
- print nothing if it is not enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this function should be adapted in general. Currently, if no listening socket is open for a transport, this function will print e.g.
172.21.0.1:0 (TCP) (not listening)
Not sure if that makes sense since there is no socket option. Maybe we should print something like:
transports:
UDP, TCP
transport sockets:
172.21.0.1:5060 (TCP)
and only list actually open sockets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated it. Now only listening sockets are listed and at the beginning the enabled transport protocols are listed. E.g.:
transports:
UDP
TCP
transport sockets:
10.0.0.5:5060 (TCP) (listening)
10.0.0.5:46080 (UDP) (listening)
connections:
connection configurations:
client transactions:
REGISTER COMPLETED 3s (z9hG4bK4053721133a7884a)
REGISTER COMPLETED 3s (z9hG4bK4914acbc12294034)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why then print "(listening)" on each line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Removed the "(listening)".
001c714
to
ecef413
Compare
src/sip/transp.c
Outdated
if (!transp->sock) { | ||
err = udp_listen((struct udp_sock **) | ||
&transp->sock, &transp->laddr, | ||
udp_recv_handler, transp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid to open the UDP listen socket if listen=false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like discussed: Please remove the changes 1518-1534. For UDP it makes no difference if the listen socket is opened at startup or at first REGISTER.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, with UDP a listening socket has to be opened regardless, so there's not really a point in not opening the socket when adding the transport. Done.
ecef413
to
91b6b57
Compare
to add SIP transport protocol without opening a listening socket and adapt sip_transp_send accordingly to make UDP work.
91b6b57
to
6579acf
Compare
transp.c: add sip_transp_add_sock
to add SIP transport protocol without opening a listening socket (UDP socket is always opened).
Related: