diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-09-20 12:50:30 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-09-20 12:50:30 -0500 |
commit | 177557bc00b59a1ef6c64cf2ca86cebe18d227d6 (patch) | |
tree | 95b5c89e7e0a6632facbfafb684c412f3d0c305d /res | |
parent | 34461b89ace3742056100bb226a3c0c2d90ca5ff (diff) | |
parent | 449719be008f8b7073d350f587c93159afa8f37f (diff) |
Merge "res_pjsip_multihomed: Change Contact port to listening port." into 13
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip_multihomed.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/res/res_pjsip_multihomed.c b/res/res_pjsip_multihomed.c index 745bc37ea..d52f6e406 100644 --- a/res/res_pjsip_multihomed.c +++ b/res/res_pjsip_multihomed.c @@ -109,8 +109,11 @@ static pj_status_t multihomed_on_tx_message(pjsip_tx_data *tdata) return PJ_SUCCESS; } - /* The port in the message should always be that of the original transport */ - prm.ret_port = tdata->tp_info.transport->local_name.port; + /* For UDP we can have multiple transports so the port needs to be maintained */ + if (tdata->tp_info.transport->key.type == PJSIP_TRANSPORT_UDP || + tdata->tp_info.transport->key.type == PJSIP_TRANSPORT_UDP6) { + prm.ret_port = tdata->tp_info.transport->local_name.port; + } /* If the IP source differs from the existing transport see if we need to update it */ if (pj_strcmp(&prm.ret_addr, &tdata->tp_info.transport->local_name.host)) { |