Hello Daniel,
I want do clean up on routes from first SUBSCRIBE, that when traffic goes to public side of kamailio will be only public route and when traffic is internal the Record-Route will stay internal only. In SDP I see like this.
I tired double routes set 0 in rr, but didn't clean enough.
<--- Transmitting (NAT) to 10.18.130.46:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.18.130.46;branch=z9hG4bKf852.e0223f39c2bbad8366fdf1b7cb22b336.0;i=8;received=10.18.130.46;rport=5060
Via: SIP/2.0/TCP 192.168.88.252:5062;received=client_pub_ipbranch=z9hG4bK0bbe1f7d27257bba9;rport=5062
Record-Route: <sip:10.18.130.46;r2=on;lr=on;ftag=a185d974ec;nat=yes> On public side remote this Record-Route
Record-Route: <sip:kamailio_pub_ip:5084;transport=tcp;r2=on;lr=on;ftag=a185d974ec;nat=yes> On private side remote this Record-Route
From: "Slava Bendersky" <sips:10101@networklab.ca>;tag=a185d974ec
To: <sips:10101@networklab.ca>;tag=as00757d3e
Call-ID: b08adb1ad1804a83
CSeq: 236711034 SUBSCRIBE
Server: FPBX-2.11.0(11.15.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 3600
Contact: <sip:10101@10.18.130.50:5060>;expires=3600
Content-Length: 0
Slava.
From: "Daniel-Constantin Mierla" <miconda@gmail.com>
To: "sr-users" <sr-users@lists.sip-router.org>
Sent: Monday, March 16, 2015 7:01:54 AM
Subject: Re: [SR-Users] remove_hf_value
Hello,
can you give an example of incoming header and how you want to be
after modification?
It is not clear for me what end result you want/expect.
Cheers,
Daniel
On 14/03/15 06:41, Slava Bendersky
wrote:
Hello Everyone,
Here updated version. Trying remove Record-Route after the
coma.
My log shows
Mar 14 01:25:21 canlvprx01 /usr/sbin/kamailio[751]: INFO:
<script>: [SUBSCRIBE], Inbound connection from
<Client Public IP>
Mar 14 01:25:21 canlvprx01 /usr/sbin/kamailio[751]: ERROR:
<script>: <null>
Mar 14 01:25:21 canlvprx01 /usr/sbin/kamailio[751]: INFO:
<script>: [SUBSCRIBE], Route for removal: '<null>'
route snippet.
route[ROUTE_HDR_ORG] {
# Getting record routes
if(is_present_hf("Route")) {
xlog("L_INFO", "[$rm], Inbound connection from
<$si>\n");
if(is_method("SUBSCRIBE")) {
if(is_ip_rfc1918($si)) {
xlog(
"$sel(@hf_value.Record_Route[-1])");
xlog("L_INFO", "[$rm], Route
for removal: '$sel(@hf_value.Record_Route[-1])'\n");
remove_hf_value("Record-Route[-1]");
} else {
xlog(
"$sel(@hf_value.Record_Route[1])");
xlog("L_INFO", "[$rm], Route
for removal: '$sel(@hf_value.Record_Route[1])'\n");
remove_hf_value("Record-Route[1]");
}
}
}
return;
}
Slava,
Hello Everyone,
I am trying adjust Record-Route, but can't match
headers value
And I am call route(ROUTE_HDR_ORG); right after
route(WITHINDLG);
route[ROUTE_HDR_ORG] {
# Getting record routes
if(is_present_hf("Record-Route")) {
if(is_method("SUBSCRIBE")) {
xlog(
"$sel(@hf_value.Record_Route[1])");
xlog("L_INFO", "[$rm], Route for
removal: '$sel(@hf_value.Record_Route[1])'\n");
remove_hf_value("Record-Route[1]");
}
}
return;
}
Any help Thank you,
Slava.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users