Hi David--
Thanks for your reply - I've attached the scenario I'm using. I grab the 302
port very similarly to yours - once I grab it (as you see in the scenario
file), I'm sending another Invite with the updated 302 port; from the trace
logs, everything LOOKS good. However, in wireshark, you can see that when the
second invite gets sent, it's still sending to the original port specified from
the cmdline, although the second invite iteslf does include the correct port.
As I mentioned, I'm using sip over TCP, so not sure if that's the issue - if I
use the setdest as seen in the attached xml, it works fine (and unfortunately,
SIPp randomly locks and dies using this function).
Thanks!
Subject: RE: [Sipp-users] Perform redirect without SetDest?
Date: Wed, 24 Jun 2009 16:17:46 +0100
From: [email protected]
To: [email protected]; [email protected]
Post your xml scenario, that would help.
I use the following to extract the 302 redirect information,
instead of saving it to a file like I do, you could put it into an INVITE, etc.
<!-- Contact header contains URI of the ad hoc conference to move to -->
<recv response="302" rtd="true">
<action>
<ereg regexp="\<([a-za-z...@.=;]+)[^>]+"
search_in="hdr"
header="Contact: "
assign_to="1"/>
<log message="INFO: 302 Contact Header: [$1]" />
<exec command="echo [$1] >> ./302ContactHeader.txt" />
</action>
</recv>
From: John Rodriguez [mailto:[email protected]]
Sent: 24 June 2009 15:18
To: SIPp Mailing List
Subject: [Sipp-users] Perform redirect without SetDest?
When I send a TCP sip call, I am getting a 302 redirect from the server which
redirects to the port I should connect to. I've had no trouble extracting the
new destination port from the CONTACT header. However, the only way I've been
able to get the call to work is if I use the "SetDest" function to point to the
new redirected port. Is there anyway to perform a redirect of this nature
WITHOUT using SetDest? Simply sending another invite with the new port does
not work.
The reason I'm asking is b/c I noticed that although the call WILL go through,
SIPp actually locks up occasionally during load at seemingly random intervals
and drops all calls. I'm 100% positive that setdest is causing this b/c if I
bypass the initial port and redirect to the new port by specifying in the cmd
line, all works fantastic, no lock ups, etc; I am aware from the doc that the
setdest may cause locking which may be exactly what I'm experiencing. The
problem with this is a) it's not forcing the server to send the redirect and b)
getting the redirected port is a bit of pain as it tends to change every so
often.
Any ideas?
Thanks!
Lauren found her dream laptop. Find the PC that’s right for you.
_________________________________________________________________
Bing™ brings you maps, menus, and reviews organized in one place. Try it now.
http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TEXT_MLOGEN_Core_tagline_local_1x1<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="temp">
<send retrans="500">
<![CDATA[
INVITE sip:[servi...@[remote_ip]:[remote_port];transport=tcp SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport
Max-Forwards: 70
Contact: <sip:[fiel...@[local_ip]:[local_port];transport=TCP>
To: "[servi...@[remote_ip]:[remote_port];transport=tcp"<sip:[servi...@[remote_ip]:[remote_port];transport=tcp>
From: "[field0]"<sip:[fiel...@[local_ip]>;tag=[call_number]
Call-ID: [call_id]
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: SIPp XL
Content-Length: [len]
v=0
o=- 4 2 IN IP[local_ip_type] [local_ip]
s=CounterPath X-Lite 3.0
c=IN IP[local_ip_type] [local_ip]
t=0 0
m=audio [auto_media_port] RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=ptime:50
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ptime:50
a=sendrecv
]]>
</send>
<recv response="100">
</recv>
<recv response="302">
<action>
<ereg regexp="sip:.*:([0-9]{4});transport.*([0-9]{1,3}\.){3}[0-9]{1,3}" search_in="hdr" header="CONTACT:" check_it="true" assign_to="1,2" />
<log message="302 String: [$1]"/>
<log message="302 Port: [$2]"/>
</action>
</recv>
<send>
<![CDATA[
ACK sip:[servi...@[remote_ip]:[remote_port];transport=tcp SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport
To: "[servi...@[remote_ip]:[remote_port];transport=tcp"<sip:[servi...@[remote_ip]:[remote_port];transport=tcp>[peer_tag_param]
From: "[field0]"<sip:[fiel...@[local_ip]>;tag=[call_number]
Call-ID: [call_id]
CSeq: 1 ACK
Content-Length: 0
]]>
</send>
<nop display="-Redirect Dest Port">
<action>
<setdest host="[remote_ip]" port="[$2]" protocol="tcp" />
</action>
</nop>
<send retrans="500">
<![CDATA[
INVITE [$1] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport
Max-Forwards: 70
Contact: <sip:[fiel...@[local_ip]:[local_port];transport=TCP>
To: "[servi...@[remote_ip]:[remote_port];transport=tcp"<sip:[servi...@[remote_ip]:[remote_port];transport=tcp>
From: "[field0]"<sip:[fiel...@[local_ip]>;tag=[call_number]
Call-ID: [call_id]
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: SIPp XL
Content-Length: [len]
v=0
o=- 4 2 IN IP[local_ip_type] [local_ip]
s=CounterPath X-Lite 3.0
c=IN IP[local_ip_type] [local_ip]
t=0 0
m=audio [auto_media_port] RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=ptime:50
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ptime:50
a=sendrecv
]]>
</send>
<recv response="100">
</recv>
<recv response="180">
</recv>
<recv response="200">
</recv>
<send>
<![CDATA[
ACK sip:[servi...@[remote_ip]:[$2];transport=tcp;maddr=[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport
Max-Forwards: 70
Contact: <sip:[fiel...@[local_ip]:[local_port];transport=TCP>
To: "[servi...@[remote_ip]:[remote_port];transport=tcp"<sip:[servi...@[remote_ip]:[remote_port];transport=tcp>[peer_tag_param]
From: "[field0]"<sip:[fiel...@[local_ip]>;tag=[call_number]
Call-ID: [call_id]
CSeq: 2 ACK
User-Agent: SIPp XL
Content-Length: 0
]]>
</send>
<send retrans="500">
<![CDATA[
BYE sip:[servi...@[remote_ip]:[$2];transport=Tcp;maddr=[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch];rport
Max-Forwards: 70
Contact: <sip:[fiel...@[local_ip]:[local_port];transport=TCP>
To: "[servi...@[remote_ip]:[remote_port];transport=tcp"<sip:[servi...@[remote_ip]:[remote_port];transport=tcp>[peer_tag_param]
From: "[field0]"<sip:[fiel...@[local_ip]>;tag=[call_number]
Call-ID: [call_id]
CSeq: 3 BYE
User-Agent: SIPp XL
Reason: SIP;description="User Hung Up"
Content-Length: 0
]]>
</send>
<recv response="200" crlf="true" >
</recv>
<!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>
------------------------------------------------------------------------------
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users