Index: channels/chan_sip.c
===================================================================
--- channels/chan_sip.c	(revision 397757)
+++ channels/chan_sip.c	(revision 397758)
@@ -10566,7 +10566,7 @@
 
 	/* Setup audio address and port */
 	if (p->rtp) {
-		if (portno > 0) {
+		if (sa && portno > 0) {
 			start_ice(p->rtp);
 			ast_sockaddr_set_port(sa, portno);
 			ast_rtp_instance_set_remote_address(p->rtp, sa);
@@ -10614,7 +10614,7 @@
 
 	/* Setup video address and port */
 	if (p->vrtp) {
-		if (vportno > 0) {
+		if (vsa && vportno > 0) {
 			start_ice(p->vrtp);
 			ast_sockaddr_set_port(vsa, vportno);
 			ast_rtp_instance_set_remote_address(p->vrtp, vsa);
@@ -10632,7 +10632,7 @@
 
 	/* Setup text address and port */
 	if (p->trtp) {
-		if (tportno > 0) {
+		if (tsa && tportno > 0) {
 			start_ice(p->trtp);
 			ast_sockaddr_set_port(tsa, tportno);
 			ast_rtp_instance_set_remote_address(p->trtp, tsa);
@@ -10656,7 +10656,7 @@
 
 	/* Setup image address and port */
 	if (p->udptl) {
-		if (udptlportno > 0) {
+		if (isa && udptlportno > 0) {
 			if (ast_test_flag(&p->flags[1], SIP_PAGE2_SYMMETRICRTP) && ast_test_flag(&p->flags[1], SIP_PAGE2_UDPTL_DESTINATION)) {
 				ast_rtp_instance_get_remote_address(p->rtp, isa);
 				if (!ast_sockaddr_isnull(isa) && debug) {

Property changes on: .
___________________________________________________________________
Modified: branch-10-merged
   - /branches/10:1-328075,328120,328162,328207,328247,328317,328329,328428-328429,328448,328451,328541,328609,328611,328664,328717,328771,328824,328879,328936,328992,329055,329145,329200,329204,329257,329331,329334,329472,329528,329538,329614,329670,329710,329771,329896,329950,329952,329992,329995,330051,330108,330162,330204,330217,330312,330369,330434,330576,330579,330586,330649,330706,330763,330844,330899,330940,331039,331041,331097,331139,331143,331147-331200,331265,331316,331418,331420,331462,331518,331576,331579,331644,331654,331659,331715,331772,331775,331868,331894,331956,332022,332027,332029,332042,332101,332119,332177,332265,332321,332369,332447,332504,332560,332654,332700,332756,332761,332830,332875-332878,332940,333011,333115,333203,333266,333268,333370,333410,333570,333681,333716,333786,333837,333895,333961-333962,334007,334010,334013,334064,334157,334230,334235,334297,334357,334455,334514,334617,334621,334682,334747,334841,334844,334954,335014,335260,335321,335323,335346,335434,335510,335653,335656,335721,335791,335852,335912,335991,336042,336091,336094,336167,336235,336307,336313,336316,336381,336441,336500,336502,336570,336573,336659,336717,336734,336789,336792,336878,336936,336978,337008,337062,337116,337119,337178,337219,337261,337263,337342,337345,337380,337431,337487,337542,337595-337597,337721,337775,337840,337902,337974,338085,338225,338228,338253,338323,338417,338552,338556,338664,338719,338801,338904,338950,338995,338997,339011,339043,339045,339088-339089,339245,339298,339353,339407,339463-339585,339587-339721,339723-340576,340578-340718,340810,340879,340931,340971,341023,341089,341094,341122,341146,341148,341190,341255,341313,341315,341377,341380,341436,341486,341530,341580,341599,341665,341707,341718,341807,341810,341972,342017,342062,342183,342224,342277,342329,342381,342384,342436,342485,342488,342546,342603,342605,342662,342715,342770,342824,342870,342929,342991,343158,343192,343221,343277,343337,343393,343445,343533,343578,343580,343635,343677,343691,343743,343789,343852,343900,343944,344004,344049,344103,344159,344175,344216,344271,344334,344386,344440,344493,344537,344540,344557,344609,344662,344716,344770,344836,344839,344842,344845,344900,344966,345117,345161,345164,345220,345275,345290,345371,345432,345488,345558,345640,345683,345830,345882,345924,345977,346029,346031,346040,346087,346145,346198,346240,346293,346349,346565,346698,346701,346763,346856,346900,346952,346955,347007,347068,347124,347146,347167,347240,347293,347344,347383,347439,347532,347600,347656,347727,347812,347953,347996,348102,348155,348158,348211,348265,348311,348363,348405,348465,348517,348605,348648,348736,348790,348793,348845-348846,348889,348952,348993,349045,349145,349195,349248,349250,349290,349340,349451,349502,349505,349532,349559,349608,349619,349673,349729,349732,349820,349822,349873,349928,349977,350024,350076,350129,350180,350221,350312,350415,350453,350502,350550,350553,350585,350680,350731,350734,350737,350790,350838,350886,350889,350938,350976,350978,351028,351081,351131,351183,351234,351286,351289,351308,351408,351451,351505,351560,351612,351646,351708,351762,351816,351818,351861,352015,352017,352035,352091,352149,352228,352231,352292,352373,352430,352512,352515-352516,352520,352556,352651,352705,352756,352817,352863,352956,352965,352992,353039,353078,353127,353176,353261,353321,353369,353397,353463,353503,353551,353599,353721,353771,353820,353868,353916,353962,354000,354119,354217,354270,354349,354493,354496,354543,354546,354548,354656,354703,354750,354836,354890,354938,354959,355010,355057,355137,355183,355229,355271,355320,355375,355449,355530,355575,355620,355623,355733,355747,355794,355851,355902,355905,355950,355953,355998,356074,356108,356215,356297,356428,356476,356522,356605,356651,356690,356798,356961,356964,357095,357213,357271,357318,357353,357357,357400,357405,357408,357421,357458,357497,357576,357620,357667,357762,357810,357812,357895,357941,357987,358017,358033,358116,358163,358215,358261,358284,358378,358436,358441,358485,358531,358644,358811,358944,358989,359051,359057,359060,359072,359091,359114,359117,359162,359212,359260,359355,359358,359453-359454,359458,359491,359509,359559,359620,359694,359707,359810,359898,359980,359982,360034,360088,360098,360139,360263,360310,360358,360361,360364,360414,360472,360489,360575,360672,360863,360885,360934,360993,361041,361091,361143,361208,361211,361270,361330,361333,361381,361422,361472,361522,361560,361607,362496,362537,362587,362678,362681,362730,362816,362869,362918,362998,363103,363107,363156,363212,363376,363429,363688,363734,363789,363876,363935,363987,364047,364065,364109,364163,364204,364259,364285,364342,364365-364369,364536,364579,364650,364707,364777,364787,364842,364845,364900,364903,364965,365083,365155,365160,365299,365320,365399,365475,365478,365575,365632,365701,365898,365990,366049,366053,366106,366168,366241,366297,366390,366412,366598,366741,366881,366948,367003,367028,367267,367299,367369,367417,367470,367562,367679,367731,367782,367844,367907,367978,367981,368042,368093,368267,368310,368407,368470,368499,368524,368536,368568,368587,368605,368629,368645,368721,368739,368760,368808,368831,368853,368885,368895,368899,368928,368947,369005,369044,369067,369091,369109,369147,369206,369215,369236,369239,369259,369263,369283,369303,369325,369328,369353,369369,369391,369437,369472,369491,369511,369558,369580,369627,369653,369709,369732,369751,369793,369819,369871,369938,369971,369994,370015,370025,370082,370132,370184,370206,370271,370274,370277,370384,370430,370432,370495,370547,370564,370643,370672,370698,370772,370798,370858,370901,370924,370954,370986,370989,371013,371022,371061,371090,371142,371199,371203,371271,371313,371338,371358,371394,371398,371437,371491,371529,371545,371591,371663,371691,371719,371748,371783,371789,371825,371861,371890,371920,371962,371999,372049,372090,372165,372198,372213,372240,372338,372341,372358,372372,372391,372418,372445,372472,372518,372522,372555,372582,372621,372625,372629,372656,372695,372710,372737,372764,372767,372805,372841,372863,372885,372916,372933,373025,373062,373101,373132,373237,373245,373300,373343,373440,373466,373468,373501,373505,373551,373579,373631,373633,373645,373665,373675,373703,373706,373737,373769,373774,373816,373849,373879,373910,373946,373990,374045,374132,374135,374178,374210,374231,374300,374336,374370,374385,374427,374476,374481,374537,374586,374652,374695,374728,374763,374803,374844,374906,374991,375026,375078,375112,375147,375190,375217,375273,375300,375326,375362,375389,375417,375451,375470,375485,375496,375531,375601,375626,375659,375728,375761,375794,375797,375801,375846,375863,375894,375965,375995,376030,376059,376088,376143,376167,376208,376233,376263,376308,376315,376342,376390,376414,376431,376470,376522,376587,376628,376658,376689,376726,376759,376789,376835,376865,376869,376916,376920,376951,377038,377070,377074,377105,377136,377166,377212,377227,377241,377258,377261,377354,377382,377399,377432,377504,377510,377592,377624,377656,377705,377709,377741,377772,377807,377838,377842,377848,377882,377923,377947,377992,378037,378089,378093,378120,378218,378286,378320,378683,378689,379510,379777,390223,397711
   + /branches/10:1-328075,328120,328162,328207,328247,328317,328329,328428-328429,328448,328451,328541,328609,328611,328664,328717,328771,328824,328879,328936,328992,329055,329145,329200,329204,329257,329331,329334,329472,329528,329538,329614,329670,329710,329771,329896,329950,329952,329992,329995,330051,330108,330162,330204,330217,330312,330369,330434,330576,330579,330586,330649,330706,330763,330844,330899,330940,331039,331041,331097,331139,331143,331147-331200,331265,331316,331418,331420,331462,331518,331576,331579,331644,331654,331659,331715,331772,331775,331868,331894,331956,332022,332027,332029,332042,332101,332119,332177,332265,332321,332369,332447,332504,332560,332654,332700,332756,332761,332830,332875-332878,332940,333011,333115,333203,333266,333268,333370,333410,333570,333681,333716,333786,333837,333895,333961-333962,334007,334010,334013,334064,334157,334230,334235,334297,334357,334455,334514,334617,334621,334682,334747,334841,334844,334954,335014,335260,335321,335323,335346,335434,335510,335653,335656,335721,335791,335852,335912,335991,336042,336091,336094,336167,336235,336307,336313,336316,336381,336441,336500,336502,336570,336573,336659,336717,336734,336789,336792,336878,336936,336978,337008,337062,337116,337119,337178,337219,337261,337263,337342,337345,337380,337431,337487,337542,337595-337597,337721,337775,337840,337902,337974,338085,338225,338228,338253,338323,338417,338552,338556,338664,338719,338801,338904,338950,338995,338997,339011,339043,339045,339088-339089,339245,339298,339353,339407,339463-339585,339587-339721,339723-340576,340578-340718,340810,340879,340931,340971,341023,341089,341094,341122,341146,341148,341190,341255,341313,341315,341377,341380,341436,341486,341530,341580,341599,341665,341707,341718,341807,341810,341972,342017,342062,342183,342224,342277,342329,342381,342384,342436,342485,342488,342546,342603,342605,342662,342715,342770,342824,342870,342929,342991,343158,343192,343221,343277,343337,343393,343445,343533,343578,343580,343635,343677,343691,343743,343789,343852,343900,343944,344004,344049,344103,344159,344175,344216,344271,344334,344386,344440,344493,344537,344540,344557,344609,344662,344716,344770,344836,344839,344842,344845,344900,344966,345117,345161,345164,345220,345275,345290,345371,345432,345488,345558,345640,345683,345830,345882,345924,345977,346029,346031,346040,346087,346145,346198,346240,346293,346349,346565,346698,346701,346763,346856,346900,346952,346955,347007,347068,347124,347146,347167,347240,347293,347344,347383,347439,347532,347600,347656,347727,347812,347953,347996,348102,348155,348158,348211,348265,348311,348363,348405,348465,348517,348605,348648,348736,348790,348793,348845-348846,348889,348952,348993,349045,349145,349195,349248,349250,349290,349340,349451,349502,349505,349532,349559,349608,349619,349673,349729,349732,349820,349822,349873,349928,349977,350024,350076,350129,350180,350221,350312,350415,350453,350502,350550,350553,350585,350680,350731,350734,350737,350790,350838,350886,350889,350938,350976,350978,351028,351081,351131,351183,351234,351286,351289,351308,351408,351451,351505,351560,351612,351646,351708,351762,351816,351818,351861,352015,352017,352035,352091,352149,352228,352231,352292,352373,352430,352512,352515-352516,352520,352556,352651,352705,352756,352817,352863,352956,352965,352992,353039,353078,353127,353176,353261,353321,353369,353397,353463,353503,353551,353599,353721,353771,353820,353868,353916,353962,354000,354119,354217,354270,354349,354493,354496,354543,354546,354548,354656,354703,354750,354836,354890,354938,354959,355010,355057,355137,355183,355229,355271,355320,355375,355449,355530,355575,355620,355623,355733,355747,355794,355851,355902,355905,355950,355953,355998,356074,356108,356215,356297,356428,356476,356522,356605,356651,356690,356798,356961,356964,357095,357213,357271,357318,357353,357357,357400,357405,357408,357421,357458,357497,357576,357620,357667,357762,357810,357812,357895,357941,357987,358017,358033,358116,358163,358215,358261,358284,358378,358436,358441,358485,358531,358644,358811,358944,358989,359051,359057,359060,359072,359091,359114,359117,359162,359212,359260,359355,359358,359453-359454,359458,359491,359509,359559,359620,359694,359707,359810,359898,359980,359982,360034,360088,360098,360139,360263,360310,360358,360361,360364,360414,360472,360489,360575,360672,360863,360885,360934,360993,361041,361091,361143,361208,361211,361270,361330,361333,361381,361422,361472,361522,361560,361607,362496,362537,362587,362678,362681,362730,362816,362869,362918,362998,363103,363107,363156,363212,363376,363429,363688,363734,363789,363876,363935,363987,364047,364065,364109,364163,364204,364259,364285,364342,364365-364369,364536,364579,364650,364707,364777,364787,364842,364845,364900,364903,364965,365083,365155,365160,365299,365320,365399,365475,365478,365575,365632,365701,365898,365990,366049,366053,366106,366168,366241,366297,366390,366412,366598,366741,366881,366948,367003,367028,367267,367299,367369,367417,367470,367562,367679,367731,367782,367844,367907,367978,367981,368042,368093,368267,368310,368407,368470,368499,368524,368536,368568,368587,368605,368629,368645,368721,368739,368760,368808,368831,368853,368885,368895,368899,368928,368947,369005,369044,369067,369091,369109,369147,369206,369215,369236,369239,369259,369263,369283,369303,369325,369328,369353,369369,369391,369437,369472,369491,369511,369558,369580,369627,369653,369709,369732,369751,369793,369819,369871,369938,369971,369994,370015,370025,370082,370132,370184,370206,370271,370274,370277,370384,370430,370432,370495,370547,370564,370643,370672,370698,370772,370798,370858,370901,370924,370954,370986,370989,371013,371022,371061,371090,371142,371199,371203,371271,371313,371338,371358,371394,371398,371437,371491,371529,371545,371591,371663,371691,371719,371748,371783,371789,371825,371861,371890,371920,371962,371999,372049,372090,372165,372198,372213,372240,372338,372341,372358,372372,372391,372418,372445,372472,372518,372522,372555,372582,372621,372625,372629,372656,372695,372710,372737,372764,372767,372805,372841,372863,372885,372916,372933,373025,373062,373101,373132,373237,373245,373300,373343,373440,373466,373468,373501,373505,373551,373579,373631,373633,373645,373665,373675,373703,373706,373737,373769,373774,373816,373849,373879,373910,373946,373990,374045,374132,374135,374178,374210,374231,374300,374336,374370,374385,374427,374476,374481,374537,374586,374652,374695,374728,374763,374803,374844,374906,374991,375026,375078,375112,375147,375190,375217,375273,375300,375326,375362,375389,375417,375451,375470,375485,375496,375531,375601,375626,375659,375728,375761,375794,375797,375801,375846,375863,375894,375965,375995,376030,376059,376088,376143,376167,376208,376233,376263,376308,376315,376342,376390,376414,376431,376470,376522,376587,376628,376658,376689,376726,376759,376789,376835,376865,376869,376916,376920,376951,377038,377070,377074,377105,377136,377166,377212,377227,377241,377258,377261,377354,377382,377399,377432,377504,377510,377592,377624,377656,377705,377709,377741,377772,377807,377838,377842,377848,377882,377923,377947,377992,378037,378089,378093,378120,378218,378286,378320,378683,378689,379510,379777,390223,397711,397757

