Index: app_externalivr.c =================================================================== --- app_externalivr.c (revision 225954) +++ app_externalivr.c (working copy) @@ -454,9 +454,9 @@ } ast_gethostbyname(hostname, &hp); - ivr_desc.local_address.sin_family = AF_INET; - ivr_desc.local_address.sin_port = htons(port); - memcpy(&ivr_desc.local_address.sin_addr.s_addr, hp.hp.h_addr, hp.hp.h_length); + ivr_desc.remote_address.sin_family = AF_INET; + ivr_desc.remote_address.sin_port = htons(port); + memcpy(&ivr_desc.remote_address.sin_addr.s_addr, hp.hp.h_addr, sizeof(hp.hp.h_addr)); if (!(ser = ast_tcptls_client_create(&ivr_desc)) || !(ser = ast_tcptls_client_start(ser))) { goto exit; }