I am using ser 0.8.11 with redhat 9. I am not using mysql or authentication and currently have a pretty simple config due to my limited programming skills. I have orig phone A registered to SER and have SER rewriting A's INVITES so our softswitch will be happy. Terminating phone B is registered to our softswitch.
Phone A can call a phone B and 2 way voice is established. Phone B can terminate the call and the session will end. All is ok until I try and use Record-Route (by removing comment #) in my ser.cfg below.
Using Record-Route, when the terminating phone answers, the 200 OK will propagate all the way through SER and to the originating phone but at this point the ACK will not get sent back by SER. Because of this our softswitch will continue to send the 200 OK and after some time it gives up and terminates both legs with BYE's. Please reference the attached sip_scenario trace file (which has end packets removed to conserve space)
Could someone suggest how I might use Record-Route properly?
Thanks in advance!
Tim =========================================
(10.16.1.218) is SER registered phone who initiates call 10.16.1.147 is SER 172.17.4.102 is our softswitch acting as back2back user agent. (10.16.1.214) is softswitch registered phone answers/terminates call. ================================================ Here is routing logic:
# main routing logic
route{
# initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; };
if (method=="INVITE") { rewritehostport("172.17.4.102"); # record_route(); t_relay(); # forward (172.17.4.102, 5060); };
# we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol #record_route(); # loose-route processing #if (loose_route()) { # t_relay(); # break; #};
# if the request is for other domain use UsrLoc # (in case, it does not work, use the following command # with proper names and addresses in it) if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication # if (!www_authorize("iptel.org", "subscriber")) { # www_challenge("iptel.org", "0"); # break; # };
save("location"); break; };
# native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; }; # forward to current uri now; use stateful forwarding; that # works reliably even if we forward from TCP to UDP #if (!t_relay()) { # sl_reply_error(); #};
}
<<test3.txt>>
Hello,
did you uncomment the loose_route() statement as well ? Can you send me also ser logs ?
Jan.
On 19-11 16:23, Garey, Tim wrote:
I am using ser 0.8.11 with redhat 9. I am not using mysql or authentication and currently have a pretty simple config due to my limited programming skills. I have orig phone A registered to SER and have SER rewriting A's INVITES so our softswitch will be happy. Terminating phone B is registered to our softswitch.
Phone A can call a phone B and 2 way voice is established. Phone B can terminate the call and the session will end. All is ok until I try and use Record-Route (by removing comment #) in my ser.cfg below.
Using Record-Route, when the terminating phone answers, the 200 OK will propagate all the way through SER and to the originating phone but at this point the ACK will not get sent back by SER. Because of this our softswitch will continue to send the 200 OK and after some time it gives up and terminates both legs with BYE's. Please reference the attached sip_scenario trace file (which has end packets removed to conserve space)
Could someone suggest how I might use Record-Route properly?
Thanks in advance!
Tim
(10.16.1.218) is SER registered phone who initiates call 10.16.1.147 is SER 172.17.4.102 is our softswitch acting as back2back user agent. (10.16.1.214) is softswitch registered phone answers/terminates call. ================================================ Here is routing logic:
# main routing logic
route{
# initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; };
if (method=="INVITE") { rewritehostport("172.17.4.102"); # record_route(); t_relay(); # forward (172.17.4.102, 5060); };
# we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol #record_route(); # loose-route processing #if (loose_route()) { # t_relay(); # break; #};
# if the request is for other domain use UsrLoc # (in case, it does not work, use the following command # with proper names and addresses in it) if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication # if (!www_authorize("iptel.org", "subscriber")) { # www_challenge("iptel.org", "0"); # break; # };
save("location"); break; }; # native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; };
}; # forward to current uri now; use stateful forwarding; that # works reliably even if we forward from TCP to UDP #if (!t_relay()) { # sl_reply_error(); #};
}
<<test3.txt>>
Sip Scenario Trace
File: test3.dump Generated: Wed Nov 19 16:05:42 2003 Traced on: Wed Nov 19 15:49:04 2003 Created by:sip_scenario version=1.1.0
10.16.1.218 10.16.1.147 172.17.4.102 10.16.1.214 | | | | <Call><PFrame><Time> | | | | | F1 INVITE (sdp) | | | |>---------------->| | | 1 PF:1 15:49:4.9232 | | | | | ant to us 100 F2 | | | |<----------------<| | | 1 PF:2 15:49:4.9242 | | | | | | F3 INVITE (sdp) | | | |>---------------->| | 1 PF:5 15:49:4.9254 | | | | | | Trying 100 F4 | | | |<----------------<| | 1 PF:6 15:49:4.9333 | | | | | | | F5 INVITE (sdp) | | | |>---------------->| 2 PF:7 15:49:4.9384 | | | | | | | Ringing 180 F6 | | | |<----------------<| 2 PF:8 15:49:5.3980 | | | | | | Ringing 180 F7 | | | |<----------------<| | 1 PF:9 15:49:5.4040 | | | | | Ringing 180 F8 | | | |<----------------<| | | 1 PF:10 15:49:5.4047 | | | | | | | (sdp) OK 200 F9 | | | |<----------------<| 2 PF:11 15:49:9.4794 | | | | | | | F10 ACK | | | |>---------------->| 2 PF:12 15:49:9.4854 | | | | | | (sdp) OK 200 F11 | | | |<----------------<| | 1 PF:13 15:49:9.4883 | | | | | (sdp) OK 200 F12 | | | |<----------------<| | | 1 PF:14 15:49:9.4892 | | | | | F13 ACK | | | |>---------------->| | | 1 PF:15 15:49:9.8257 | | | | | | (sdp) OK 200 F14 | | | |<----------------<| | 1 PF:18 15:49:9.9930 | | | | | (sdp) OK 200 F15 | | | |<----------------<| | | 1 PF:19 15:49:9.9938 | | | | | F16 ACK | | | |>---------------->| | | 1 PF:20 15:49:10.0412 | | | | | | (sdp) OK 200 F17 | | | |<----------------<| | 1 PF:21 15:49:11.0032 | | | | | (sdp) OK 200 F18 | | | |<----------------<| | | 1 PF:22 15:49:11.0041 | | | | | F19 ACK | | | |>---------------->| | | 1 PF:23 15:49:11.0503 | | | | | | (sdp) OK 200 F20 | | | |<----------------<| | 1 PF:24 15:49:13.0137
================================================================================
SIP MESSAGE 1 10.16.1.218:5060() -> 10.16.1.147:5060() UDP Frame 1 19/Nov/03 15:49:4.9232 TimeFromPreviousSipFrame=0.0000 TimeFromStart=0.0000
INVITE sip:6032251114@10.16.1.147:5060 SIP/2.0 Via: SIP/2.0/UDP 10.16.1.218:5060 To: sip:6032251114@10.16.1.147:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 CSeq: 1745607253 INVITE Supported: timer Min-SE: 5 Content-Type: application/sdp Content-Length: 220 Contact: 6037534033 sip:6037534033@10.16.1.218:5060 Supported: replaces
v=0 o=MxSIP 0 1069207096 IN IP4 10.16.1.218 s=SIP Call c=IN IP4 10.16.1.218 t=0 0 m=audio 5010 RTP/AVP 0 8 4 100 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:4 G723/8000 a=rtpmap:100 telephone-event/8000
================================================================================
SIP MESSAGE 2 10.16.1.147:5060() -> 10.16.1.218:5060() UDP Frame 2 19/Nov/03 15:49:4.9242 TimeFromPreviousSipFrame=0.0010 TimeFromStart=0.0010
SIP/2.0 100 trying -- your call is important to us Via: SIP/2.0/UDP 10.16.1.218:5060 To: sip:6032251114@10.16.1.147:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 CSeq: 1745607253 INVITE Server: Sip EXpress router (0.8.11 (i386/linux)) Content-Length: 0 Warning: 392 10.16.1.147:5060 "Noisy feedback tells: pid=29065 req_src_ip=10.16.1.218 req_src_port=5060 in_uri=sip:6032251114@10.16.1.147:5060 out_uri=sip:6032251114@172.17.4.102 via_cnt==1"
================================================================================
SIP MESSAGE 3 10.16.1.147:5060() -> 172.17.4.102:5060() UDP Frame 5 19/Nov/03 15:49:4.9254 TimeFromPreviousSipFrame=0.0011 TimeFromStart=0.0021
INVITE sip:6032251114@172.17.4.102 SIP/2.0 Max-Forwards: 10 Record-Route: sip:6032251114@10.16.1.147;ftag=2d19a0f24373be0;lr Via: SIP/2.0/UDP 10.16.1.147;branch=z9hG4bKc8d4.0c28a9f.0 Via: SIP/2.0/UDP 10.16.1.218:5060 To: sip:6032251114@10.16.1.147:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 CSeq: 1745607253 INVITE Supported: timer Min-SE: 5 Content-Type: application/sdp Content-Length: 220 Contact: 6037534033 sip:6037534033@10.16.1.218:5060 Supported: replaces
v=0 o=MxSIP 0 1069207096 IN IP4 10.16.1.218 s=SIP Call c=IN IP4 10.16.1.218 t=0 0 m=audio 5010 RTP/AVP 0 8 4 100 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:4 G723/8000 a=rtpmap:100 telephone-event/8000
================================================================================
SIP MESSAGE 4 172.17.4.102:5060() -> 10.16.1.147:5060() UDP Frame 6 19/Nov/03 15:49:4.9333 TimeFromPreviousSipFrame=0.0080 TimeFromStart=0.0101
SIP/2.0 100 Trying Via: SIP/2.0/UDP 10.16.1.147;branch=z9hG4bKc8d4.0c28a9f.0 Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147
================================================================================
SIP MESSAGE 5 172.17.4.102:5060() -> 10.16.1.214:5060() UDP Frame 7 19/Nov/03 15:49:4.9384 TimeFromPreviousSipFrame=0.0051 TimeFromStart=0.0152
INVITE sip:6032251114@10.16.1.214 SIP/2.0 From: "6037534033" sip:6037534033@172.17.4.102;tag=1069274873-5907151069865588-11 To: sip:6032251114@10.16.1.214;user=phone Via: SIP/2.0/UDP 172.17.4.102:5060;branch=z9hG4bKSNCLLC1069865708 CSeq: 18 INVITE Contact: sip:6037534033@172.17.4.102:5060 Call-ID: 3784729601-2740955435689601-11 Max-Forwards: 70 Supported: 100rel Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER Content-Type: application/sdp Content-Length: 157
v=0 o=MxSIP 0 1069207096 IN IP4 10.16.1.218 s=SIP Call c=IN IP4 10.16.1.218 t=0 0 m=audio 5010 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
================================================================================
SIP MESSAGE 6 10.16.1.214:5060() -> 172.17.4.102:5060() UDP Frame 8 19/Nov/03 15:49:5.3980 TimeFromPreviousSipFrame=0.4596 TimeFromStart=0.4748
SIP/2.0 180 Ringing Call-ID: 3784729601-2740955435689601-11 CSeq: 18 INVITE From: "6037534033" sip:6037534033@172.17.4.102;tag=1069274873-5907151069865588-11 To: sip:6032251114@10.16.1.214;user=phone;tag=39cabed15d76494 Via: SIP/2.0/UDP 172.17.4.102:5060;branch=z9hG4bKSNCLLC1069865708 Content-Length: 0 Contact: 6032251114 sip:6032251114@10.16.1.214:5060
================================================================================
SIP MESSAGE 7 172.17.4.102:5060() -> 10.16.1.147:5060() UDP Frame 9 19/Nov/03 15:49:5.4040 TimeFromPreviousSipFrame=0.0060 TimeFromStart=0.4808
SIP/2.0 180 Ringing Via: SIP/2.0/UDP 10.16.1.147;branch=z9hG4bKc8d4.0c28a9f.0 Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 Contact: sip:6037534033@172.17.4.102:5060
================================================================================
SIP MESSAGE 8 10.16.1.147:5060() -> 10.16.1.218:5060() UDP Frame 10 19/Nov/03 15:49:5.4047 TimeFromPreviousSipFrame=0.0007 TimeFromStart=0.4815
SIP/2.0 180 Ringing Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 Contact: sip:6037534033@172.17.4.102:5060
================================================================================
SIP MESSAGE 9 10.16.1.214:5060() -> 172.17.4.102:5060() UDP Frame 11 19/Nov/03 15:49:9.4794 TimeFromPreviousSipFrame=4.0747 TimeFromStart=4.5562
SIP/2.0 200 OK Call-ID: 3784729601-2740955435689601-11 CSeq: 18 INVITE From: "6037534033" sip:6037534033@172.17.4.102;tag=1069274873-5907151069865588-11 To: sip:6032251114@10.16.1.214;user=phone;tag=39cabed15d76494 Via: SIP/2.0/UDP 172.17.4.102:5060;branch=z9hG4bKSNCLLC1069865708 Content-Length: 156 Content-Type: application/sdp Supported: replaces Contact: 6032251114 sip:6032251114@10.16.1.214:5060
v=0 o=MxSIP 0 519532447 IN IP4 10.16.1.214 s=SIP Call c=IN IP4 10.16.1.214 t=0 0 m=audio 5010 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
================================================================================
SIP MESSAGE 10 172.17.4.102:5060() -> 10.16.1.214:5060() UDP Frame 12 19/Nov/03 15:49:9.4854 TimeFromPreviousSipFrame=0.0060 TimeFromStart=4.5621
ACK sip:6032251114@10.16.1.214:5060 SIP/2.0 From: "6037534033" sip:6037534033@172.17.4.102;tag=1069274873-5907151069865588-11 To: sip:6032251114@10.16.1.214;user=phone;tag=39cabed15d76494 Via: SIP/2.0/UDP 172.17.4.102:5060;branch=z9hG4bKSNCLLC1069865708 Max-Forwards: 70 CSeq: 18 ACK Call-ID: 3784729601-2740955435689601-11 Contact: sip:6037534033@172.17.4.102:5060 Content-Length: 0
================================================================================
SIP MESSAGE 11 172.17.4.102:5060() -> 10.16.1.147:5060() UDP Frame 13 19/Nov/03 15:49:9.4883 TimeFromPreviousSipFrame=0.0029 TimeFromStart=4.5651
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.16.1.147;branch=z9hG4bKc8d4.0c28a9f.0 Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 Contact: sip:6037534033@172.17.4.102:5060 Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER Content-Type: application/sdp Content-Length: 156
v=0 o=MxSIP 0 519532447 IN IP4 10.16.1.214 s=SIP Call c=IN IP4 10.16.1.214 t=0 0 m=audio 5010 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
================================================================================
SIP MESSAGE 12 10.16.1.147:5060() -> 10.16.1.218:5060() UDP Frame 14 19/Nov/03 15:49:9.4892 TimeFromPreviousSipFrame=0.0009 TimeFromStart=4.5659
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 Contact: sip:6037534033@172.17.4.102:5060 Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER Content-Type: application/sdp Content-Length: 156
v=0 o=MxSIP 0 519532447 IN IP4 10.16.1.214 s=SIP Call c=IN IP4 10.16.1.214 t=0 0 m=audio 5010 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
================================================================================
SIP MESSAGE 13 10.16.1.218:5060() -> 10.16.1.147:5060() UDP Frame 15 19/Nov/03 15:49:9.8257 TimeFromPreviousSipFrame=0.3365 TimeFromStart=4.9024
ACK sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr SIP/2.0 Via: SIP/2.0/UDP 10.16.1.218:5060 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 CSeq: 1745607253 ACK Route: sip:6037534033@172.17.4.102:5060 Content-Length: 0 Contact: 6037534033 sip:6037534033@10.16.1.218:5060
================================================================================
SIP MESSAGE 14 172.17.4.102:5060() -> 10.16.1.147:5060() UDP Frame 18 19/Nov/03 15:49:9.9930 TimeFromPreviousSipFrame=0.1673 TimeFromStart=5.0698
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.16.1.147;branch=z9hG4bKc8d4.0c28a9f.0 Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 Contact: sip:6037534033@172.17.4.102:5060 Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER Content-Type: application/sdp Content-Length: 156
v=0 o=MxSIP 0 519532447 IN IP4 10.16.1.214 s=SIP Call c=IN IP4 10.16.1.214 t=0 0 m=audio 5010 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
================================================================================
SIP MESSAGE 15 10.16.1.147:5060() -> 10.16.1.218:5060() UDP Frame 19 19/Nov/03 15:49:9.9938 TimeFromPreviousSipFrame=0.0008 TimeFromStart=5.0706
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 Contact: sip:6037534033@172.17.4.102:5060 Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER Content-Type: application/sdp Content-Length: 156
v=0 o=MxSIP 0 519532447 IN IP4 10.16.1.214 s=SIP Call c=IN IP4 10.16.1.214 t=0 0 m=audio 5010 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
================================================================================
SIP MESSAGE 16 10.16.1.218:5060() -> 10.16.1.147:5060() UDP Frame 20 19/Nov/03 15:49:10.0412 TimeFromPreviousSipFrame=0.0474 TimeFromStart=5.1180
ACK sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr SIP/2.0 Via: SIP/2.0/UDP 10.16.1.218:5060 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 CSeq: 1745607253 ACK Route: sip:6037534033@172.17.4.102:5060 Content-Length: 0 Contact: 6037534033 sip:6037534033@10.16.1.218:5060
================================================================================
SIP MESSAGE 17 172.17.4.102:5060() -> 10.16.1.147:5060() UDP Frame 21 19/Nov/03 15:49:11.0032 TimeFromPreviousSipFrame=0.9620 TimeFromStart=6.0799
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.16.1.147;branch=z9hG4bKc8d4.0c28a9f.0 Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 Contact: sip:6037534033@172.17.4.102:5060 Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER Content-Type: application/sdp Content-Length: 156
v=0 o=MxSIP 0 519532447 IN IP4 10.16.1.214 s=SIP Call c=IN IP4 10.16.1.214 t=0 0 m=audio 5010 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
================================================================================
SIP MESSAGE 18 10.16.1.147:5060() -> 10.16.1.218:5060() UDP Frame 22 19/Nov/03 15:49:11.0041 TimeFromPreviousSipFrame=0.0009 TimeFromStart=6.0808
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 Contact: sip:6037534033@172.17.4.102:5060 Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER Content-Type: application/sdp Content-Length: 156
v=0 o=MxSIP 0 519532447 IN IP4 10.16.1.214 s=SIP Call c=IN IP4 10.16.1.214 t=0 0 m=audio 5010 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
================================================================================
SIP MESSAGE 19 10.16.1.218:5060() -> 10.16.1.147:5060() UDP Frame 23 19/Nov/03 15:49:11.0503 TimeFromPreviousSipFrame=0.0462 TimeFromStart=6.1270
ACK sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr SIP/2.0 Via: SIP/2.0/UDP 10.16.1.218:5060 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 CSeq: 1745607253 ACK Route: sip:6037534033@172.17.4.102:5060 Content-Length: 0 Contact: 6037534033 sip:6037534033@10.16.1.218:5060
================================================================================
SIP MESSAGE 20 172.17.4.102:5060() -> 10.16.1.147:5060() UDP Frame 24 19/Nov/03 15:49:13.0137 TimeFromPreviousSipFrame=1.9634 TimeFromStart=8.0904
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.16.1.147;branch=z9hG4bKc8d4.0c28a9f.0 Via: SIP/2.0/UDP 10.16.1.218:5060 From: 6037534033 sip:6037534033@10.16.1.147:5060;tag=2d19a0f24373be0 To: sip:6032251114@10.16.1.147:5060;tag=1069274873-5853181069860191-11 Record-Route: sip:6032251114@10.16.1.147:5060;ftag=2d19a0f24373be0;lr CSeq: 1745607253 INVITE Call-ID: 5d4fb4526189224bb30809f6c7086e87@10.16.1.147 Contact: sip:6037534033@172.17.4.102:5060 Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER Content-Type: application/sdp Content-Length: 156
v=0 o=MxSIP 0 519532447 IN IP4 10.16.1.214 s=SIP Call c=IN IP4 10.16.1.214 t=0 0 m=audio 5010 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hi All,
Hoping you regular expression gurus out there can help me out a bit.
I am wanting to rewrite the Contact header field inside a sip message using either the replace or subst from the textops module. I've done my best but complex/long regular expressions are just a bit beyond me.
I want to change Contact "potato" sip:99196026@ns.commverge.co.nz:5060 to Contact "potato" sip:99196026@sipsrv2.tranzpeer.net:5060.
So far I can change bits of it and almost get it right but I am still seeing the original contact right after the new one i.e: Contact "potato" sip:99196026@ns.commverge.co.nz:5060.sip:99196026@sipsrv2.tranzpeer.net:5060
HELP
Thanks in advance, Stephen
----------------------------------------------------------------------------------------------- This message and any attachments contain privileged and confidential information. If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify the sender immediately via email and then destroy this message and any attachments.
Stephen,
I hope you excuse if I leave RE definition to you, I am not into doing this dirty work either ;), especially if we did not see what RE resulted in the replacement you are talking about.
The command you wish to use to replace with a fixed value is textops/replace. To replace a string with a new string which includes part of the original string, you may use textops/subst.
More importantly, it would be good to understand to know why you need to mangle the requests -- there may be perhaps other ways to achive what you are trying to do. There is for example a contact mangling module, called mangler.
-jiri
At 03:45 AM 11/20/2003, Stephen Miles wrote:
Hi All,
Hoping you regular expression gurus out there can help me out a bit.
I am wanting to rewrite the Contact header field inside a sip message using either the replace or subst from the textops module. I've done my best but complex/long regular expressions are just a bit beyond me.
I want to change Contact "potato" sip:99196026@ns.commverge.co.nz:5060 to Contact "potato" sip:99196026@sipsrv2.tranzpeer.net:5060.
So far I can change bits of it and almost get it right but I am still seeing the original contact right after the new one i.e: Contact "potato" sip:99196026@ns.commverge.co.nz:5060.sip:99196026@sipsrv2.tranzpeer.net:5060
HELP
Thanks in advance, Stephen
This message and any attachments contain privileged and confidential information. If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify the sender immediately via email and then destroy this message and any attachments.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/