summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgsmevent admin <admin@gsmevent.box>2018-12-26 15:14:14 +0100
committergsmevent admin <admin@gsmevent.box>2018-12-27 17:50:44 +0100
commitf696c1316442a8c4e0e3bb0f995cf80d0867b284 (patch)
tree56af931acb9297806b577cbf3ce28c99ab0126b5
parenta4f3c219d25ff51a1ed952649d7b9c9903c7192f (diff)
working sipheader for P-Access-Network-Info in MO/invites
-rw-r--r--src/sip.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sip.c b/src/sip.c
index 6a47577..9748cfe 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -416,6 +416,7 @@ static int send_invite(struct sip_agent *agent, struct sip_call_leg *leg,
const char *calling_num, const char *called_num)
{
struct call_leg *other = leg->base.call->initial;
+ char *paccess_rat_hdr = "";
char *from = talloc_asprintf(leg, "sip:%s@%s:%d",
calling_num,
@@ -429,14 +430,14 @@ static int send_invite(struct sip_agent *agent, struct sip_call_leg *leg,
switch (leg->base.call->ran) {
case 1:
- nua_set_hparams(leg->nua_handle, SIPTAG_HEADER_STR("P-Access-Network-Info: 3GPP-GERAN"), TAG_END());
+ paccess_rat_hdr = "P-Access-Network-Info: 3GPP-GERAN";
break;
case 2:
- nua_set_hparams(leg->nua_handle, SIPTAG_HEADER_STR("P-Access-Network-Info: 3GPP-UTRAN"), TAG_END());
+ paccess_rat_hdr = "P-Access-Network-Info: 3GPP-UTRAN";
break;
case 0:
default:
- nua_set_hparams(leg->nua_handle, SIPTAG_HEADER_STR("P-Access-Network-Info: 3GPP-UNKNOWN"), TAG_END());
+ paccess_rat_hdr = "P-Access-Network-Info: 3GPP-UNKNOWN";
break;
}
@@ -445,6 +446,7 @@ static int send_invite(struct sip_agent *agent, struct sip_call_leg *leg,
nua_invite(leg->nua_handle,
SIPTAG_FROM_STR(from),
SIPTAG_TO_STR(to),
+ SIPTAG_HEADER_STR(paccess_rat_hdr),
NUTAG_MEDIA_ENABLE(0),
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
SIPTAG_PAYLOAD_STR(sdp),