Posted: Tue May 12, 2009 9:02 pm Post subject: [asterisk-dev] [Code Review] SIP set outbound transport type
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/249/
-----------------------------------------------------------
Review request for Asterisk Developers.
Summary
-------
In sip.conf the transport option allows for the configuration of what transport types (udp, tcp, and tls) a peer will accept, but only the first type listed is used for outbound connections.
Example:
transport = tcp, udp (peer will accept tcp or udp inbound, but will only make outbound requests using tcp)
If the peer registers using UDP and specifies UDP in the Contact header, Asterisk currently forces all outbound requests to that peer to use TCP.
This patch fixes this. Now the default transport type is only used until the peer registers. When registration takes place the transport type is parsed out of the Contact header. If the Contact header's transport type is equal to one that the peer supports, the peer's default transport type for outbound connections is set to match the Contact header's type. If the Contact header's transport type is not present, then the peer's default transport type is set to match the one the peer registered with.
tested using qualify and transport = tcp,udp. Asterisk sends Options requests to a peer using tcp before the peer registers. Once the peer registers using UDP Asterisk starts sending the Option requests using UDP. Tested invites after registration as well, Asterisk uses UDP instead of TCP.
Thanks,
David
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Thu May 14, 2009 9:47 pm Post subject: [asterisk-dev] [Code Review] SIP set outbound transport type
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/249/
-----------------------------------------------------------
(Updated 2009-05-14 17:39:42.540935)
Review request for Asterisk Developers.
Changes
-------
UPDATE: If the peer registers with a transport type other than the default, and the registration expires, the original default transport type is now restored.
Summary
-------
In sip.conf the transport option allows for the configuration of what transport types (udp, tcp, and tls) a peer will accept, but only the first type listed is used for outbound connections.
Example:
transport = tcp, udp (peer will accept tcp or udp inbound, but will only make outbound requests using tcp)
If the peer registers using UDP and specifies UDP in the Contact header, Asterisk currently forces all outbound requests to that peer to use TCP.
This patch fixes this. Now the default transport type is only used until the peer registers. When registration takes place the transport type is parsed out of the Contact header. If the Contact header's transport type is equal to one that the peer supports, the peer's default transport type for outbound connections is set to match the Contact header's type. If the Contact header's transport type is not present, then the peer's default transport type is set to match the one the peer registered with.
tested using qualify and transport = tcp,udp. Asterisk sends Options requests to a peer using tcp before the peer registers. Once the peer registers using UDP Asterisk starts sending the Option requests using UDP. Tested invites after registration as well, Asterisk uses UDP instead of TCP.
Thanks,
David
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Thu May 21, 2009 4:18 pm Post subject: [asterisk-dev] [Code Review] SIP set outbound transport type
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/249/
-----------------------------------------------------------
(Updated 2009-05-21 12:04:58.609652)
Review request for Asterisk Developers.
Changes
-------
The last patch only reset the default transport type for a peer when the registration expired. This new one resets the transport type when the peer Unregisters as well. I thought the same logic was used for both Unregistering and registration expiration, but I was wrong.
Summary
-------
In sip.conf the transport option allows for the configuration of what transport types (udp, tcp, and tls) a peer will accept, but only the first type listed is used for outbound connections.
Example:
transport = tcp, udp (peer will accept tcp or udp inbound, but will only make outbound requests using tcp)
If the peer registers using UDP and specifies UDP in the Contact header, Asterisk currently forces all outbound requests to that peer to use TCP.
This patch fixes this. Now the default transport type is only used until the peer registers. When registration takes place the transport type is parsed out of the Contact header. If the Contact header's transport type is equal to one that the peer supports, the peer's default transport type for outbound connections is set to match the Contact header's type. If the Contact header's transport type is not present, then the peer's default transport type is set to match the one the peer registered with.
tested using qualify and transport = tcp,udp. Asterisk sends Options requests to a peer using tcp before the peer registers. Once the peer registers using UDP Asterisk starts sending the Option requests using UDP. Tested invites after registration as well, Asterisk uses UDP instead of TCP.
Thanks,
David
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Fri May 22, 2009 3:45 pm Post subject: [asterisk-dev] [Code Review] SIP set outbound transport type
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/249/#review793
-----------------------------------------------------------
Ship it!
This looks like an excellent improvement to me. Nice work, David!
You're not actually returning a value that is guaranteed to be in the enum if you're combining them together. So, I would declare this return value as an int, and document that it is an a bit field of transport types from the enum.
- Russell
On 2009-05-21 12:04:58, David Vossel wrote:
Quote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/249/
-----------------------------------------------------------
(Updated 2009-05-21 12:04:58)
Review request for Asterisk Developers.
Summary
-------
In sip.conf the transport option allows for the configuration of what transport types (udp, tcp, and tls) a peer will accept, but only the first type listed is used for outbound connections.
Example:
transport = tcp, udp (peer will accept tcp or udp inbound, but will only make outbound requests using tcp)
If the peer registers using UDP and specifies UDP in the Contact header, Asterisk currently forces all outbound requests to that peer to use TCP.
This patch fixes this. Now the default transport type is only used until the peer registers. When registration takes place the transport type is parsed out of the Contact header. If the Contact header's transport type is equal to one that the peer supports, the peer's default transport type for outbound connections is set to match the Contact header's type. If the Contact header's transport type is not present, then the peer's default transport type is set to match the one the peer registered with.
tested using qualify and transport = tcp,udp. Asterisk sends Options requests to a peer using tcp before the peer registers. Once the peer registers using UDP Asterisk starts sending the Option requests using UDP. Tested invites after registration as well, Asterisk uses UDP instead of TCP.
Thanks,
David
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum