Thanks Geo, worked perfectly!
//Andreas
-----Ursprungligt meddelande-----
Från: Geo Paul [mailto:[EMAIL PROTECTED]
Skickat: den 28 maj 2008 16:23
Till: Andreas Byström (Polystar T & M)
Kopia: sipp-users; sipp-users-bounces
Ämne: RE: [Sipp-users] Sending requests from inital UAS
Given below is a simple example from one of my old scripts. You can use it as
reference.
Geo
--------------------
<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE scenario SYSTEM
"sipp.dtd">
<!-- This program is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU General Public License as -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version. -->
<!-- -->
<!-- This program is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
<!-- GNU General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU General Public License -->
<!-- along with this program; if not, write to the -->
<!-- Free Software Foundation, Inc., -->
<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Sipp default 'uas' scenario. -->
<!-- -->
<scenario name="Basic UAS responder">
<recv request="INVITE" crlf="true" rrs="true">
<action>
<ereg regexp=".*"
search_in="hdr"
header="From:"
check_it="true"
assign_to="1"/>
</action>
</recv>
<!-- The '[last_*]' keyword automatically is replaced by the -->
<!-- specified header if it was present in the last message received -->
<!-- (except if it was a retransmission). If the header was not -->
<!-- present or if no message has been recieved, the '[last_*]' -->
<!-- keyword is discarded, and all bytes until the end of the line -->
<!-- are also discarded. -->
<!-- -->
<!-- If the specified header was present several times in the -->
<!-- message, all occurences are concatenated (CRLF seperated) -->
<!-- to be used in place of the '[last_*]' keyword. -->
<send>
<![CDATA[
SIP/2.0 100 Trying
[last_To:];tag=[call_number]
[last_From:]
[last_Via:]
[last_Call-ID:]
[last_CSeq:]
[last_Record-Route:]
Max-Forwards: 69
Content-Length: 0
]]>
</send>
<pause milliseconds="10"/>
<send>
<![CDATA[
SIP/2.0 180 Ringing
[last_To:];tag=[call_number]
[last_From:]
[last_Via:]
[last_Call-ID:]
[last_CSeq:]
[last_Record-Route:]
Max-Forwards: 69
Content-Length: 0
]]>
</send>
<pause milliseconds="500"/>
<send>
<![CDATA[
SIP/2.0 200 OK
[last_To:];tag=[call_number]
[last_From:]
[last_Via:]
[last_Call-ID:]
[last_CSeq:]
[last_Record-Route:]
Max-Forwards: 69
Contact: <sip:[EMAIL PROTECTED]:[local_port];transport=[transport]>
Content-Type: application/sdp
Content-Length: [len]
v=0
o=[field1] 53655765 2353687637 IN IP4 [media_ip]
s=-
c=IN IP4 [media_ip]
t=0 0
]]>
</send>
<recv request="ACK">
<action>
<ereg regexp=".*"
search_in="hdr"
header="To:"
check_it="true"
assign_to="2"/>
</action>
</recv>
<pause/>
<!-- The 'crlf' option inserts a blank line in the statistics report. -->
<send>
<![CDATA[
BYE sip:[EMAIL PROTECTED];transport=[transport] SIP/2.0
Call-ID: [call_id]
Cseq: 2 BYE
From: [$2]
To: [$1]
[routes]
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch][call_id]
Max-Forwards: 70
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>
-----Original Message-----
From: Andreas Byström (Polystar T & M) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2008 10:11 AM
To: Charles P Wright
Cc: [EMAIL PROTECTED]; [email protected]
Subject: Re: [Sipp-users] Sending requests from inital UAS
Could be something to add in SIPp, keywords like remote_sipuri, local_sipuri
(from To/From) and remote_contact (taken from Contact). That way you would
write BYE and reInvites from the inital UAS that should now act as UAC without
using regular expressions
BYE [remote_contact] SIP/2.0
>From <sip:[local_sipuri]>;[tag_param]
To <sip:[remote_sipuri]>;[peer_tag_param]
I will follow your suggestion and try out some regular expressions
(unfortunately I'm not so familiar with this but everything has to have a first
time, doesnt it?)
Regards,
// Andreas
-----Ursprungligt meddelande-----
Från: Charles P Wright [mailto:[EMAIL PROTECTED]
Skickat: den 28 maj 2008 15:44
Till: Andreas Byström (Polystar T & M)
Kopia: [email protected]; [EMAIL PROTECTED]
Ämne: Re: SV: [Sipp-users] Sending requests from inital UAS
I don't have any examples of that, but you should be able to get all of that
with regular expressions.
Charles
"Andreas Byström (Polystar T & M)" <[EMAIL PROTECTED]>
05/28/2008 08:20 AM
To
Charles P Wright/Watson/[EMAIL PROTECTED]
cc
"[email protected]" <[email protected]>,
"[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>
Subject
SV: [Sipp-users] Sending requests from inital UAS
Doesnt the outgoing request have to be built with the following info (in my
case, where I want the sipp script to be uas and create a BYE request and my
sipp script has UAS when the dialog is set up):
* Requestline - Should be whatever is in the Contact header in the request that
started the dialog (unless there are some Route headers which it is not in my
case)
* To header - should be the same as the incoming From header
* From header - should be the same as incoming To header + the tag created by B
when sending responses to the first request
If I use for example the <send bye> from the uac example, the requestln
contians [service] and to/form has [local_ip]/[remote_ip]. That wont work since
that is not how the incoming request that creates the dialog looks like. The
incoming request to sipp script looks like this:
INVITE sip:[EMAIL PROTECTED] SIP/2.0
Call-ID: [EMAIL PROTECTED]
CSeq: 1 INVITE
From: <sip:[EMAIL PROTECTED]>;tag=1a3da3c6
To: <sip:[EMAIL PROTECTED]>
Via: SIP/2.0/UDP
10.10.8.122:5060;branch=z9hG4bK87cda52f07c481e5a8778b4d6666ed75
Max-Forwards: 70
Contact: <sip:[EMAIL PROTECTED]:5060;transport=udp>
Content-Type: application/sdp
Content-Length: 177
< sdp not shown>
I'm guessing that I have the same problem creating this BYE as I would have had
if I wanted the B side to create a re-Invite. Maybe there are some examples on
creating reInvites from B side?
Regards,
// Andreas
-----Ursprungligt meddelande-----
Från: Charles P Wright [mailto:[EMAIL PROTECTED]
Skickat: den 28 maj 2008 14:07
Till: Andreas Byström (Polystar T & M)
Kopia: [email protected]; [EMAIL PROTECTED]
Ämne: Re: [Sipp-users] Sending requests from inital UAS
There shouldn't be any magic to it. Just copy the request from the UAC
scenario to the UAS and the recv from the UAS to the UAC.
Charles
[EMAIL PROTECTED] wrote on 05/28/2008 05:59:22 AM:
> Hi,
>
> I'm trying to write a scenario where sipp should act as B side and I
> want to send BYE from sipp
>
> A -> invite -> sipp
> A <- 100 trying <- sipp
> A <- 180 Ringing <- sipp
> A <- 200 OK <- sipp
> A -> ACK -> sipp
> A <- BYE <- sipp
> A -> 200 OK -> sipp
>
> However I'm stuck with getting the correct To/From headers ( and
> requestln) when creating the BYE request. Anyone that know of an
> example where the initial uas side should act as auc and send a request?
>
> Attached are my scenario sofar ( call setup but no BYE from B)
>
> Regards,
> // Andreas
>
>
> [attachment "b_scenario.sipp.xml" deleted by Charles P
Wright/Watson/IBM]
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft Defy all challenges.
> Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Sipp-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sipp-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R)
Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users