On Tue, Apr 28, 2009 at 2:09 AM, Paul Fugere <[email protected]> wrote: > Sorry if I wasn't clear on my problem/request. > > What I am trying to simulate is a SIP client to call through a PBX to a > phone under another PBX. Since both of these PBX machines share the same SIP > provider, the SIP provider will send a re-invite request so that the > communication occurs directly between the phones instead of the SIP > provider.
OK. So you need to change uac.xml to expect a RE-INVITE (not a REGISTER). I'm sending you a uac.xml file which I use in my tests (please adjust uac.dat with the data needed for your test). I have modified it to wait for the RE-INVITE and call setdest with the info contained in the Contact header received in the message. But I don't know if this is proper SIP behavior. I would expect this change of end-points to happen using some sort of REFER. But I'm no SIP guru anyway. You can test it like this: sipp -i local_ip -p local_port -sf uac.xml -inf uac.dat -m 1 remote_ip > On Mon, Apr 27, 2009 at 12:56 PM, mayamatakeshi <[email protected]> > wrote: >> >> On Tue, Apr 28, 2009 at 1:40 AM, Paul Fugere <[email protected]> >> wrote: >> > I have been using the uac.xml. Not sure how to modify it to accept these >> > Register requests. >> >> Hum. What exactly are you trying to simulate with SIPp? From your >> initial post, I assumed you were trying to simulate a SIP client (a >> SIP phone maybe). But a SIP client is not supposed to be receiving >> REGISTER requests. That would be a registrar server. You can use SIPp >> to simulate that too, but I don't know how to make it simulate both at >> the same time bound to the same port. And a don't think that's what >> you are trying to do. >> Usually, I simulate and test separate operations. >> >> > I am using this base scenario because I believe that since the re-invite >> > is >> > done from the SIP provider, that it should work for a regular set-up. >> > >> > On Mon, Apr 27, 2009 at 12:24 PM, mayamatakeshi >> > <[email protected]> >> > wrote: >> >> >> >> On Tue, Apr 28, 2009 at 1:00 AM, Paul Fugere >> >> <[email protected]> >> >> wrote: >> >> > Thinking about it, since the Trunk is initiating the re-invite, I >> >> > might >> >> > be >> >> > going about the hard way by trying to initiate it from my SIPP. >> >> > >> >> > Is it possible to spoof it so that SIPP can act as a registered phone >> >> > on >> >> > my >> >> > PBX and contact an external phone number? I remember trying this and >> >> > I >> >> > was >> >> > receiving errors because it was discarding a Register packet. >> >> >> >> Sorry, I could not visualize your scenario (why there is a >> >> Registration now in it?). >> >> Maybe you could try to write the xml (it doesn't take much time) and >> >> check where it fails. >> > >> > >> > >> > -- >> > Paul Fugere >> > [email protected] >> > 2T Computer Engineering >> > Engineering Society 'A' >> > Iron Warrior Advisory Board - A-Soc-At-Large >> > Bowling Director >> > Novelties Director >> > POETS Manager >> > POETS Programmer >> > > > > > -- > Paul Fugere > [email protected] > 2T Computer Engineering > Engineering Society 'A' > Iron Warrior Advisory Board - A-Soc-At-Large > Bowling Director > Novelties Director > POETS Manager > POETS Programmer >
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="UAC">
<!-- You must supply a file containing data for injection -->
<!-- field0 : remote username -->
<!-- field1 : local username -->
<!-- field2 : domain -->
<!-- Sample
SEQUENTIAL
001234;1001;test.com
-->
<!-- arguments to sipp must include: -->
<!-- -i : local_ip -->
<!-- -p : local_port -->
<!-- -sf : scenario file -->
<!-- -inf : injection data file -->
<!-- -d : delay (call duration) in milliseconds -->
<!-- Ex.: sipp -i 192.168.2.122 -p 6060 -sf uac.xml -inf data.txt -d 1000 192.168.2.123 -->
<send retrans="500">
<![CDATA[
INVITE sip:[fiel...@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
From: "[field1]" <sip:[fiel...@[field2]>;tag=[pid]SIPpTag00[call_number]
To: <sip:[fiel...@[remote_ip]:[remote_port]>
Call-ID: [call_id]
Contact: <sip:[fiel...@[local_ip]:[local_port]>
CSeq: 1 INVITE
Max-Forwards: 70
Allow: INVITE,CANCEL,ACK,BYE,NOTIFY,REFER,OPTIONS,INFO,MESSAGE
Supported: replaces
Content-Type: application/sdp
User-Agent: SIP PHONE
Content-Length: [len]
v=0
o=CMI-SIPUA 61838 0 IN IP[local_ip_type] [local_ip]
s=SIP CALL
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 18 4 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="180" optional="true">
</recv>
<recv response="183" optional="true">
</recv>
<!-- By adding rrs="true" (Record Route Sets), the route sets -->
<!-- are saved and used for following messages sent. Useful to test -->
<!-- against stateful SIP proxies/B2BUAs. -->
<recv response="200" rrs="true">
</recv>
<send>
<![CDATA[
ACK [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch-5]
[last_From:]
[last_To:]
[last_Call-ID:]
[routes]
Contact: <sip:[fiel...@[local_ip]:[local_port]>
CSeq: 1 ACK
User-Agent: SIP PHONE
Content-Length: 0
]]>
</send>
<!-- This delay can be customized by the -d command-line option -->
<!-- or by adding a 'milliseconds = "value"' option here. -->
<pause/>
<recv request="INVITE">
<action>
<ereg regexp="sip:(.*)@([0-9A-Za-z\.]+):([0-9]+)" search_in="hdr" header="Contact:" assign_to="dummy,username,host,port" check_it="true" />
<setdest host="[$host]" port="[$port]" protocol="UDP" />
</action>
</recv>
<Reference variables="dummy,username" />
<send>
<![CDATA[
SIP/2.0 200 OK
[last_To:]
[last_From:]
[last_Call-ID:]
[last_CSeq:]
[last_Via:]
Content-Type: application/sdp
User-Agent: SIP PHONE
Content-Length: [len]
v=0
o=CMI-SIPUA 61838 0 IN IP[local_ip_type] [local_ip]
s=SIP CALL
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 18 4 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
]]>
</send>
<recv request="ACK" />
<recv request="BYE" />
<send>
<![CDATA[
SIP/2.0 200 OK
[last_To:]
[last_From:]
[last_Call-ID:]
[last_CSeq:]
[last_Via:]
User-Agent: SIP PHONE
Content-Length: 0
]]>
</send>
<!-- definition0 of the response time repartition table (unit is ms) -->
pen for a while in case the 200 is lost to be -->
<!-- able to retransmit it if we receive the BYE again. -->
<timewait milliseconds="4000"/>
<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>
uac.dat
Description: Binary data
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects
_______________________________________________ Sipp-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sipp-users
