You can try following steps. it worked for me.

1)Register SIPP as UAS to asterisk. can take reference of following scenarios.
command: sipp -i 172.17.1.82 172.17.1.82 -sn uas -sf register_without_Auth.xml 
-inf register_without_Auth.inf -m 1 Scenario for 
register:register_without_Auth.xml<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Basic Sipstone UAC">
  <send retrans="500">
    <![CDATA[

    REGISTER sip:[field1] SIP/2.0
    Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
    Max-Forwards: 70
    To: [field0] <sip:[field0]@[field1]>
    From: [field0] <sip:[field0]@[field1]>;tag=[call_number]
    Call-ID: [call_id]
    CSeq: [cseq] REGISTER
    Contact: <sip:[field0]@[local_ip]:[local_port]>;expires=300
    Allow: 
INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE
    User-Agent: SIPp [sipp_version]
    Content-Length: 0

    ]]>
  </send>

  <recv response="200" crlf="true">
  </recv>

  <send retrans="500">
    <![CDATA[
 
    REGISTER sip:[field1] SIP/2.0
    Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
    Max-Forwards: 70
    To: [field0] <sip:[field0]@[field1]>
    From: [field0] <sip:[field0]@[field1]>;tag=[call_number]
    Call-ID: [call_id]
    CSeq: [cseq] REGISTER
    Allow: 
INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE
    User-Agent: SIPp [sipp_version]
    Content-Length: 0

    ]]>
  </send>

  <recv response="200" crlf="true">
  </recv>
  

</scenario>INF file can have following contentSEQUENTIAL
sipp;172.17.1.82;


sip.conf at asterisk:[sipp]

type=friend
context=sipp
host=dynamic
port=6000
user=sipp
canreinvite=no
disallow=all
allow=alaw
allow=ulaw

extention.conf at asterisk:

[default]
exten => sipp,1,Dial(SIP/sipp)
With above u will able register sipp to asterisk.


2) Now run SIPP as UAS scenario, which will receve invite and then play .pacp 
file attached in last mail.
Command:sipp -i 172.17.1.82 172.17.1.82 -sn uas -sf test.xml -m 1
Scenario:test.xml<?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">
  <!-- 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 request="INVITE" crlf="true" rrs="true">
  </recv>

  <!-- The '[last_*]' keyword is replaced automatically 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 received, 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_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0

]]>
  </send>

  <send>
    <![CDATA[

SIP/2.0 180 Ringing
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>

]]>
  </send>

  <send retrans="500">
    <![CDATA[

SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
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 [auto_media_port] RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11,16

]]>
  </send>

  <recv request="ACK"
        rtd="true"
        crlf="true">
  </recv>

  <!-- Play a pre-recorded PCAP file (RTP stream) -->
  <nop>
    <action>
      <exec play_pcap_audio="g711a.pcap"/>
    </action>
  </nop>
  <pause milliseconds="90000"/>

  <recv request="BYE">
  </recv>

  <send>
    <![CDATA[

SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0

]]>
  </send>

  <!-- Keep the call open for a while in case the 200 is lost to be -->
  <!-- able to retransmit it if we receive the BYE again. -->
  <timewait milliseconds="4000"/>


  <!-- 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>


This will wait for invite from other end and play .pcap during call.



My Setup:


Microsip(UAC)---------->Asterisk-------->Sipp(UAS)


Microsip dials Sipp(extension registered), SIPP(UAS) recive the invite from 
microsip then it plays .pcap in call.




Best Regards,Sakharam Thorat.

Date: Mon, 28 Apr 2014 12:24:54 +0200
Subject: Re: [Sipp-users] Problem connecting UAC and UAS via Asterisk
From: marija.srbl...@gmail.com
To: sakharam.tho...@outlook.com

I think that this will not work for me.
My architecture looks like this:

UAC (192.168.0.159) ---------- asterisk (192.158.0.161) ----------- UAS 
(192.168.0.158)


Now I would like to set up the UAS to listen for calls from UAC.
Something like this:
on UAS: ./sipp -sn uas
on UAC:  ./sipp -sn uac -d 10000 -s 2005 192.168.0.158

But how do I tell UAC to send calls on UAS via Asterisk?


Best regards,

Marija



On Fri, Apr 25, 2014 at 3:07 PM, Sakharam Thorat <sakharam.tho...@outlook.com> 
wrote:








I tried with following it is working for me.

sipp -i 172.17.1.82 172.17.1.82 -sn uac -s 1000 -sf sipp_uac_pcap_g711a.xml -m 
1 -l 1 -trace_msg -trace_err


-i 172.17.1.82 - local sipp ip
172.17.1.82 - asterisk server ip
-s 1000 -extension where sip soft phone is registered .
-sf sipp scenario file which used to invite 1000 softphone   
-m max no of call.
-i max no of simultaneous call


sip.conf

[1000]
secret=2000
type=friend                     ; Can make inbound and outbound calls
host=dynamic                    ; This device needs to register


[sipp]
type=friend

context=sipp
host=dynamic
port=6000
user=sipp
canreinvite=no
disallow=all
allow=alaw
allow=ulaw



extensions.conf
[sipp]
exten => 1000,1,Dial(SIP/1000)



sipp playing .pcap in scenario, please find attachment for sipp scenario and 
.pcap

set up -

sipp(sipp@172.17.1.4) 
-------------->asterisk(172.17.1.82)----------->microsip(1000@172.17.1.4)(app 
installed on windows pc)




Best Regards,
Sakharam Thorat.

Date: Fri, 25 Apr 2014 13:02:07 +0200

From: marija.srbl...@gmail.com
To: sipp-users@lists.sourceforge.net
Subject: [Sipp-users] Problem connecting UAC and UAS via Asterisk



Hello everyone,

I am trying to connect UAC and UAS via Asterisk server.
I have the Asterisk server on one computer, and two computers for UAC and UAS.
I made an extension 2005 on Asterisk, made changes to the sip.conf files:



[sipp]
type=friend
context=sipp
host=dynamic
port=5060
user=sipp
canreinvite=no
disallow=all
allow=all

made changes to the extensions.conf:
[sipp]
exten => 2005,1,Answer
exten => 2005,2,SetMusicOnHold(default)


exten => 2005,3,WaitMusicOnHold(20)
exten => 2005,4,Hangup

and everything works via Asterisk when I use just UAC.
For example this will work: 
./sipp -sn uac -d 10000 -s 2005 ip_address_asterisk



Can anyone explain how to connect UAC and UAS via Asterisk?
I don't know what to type in the command line, and how to tell SIPp to use 
Asterisk server when connecting UAC and UAS.
Do I have to make additional changes on extensions.conf and sip.conf files?



Regards,

Marija

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users
                                          

                                          
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to