Holger Freyther has submitted this change and it was merged.
Change subject: sip: Actually honor the remote port of the pbx
..
sip: Actually honor the remote port of the pbx
So far the remote_port has never been used. sofia-sip did the right
thing and put the port into the "Contact" and the rport option for
the via. But we would have never been able to connect a PBX on a
different port (as sofia-sip seems to parse the destination from the
to address).
Change-Id: Ifbd49b4aa6b01b118fe67e39dddef50b2946159c
---
M src/sip.c
1 file changed, 6 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
Holger Freyther: Looks good to me, approved
diff --git a/src/sip.c b/src/sip.c
index afff393..348f478 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -293,12 +293,14 @@
{
struct call_leg *other = leg->base.call->initial;
- char *from = talloc_asprintf(leg, "sip:%s@%s",
+ char *from = talloc_asprintf(leg, "sip:%s@%s:%d",
calling_num,
- agent->app->sip.local_addr);
- char *to = talloc_asprintf(leg, "sip:%s@%s",
+ agent->app->sip.local_addr,
+ agent->app->sip.local_port);
+ char *to = talloc_asprintf(leg, "sip:%s@%s:%d",
called_num,
- agent->app->sip.remote_addr);
+ agent->app->sip.remote_addr,
+ agent->app->sip.remote_port);
char *sdp = sdp_create_file(leg, other);
leg->state = SIP_CC_INITIAL;
--
To view, visit https://gerrit.osmocom.org/1990
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbd49b4aa6b01b118fe67e39dddef50b2946159c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther
Gerrit-Reviewer: Holger Freyther
Gerrit-Reviewer: Jenkins Builder