[asterisk-commits] file: trunk r374852 - in /trunk: ./ channels/chan_motif.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 11 11:06:32 CDT 2012
Author: file
Date: Thu Oct 11 11:06:28 2012
New Revision: 374852
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374852
Log:
Fix an issue where outgoing calls would fail to establish audio due to ICE negotiation failures.
This change removes the requirement for ufrag and pwd in the transport stanza and also
makes us the controlling agent.
........
Merged revisions 374850 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/channels/chan_motif.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/channels/chan_motif.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_motif.c?view=diff&rev=374852&r1=374851&r2=374852
==============================================================================
--- trunk/channels/chan_motif.c (original)
+++ trunk/channels/chan_motif.c Thu Oct 11 11:06:28 2012
@@ -1738,6 +1738,7 @@
struct jingle_session *session;
struct ast_channel *chan;
enum jingle_transport transport = JINGLE_TRANSPORT_NONE;
+ struct ast_rtp_engine_ice *ice;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(name);
AST_APP_ARG(target);
@@ -1841,6 +1842,15 @@
jingle_enable_video(session);
}
+ /* As this is outgoing set ourselves as controlling */
+ if (session->rtp && (ice = ast_rtp_instance_get_ice(session->rtp))) {
+ ice->ice_lite(session->rtp);
+ }
+
+ if (session->vrtp && (ice = ast_rtp_instance_get_ice(session->vrtp))) {
+ ice->ice_lite(session->vrtp);
+ }
+
/* We purposely don't decrement the session here as there is a reference on the channel */
ao2_link(endpoint->state->sessions, session);
@@ -1948,13 +1958,9 @@
return -1;
}
- if (ast_strlen_zero(ufrag) || ast_strlen_zero(pwd)) {
- jingle_queue_hangup_with_cause(session, AST_CAUSE_PROTOCOL_ERROR);
- ast_log(LOG_ERROR, "Invalid ICE-UDP transport information received on session '%s', ufrag or pwd not present\n", session->sid);
- return -1;
- }
-
- ice->set_authentication(rtp, ufrag, pwd);
+ if (!ast_strlen_zero(ufrag) && !ast_strlen_zero(pwd)) {
+ ice->set_authentication(rtp, ufrag, pwd);
+ }
for (candidate = iks_child(transport); candidate; candidate = iks_next(candidate)) {
char *component = iks_find_attrib(candidate, "component"), *foundation = iks_find_attrib(candidate, "foundation");
More information about the asterisk-commits
mailing list