[Asterisk-code-review] res rtp: Fix regression when IPv6 is not available. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Wed Nov 30 08:29:21 CST 2016


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/4487 )

Change subject: res_rtp: Fix regression when IPv6 is not available.
......................................................................


Patch Set 5:

(1 comment)

https://gerrit.asterisk.org/#/c/4487/5/res/res_pjsip_sdp_rtp.c
File res/res_pjsip_sdp_rtp.c:

Line 1527: 	prm.tp_type = PJSIP_TRANSPORT_UDP6;
> While I agree should I check for all three to be active (and condition) or 
If any are active then an IPv6 SIP transport can be used and media will go over IPv6 (so RTP will also be IPv6 in the SDP). Media itself doesn't flow over the SIP transport, so the fact it's TCP/TLS/UDP doesn't matter - just that IPv6 is potentially going to be used for the SIP traffic.

As for the task the function to use is ast_sip_push_task_synchronous and it takes a serializer, function, and data. You don't need to fill out the serializer or data. You can just pass it the function to invoke.

This is done because PJSIP requires things to be done on a thread registered with it and using a task guarantees that. In this case you would put the logic which ends up setting ast_sockaddr_parse in the function and then use the synchronous API call from load_module to run it.

static int determine_bind_address(void *ignore)
{
return 0;
}

ast_sip_push_task_synchronous(NULL, determine_bind_address, NULL);


-- 
To view, visit https://gerrit.asterisk.org/4487
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I627a4e91795e821111e1cda523f083a40d0e0c3e
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list