[asterisk-dev] [Code Review] SIP various transport type issues
David Vossel
dvossel at digium.com
Tue Jun 9 09:59:44 CDT 2009
> On 2009-06-09 00:40:24, jthurman wrote:
> > /trunk/channels/chan_sip.c, line 16724
> > <http://reviewboard.digium.com/r/278/diff/1/?file=5592#file5592line16724>
> >
> > if (create_addr(p, a->argv[i], NULL, 1)) {
I've assigned myself issue #15283, but I don't believe it belongs in this patch. This was not intended to be a cleanup of all transport issues, only those associated with issue #13865. Sorry for the confusion. I should have picked a better title for this review.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/278/#review837
-----------------------------------------------------------
On 2009-06-08 18:38:22, David Vossel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/278/
> -----------------------------------------------------------
>
> (Updated 2009-06-08 18:38:22)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> This is a combination of patches from vrban, mmichelson, and myself relating to (issue #13865).
>
> What this patch addresses:
>
> 1. ast_sip_ouraddrfor() by default binds to the UDP address/port reguardless if the sip->pvt is of type UDP or not. Now when no remapping is required, ast_sip_ouraddrfor() checks the sip_pvt's transport type, attempting to set the address and port to the correct TCP/TLS bindings if necessary.
>
> 2. It is not necessary to send the port number in the Contact header unless the port is non-standard for the transport type. This patch fixes this and removes the todo note.
>
> 3. In sip_alloc(), the default dialog built always uses transport type UDP. Now sip_alloc() looks at the sip_request (if present) and determines what transport type to use by default.
>
> 4. When changing the transport type of a sip_socket, the file descriptor must be set to -1 and in some cases the tcptls_session's ref count must be decremented and set to NULL. I've encountered several issues associated with this process and have created a function, set_socket_transport(), to handle the setting of the socket type.
>
>
> This addresses bug 13865.
> https://issues.asterisk.org/view.php?id=13865
>
>
> Diffs
> -----
>
> /trunk/channels/chan_sip.c 199297
>
> Diff: http://reviewboard.digium.com/r/278/diff
>
>
> Testing
> -------
>
> It appears through issue notes that vrban has tested items 1-3. I have only reviewed/cleaned up a few possible errors and done sanity checks on them. I have tested item 4. The function was previously used only for changing a peer's transport type. I simply expanded it to be used every time any socket's transport type is changed
>
>
> Thanks,
>
> David
>
>
More information about the asterisk-dev
mailing list