Thanks Cheng Kun for the idea of using an external command, following on
from that thought.
if I run the following command in bash I get the RFC 1133 format I require
for the Date: header
date -d "+12 months" +"%a, %d %b %Y 00:00:01 GMT"
Although the SIPp documentation shows how to echo the contents of a
varaible to a text file it does not show how to set a new variable equal to
the output of a external command, can SIPp do such a thing?
Thanks
Paul
On Mon, Sep 29, 2014 at 7:39 PM, 程琨 <chengku...@gmail.com> wrote:
> I have an script using variables, hope it can give you some hints.
>
> The related part is :
>
> <scenario name="INVITE with Auth UAC">
> <send retrans="500" start_txn="invite">
> <![CDATA[
> INVITE sip:[field3]@[field1]:[remote_port] SIP/2.0
> Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
> From: sipp <sip:sipp@
> [local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
> To: sut <sip:[field3]@[field1]:[remote_port]>
> Call-ID: [call_id]
> CSeq: [cseq] INVITE
> Contact: <sip:sipp@[local_ip]:[local_port]>
> Max-Forwards: 70
> Subject: Performance Test
> User-Agent: SIPp Tester
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
> INFO, PUBLISH
> Content-Type: application/sdp
> Content-Length: [len]
>
> v=0
> o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
> s=-
> c=IN IP[media_ip_type] [media_ip]
> t=0 0
> m=audio [media_port] RTP/AVP 0
> a=rtpmap:0 PCMU/8000
> ]]>
> </send>
>
> <recv response="100" optional="true" rrs="true" response_txn="invite">
> </recv>
>
> <!-- grab the Contact Header's URI for use in the response ACK -->
> <recv response="401" auth="true" rrs="true" response_txn="invite">
> <action>
> <ereg regexp= "sip:[^;>]+" search_in="hdr"
> header="Contact:" assign_to="2" />
> </action>
> </recv>
>
> <!-- decrement the branch by 3 to match the above INVITE's branch -->
> <send ack_txn="invite">
> <![CDATA[
> ACK sip:[field3]@[$2] SIP/2.0
> Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch-3]
> From: sipp <sip:sipp@
> [local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
> [last_To]
> [routes]
> Call-ID: [call_id]
> CSeq: [cseq] ACK
> Contact: <sip:sipp@[local_ip]:[local_port]>
> Max-Forwards: 70
> Subject: Performance Test
> User-Agent: SIPp Tester
> Content-Length: 0
> ]]>
> </send>
>
> In this example it searches in Contact header and assigns value to
> variable 2, then sends ACK by judging the 2's value.
>
> But can you modify the date and timestamp?
>
> Cheng Kun
>
> 2014-09-29 12:15 GMT+08:00 Paul Miller <idkpmil...@sip2serve.com>:
>
>> Hi,
>> I am currently using SIPp 3.4.1 and I trying to emulate a UAS which uses
>> the Date: and Timestamp: header in its messaging. Is there a way to
>> populate this header with an internal variable/keyword that will be
>> populated by SIPp when the scenario is run?
>> If not can you consider adding support for date and timestamp header?
>>
>> Example header format below:
>>
>> *Date: Mon, 22 Sep 2014 04:00:49 GMT*
>> *Timestamp: 1411358460*
>>
>> Thanks
>>
>> Paul
>>
>>
>> ------------------------------------------------------------------------------
>> Slashdot TV. Videos for Nerds. Stuff that Matters.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Sipp-users mailing list
>> Sipp-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sipp-users
>>
>>
>
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users