Using Opensips 1.6 ->
Can anyone tell me what I'm doing wrong here?
if (is_present_hf("P-Called-Party-Id")) {
append_hf("GW: EPSILON\r\n");
$avp(oriUri) =
$(hdr(P-Called-Party-Id){s.substr,5,12});
xlog("L_INFO", "Reply user now equals $avp(oriUri)
from P-Called-Party-Id");
}
Here is the packet that should hit this block:
[email protected] sip:NUMBER@HOST:5060 SIP/2.0
Via: SIP/2.0/UDP REMOTEHOST:5060;branch=z9hG4bKbkr26a0010bgsbs5b640.1
Max-Forwards: 66
From: "NUMBER" <sip:NUMBER@HOST>;tag=SDd4l3002-as19e30264
To: <sip:NUMBER@HOST>
Contact: <sip:NUMBER@HOST:5060;transport=udp>;nat=yes
CSeq: 103 INVITE
P-Called-Party-Id: <sip:NUMBER@HOST:5060>
Allow: INVITE, ACK, CANCEL, BYE
As you can see - there is definitely a P-Called-Party-Id...
The daemon.log actually shows the avp being set:
/usr/sbin/opensips[13365]: Reply user now equals NUMBER from
P-Called-Party-Id
That's the only place in my config where I'm setting the $avp at all.
And yet - I've added a bunch of header fields that help me watch where a
packet routes through the code:
GW: ALPHA
GW: CHARLIE
GW: NOVEMBER
GW: SIERRA
GW: TANGO
GW: WILCO
GW: XRAY
GW: ZULU
The header "GW: EPSILON" should be added if the packet were routed through
that block of code - and it's not...
I don't get it. The functionality that I'm aiming for isn't working
(resetting the outbound Contact to the inbound URI of the original request -
but there's an Asterisk box in the way so it's the same as referencing two
requests prior).
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users