SIP Functions

emulation sip config

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:

Creates, enables, disables, modifies or deletes Session Initiation Protocol (SIP) emulation on a Spirent HLTAPI chassis.

SIP is an applicationlayer control protocol that can establish, modify, and terminate sessions with one or more participants. These sessions include Internet telephone calls, multimedia distribution, and multimedia conferences.

SIP invitations used to create sessions carry session descriptions that allow participants to agree on a set of compatible media types. SIP makes use of elements called Proxy Servers to help route requests to the user’s current location, authenticate and authorize users for services, and provide features to users. SIP also provides a registration function that allows users to upload their current locations for use by Proxy Servers.

In the Spirent TestCenter implementation, voice data is carried in Realtime Transfer Protocol (RTP) data streams over UDP. SIP uses Session Description Protocol (SDP) for describing media sessions.

Thousands of telephone calls can be emulated on each Spirent TestCenter port.

Synopsis:

Note: M indicates the argument is `Mandatory`.

    emulation sip config
        mode= {create|enable_all|disable_all|modify|enable|disable|delete} M
        port_handle= <port_handle>
        handle= <device handle>|<sip_host_handle>
        port_handle= <port_handle>
        count= <integer>
        call_accept_delay_enable= {0|1}
        call_duration= <NUMERIC>
        call_type= {SIGNALING_ONLY|AUDIO_ONLY|AUDIO_VIDEO}
        call_using_aor= {0|1}
        desired_expiry_time= <1- 4294967295>
        gateway_enable= {0|1}
        gateway_ipv4_address= <a.b.c.d>
        gateway_ipv6_addr_step=  <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        gateway_ipv6_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        intf_ipv6_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        intf_ipv6_addr_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        ip_version=  {4|6|4_6}
        local_domain= <alphanumeric>
        local_ip_addr= <a.b.c.d>
        local_ip_addr_step= <integer>
        local_ip_addr_repeat= <integer>
        local_ipv6_addr=  <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        local_username_prefix= <alphanumeric>
        local_username_suffix= <0-18446744073709551615>
        local_username_suffix_step= <0-18446744073709551615>
        local_port= <0-65535>
        mac_address_start= <aa:bb:cc:dd::ee::ff>
        media_payload_type= {SIP_MEDIA_ITU_G711_64K_240BYTE|
                            SIP_MEDIA_ITU_G711_64K_160BYTE|
                            SIP_MEDIA_ITU_G723_6K3_24BYTE|
                            SIP_MEDIA_ITU_G723_5K3_20BYTE|
                            SIP_MEDIA_ITU_G723_5K3_40BYTE|
                            SIP_MEDIA_ITU_G729_8K_20BYTE|
                            SIP_MEDIA_ITU_G729_8K_40BYTE}]
        media_port_number= <0-65535>
        name= <alphanumeric>
        proxy_server_port= <0-65535>
        remote_domain= <alphanumeric>
        remote_ip_addr= <a.b.c.d>
        remote_ip_addr_step= <integer>
        remote_ip_addr_repeat= <integer>
        remote_host= <a.b.c.d>|<aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        remote_host_repeat= <integer>
        remote_host_step= <integer|aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        remote_username_prefix= <alphanumeric>
        remote_username_suffix= <0-18446744073709551615>
        remote_username_suffix_step= <0-18446744073709551615>
        registration_server_enable= {0|1}
        registrar_address= <a.b.c.d>
        response_delay_interval= <0-4294967295>
        use_compact_headers= {{0|1}}
        user_agents_per_device=  <1-32768>
        video_type= {H_263|H_264|MP4V_ES}
        video_port_number= <0-65535>
        vlan_id1= <0-4095>
        vlan_ether_type1= {0x8100|0x88A8|0x9100|0x9200}
        vlan_id_mode1= {fixed|increment}
        vlan_id_step1= <0-4095>
        vlan_id2= <0-4095>
        vlan_ether_type2= {0x8100|0x88A8|0x9100|0x9200}
        vlan_id_mode2= {fixed|increment}
        vlan_id_step2= <0-4095>
        load_profile_name= <string>
        load_type= {connections|connections_per_time_unit|transactions|bandwidth|transactions_per_time_unit|playlists}
        enable_dynamic_load= {true|false}
        random_seed= <0-4294967295>
        connections_attempted= <0-4294967295>
        open_connections= <0-4294967295>
        transactions_attempted= <0-4294967295>
        load_pattern= {stair|flat|burst|sinusoid|random|sawtooth}
        load_phase_duration_units= {milliseconds|seconds|minutes|hours}
        phase_name= <string>
        height= <0-10000000>
        ramp_time= <0-40000000>
        steady_time= <0-40000000>
        burst_time= <0-40000000>
        period= <0-1000>
        pause_time= <0-40000000>
        repetitions= <0-100>

Arguments:

port_handle
                Specifies the port handle on which SIPv4 emulation is to
                be created on. This argument is `Mandatory` for mode create,
                enable_all or disable_all.

handle
                Specifies the SIPv4 emulation handle to be modified,
                enabled, disabled or deleted. This argument is `Mandatory`
                for mode modify, enable, disable or delete.

                Another function of the handle argument is to specify on which
                existing device SIP sessions will be created. The handle option
                will be returned from emulation dhcp group config or
                emulation pppox. You can use the returned
                handle value together with mode create to create "SIP with DHCP"
                or "SIP over PPPoX" device. The values of the arguments below
                will directly inherit from the created device which is specified
                by handle::


                  count
                  local_ip_addr
                  local_ip_addr_step
                  local_ip_addr_repeat
                  mac_address_start
                  remote_ip_addr
                  remote_ip_addr_step
                  remote_ip_addr_repeat

mode
                Specifies the action to perform on the specified test port
                or SIP emulation. This argument is `Mandatory`. The modes are
                described below::


                 create - Creates SIPv4 emulation on the port
                     specified by the port_handle argument. You must
                     specify the port_handle argument.

                 modify - Changes the configuration for the SIP emulation
                     identified by the handle argument. You must specify
                     the handle argument.

                 delete - Deletes the SIP host or a list of SIP hosts
                     specified in the handle argument. You must specify
                     the handle argument.

                 enable - Activates the SIP host or a list of SIP hosts
                     specified in the handle argument. You must specify
                     the handle argument.

                 disable - Deactivates the SIP host or a list of SIP hosts
                     specified in the handle argument. You must specify
                     the handle argument.

                 enable_all - Activates all created SIP hosts on the port
                     specified in the port_handle argument. You must
                     specify the port_handle argument.

                 disable_all - Deactivates all created SIP hosts on the
                     port specified in the port_handle argument. You must
                     specify the port_handle argument.

count
                Used only in create mode to specify number of individual
                SIP emulation to be created. The default is 1.

call_accept_delay_enable
                To enable delay of acceptance of invite requests.
                Possible values are 0(disable) and 1(enable). The
                default is 0.

call_duration
                `Spirent Extension (for Spirent HLTAPI only).`

                Duration of calls in seconds. The default value is 300.

call_type
                `Spirent Extension (for Spirent HLTAPI only).`

                Defines emulated SIP UA call type: signaling only,
                audio UA or audio/video UA. Possible values are
                SIGNALING_ONLY, AUDIO_ONLY and
                AUDIO_VIDEO. The default is
                AUDIO_ONLY.

call_using_aor
                Used to enable or disable remote subscribers
                using address of record. Possible values are 0 (disable)
                and 1 (enable). The default is 0.

desired_expiry_time
                The expiry interval, in seconds, that will be suggested by
                the subscriber in the register requests. Possible values
                range from 1 to 4294967295. The default is 604800. You
                can specify this argument when the
                registration_server_enable argument is enabled.

gateway_enable
                Specifies the gateway address for the DUT. To be
                specified only if the gateway address differs from the DUT
                address. Possible values are 0 and 1. The default is 0.

gateway_ipv4_address
                Specifies the gateway address (IPv4) of the DUT. You can
                specify this argument when the gateway_enable option is set to 1.

gateway_ipv6_addr_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the increment used to generate IPv6 gateway addresses.
                This argument is only valid when ip_version is set to 6 or 4_6.
                The value must be in IPv6 format. The default value is ::.

gateway_ipv6_addr
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the starting IPv6 gateway address for emulated SIP
                devices. This argument is only valid when ip_version is set to 6
                or 4_6. The value must be in IPv6 format.

intf_ipv6_addr
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the IPv6 address of the interface for the emulated SIP
                device. This argument is only valid when ip_version is
                set to 6 or 4_6.

intf_ipv6_addr_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the increment used to generate IPv6 addresses for
                emulated devices. You must specify the interface IP address step
                when the count argument is greater than 1. The default value is
                ::1.

ip_version
                `Spirent Extension (for Spirent HLTAPI only).`

                Defines the IP version to be used by the emulated SIP device.
                Possible values are::


                 4     IPv4
                 6     IPv6
                 4_6   Dual stack

                The default value is 4.

local_domain
                Specifies SIP domain to which all local subscribers in the
                pool belong. Domain name is used to build Uniform Resource
                Indicator(URI) in SIP messages. If this field is not set,
                proxy IP address is used to build URI. This argument must
                be in alphanumeric format.

local_ip_addr
                Specifies the IPv4 address for SIP emulation.

local_ip_addr_step
                Specifies the incrementing IPv4 address step for SIP
                emulation. This argument must be in integer format.
                The default is 1.

local_ip_addr_repeat
                Specifies the repeat of incrementing addresses for SIP emulation.
                The value of this argument must in integer format. The default is 1.

local_ipv6_addr
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the starting link local IPv6 address for emulated SIP
                devices. The default value is FE80::0.

local_username_prefix
                Specifies the prefix of local subscribers in a pool.
                This argument must be in alphanumeric format.

local_username_suffix
                Specifies the suffix of username. Possible values range
                from 0 to 18446744073709551615. The default is 1000.

local_username_suffix_step
                Specifies the username suffix step for incrementing.
                Possible values range from 0 to 18446744073709551615.
                The default is 1.

local_port
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the port number on which the SIP listener
                will be created. Possible values range from 0 to 65535.
                The default is 5060.

mac_address_start
                `Spirent Extension (for Spirent HLTAPI only).`

                Defines the first MAC address of the SIP emulation.
                The default is 00:10:94:00:00:02.

media_payload_type
                Specifies the type of media that is to be used in SIP
                sessions. Possible values are::


                 SIP_MEDIA_ITU_G711_64K_240BYTE,
                 SIP_MEDIA_ITU_G711_64K_160BYTE,
                 SIP_MEDIA_ITU_G723_6K3_24BYTE,
                 SIP_MEDIA_ITU_G723_5K3_20BYTE,
                 SIP_MEDIA_ITU_G723_5K3_40BYTE,
                 SIP_MEDIA_ITU_G729_8K_20BYTE, and
                 SIP_MEDIA_ITU_G729_8K_40BYTE.

media_port_number
                Specifies the local port number nominated by user agent client
                (UAC) to be used for media exchange. A user agent client is a
                client application that initiates the SIP request. Possible
                values range from 0 to 65535. The default is 50050.

name
                Specifies the name of the SIP emulation. This argument must be in
                alphanumeric format.

proxy_server_port
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the UDP port number that the SIP proxy server
                uses for signaling. Possible values range from 0 to 65535.
                The default is 5060.

remote_domain
                Specifies SIP domain to which all remote subscribers
                in the pool belong. This argument must be in alphanumeric
                format. You can specify this argument only when
                call_using_aor is set to 1.

remote_host
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies IPv4 address to which the remote subscriber can
                be contacted. You can specify this argument only when
                call_using_aor is set to 1.

remote_host_repeat
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the number of times to repeat before incrementing
                remote host address. You can specify this argument only when
                call_using_aor is enabled.

remote_host_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the amount to increment at each step of remote
                host address. You can specify this argument only when
                call_using_aor is enabled.

remote_host
                Specifies the remote subscriber's IP address This argument is
                only valid when call_using_aor is enabled. The IP version of the
                address is specified by the ip_version argument.

remote_host_repeat
                Specifies the number of times to repeat the remote host addresses
                before incrementing it. This argument is only valid when
                call_using_aor is enabled.

remote_host_step
                Specifies the value of the step used to increment the remote host
                address. This argument is only valid when call_using_aor is
                enabled. The value must be an integer when ip_version is 4, or
                an IPv6 address format when ip_version is 6.

remote_ip_addr
                Specifies the IPv4 gateway address of the SIP emulation.

remote_ip_addr_step
                Specifies the incrementing IPv4 gateway address step for
                SIP emulation. The value of this argument must in integer format.
                The default is 1.

remote_ip_addr_repeat
                Specifies the repeat of incrementing gateway addresses
                for SIP emulation. The value of this argument must in integer
                format. The default is 1.

remote_username_prefix
                Specifies the prefix username of all remote subscribers
                in a pool. The value of this argument must be in alphanumeric
                format.

remote_username_suffix
                Specifies the username suffix. Possible values range
                from 0 to 18446744073709551615. The default is 1000.

remote_username_suffix_step
                Specifies the username suffix step for incrementing.
                Possible values range from 0 to 18446744073709551615.
                The default is 1.

registration_server_enable
                Indicates whether SIP emulation is capable of performing SIP
                registration operations. Possible values are 0 and 1. If 0,
                indicates SIP calls will be established directly between two User
                Agents (UAs) without the SIP Proxy Server, and no registration
                transaction. UA is a logical entity that can act as both a User
                Agent Client (UAC) and User Agent Server (UAS). If it is set to
                1, it indicates SIP calls will be established through the SIP
                Proxy Server. The default is 0.

registrar_address
                Specifies the IPv4 address of a SIP registrar. To configure this
                argument, you must also specify registration_server_enable 1.

response_delay_interval
                Specifies the time, in seconds, for the 200 OK response from a
                UAS to an INVITE request. Possible values range from 0 to
                4294967295. The default is 0. To configure this argument, you
                must also specify call_accept_delay_enable 1.

use_compact_headers
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies whether to use SIP compact header formats or not.
                Possible values are 0 and 1. The default is 0.

user_agents_per_device
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the number of UAs per device. Possible values range from
                1 to 32768. The default is 1.

video_type
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the type of video that is to be used in SIP sessions.
                Possible values are H_263, H_264 and MP4V_ES. You can specify
                this argument when the call_type argument is set to AUDIO_VIDEO.

video_port_number
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the UDP port from which RTP/Video streams should be
                sent. Possible values range from 0 to 65535. The default
                is 50052. You can specify this argument when call_type is
                set to AUDIO_VIDEO.

vlan_id1
                Specifies the VLAN ID of the first VLAN subinterface. Possible
                values range from 0 to 4095. The default is 100.

vlan_ether_type1
                Specifies the VLAN ether type for the first VLAN subinterface.
                Possible values are 0x8100, 0x88A8, 0x9100 and 0x9200.
                The default is 0x8100. You can use this argument when you
                specify the vlan_id1 argument.

vlan_id_mode1
                For multiple configurations, configures the VLAN ID
                mode to fixed or increment. If you set this argument to
                increment, you should also specify the vlan_id_step1
                argument to indicate the step size. The default is fixed.
                You can use this argument when you specify the vlan_id1
                argument.

vlan_id_step1
                The step size by which the VLAN value is incremented when
                you set vlan_id_mode1 to increment. Possible values range
                from 0 to 4095. The default is 1. You can use this argument
                when you specify the vlan_id1 argument.

vlan_id2
                Specifies the VLAN ID of outer VLAN subinterface. Possible
                values range from 0 to 4095. The default is 100.

vlan_ether_type2
                Specifies the VLAN ether type for the outer VLAN subinterface.
                Possible values are 0x8100, 0x88A8, 0x9100 and 0x9200.
                The default is 0x8100. You can use this argument when you
                specify the vlan_id2 argument.

vlan_id_mode2
                For multiple configurations, configures the VLAN ID
                mode of the outer VLAN subinterface to fixed or increment.
                If you set this argument to increment, you should also
                specify the vlan_id_step2 argument to indicate the step
                size. The default is fixed. You can use this argument
                when you specify the vlan_id2 argument.

vlan_id_step2
                The step size by which the VLAN value is incremented when
                you set vlan_id_mode2 to increment. Possible values range
                from 0 to 4095. The default is 1. You can use this argument
                when you specify the vlan_id2 argument.

load_profile_name
                Specifies the name for the client load profile.

load_type
                The type of traffic that is measured for the load.
                The default is connections.

enable_dynamic_load
                Allows the load to be changed dynamically during the
                test. This option will be available when load_type
                is bandwidth.

random_seed
                Defines the heights in the random phases of the test.
                If the value is zero, the seed is determined by the
                time the test is executed. Possible values range
                from 0 to 4294967295. The default is 123456.

connections_attempted
                Specifies the upper limit for the number of connection
                attempts that are made throughout the test. Possible
                values range from 0 to 4294967295. The default is 4294967295.

open_connections
                Specifies the upper limit for the number of open connections
                throughout the test. Possible values range from 0 to 4294967295.
                The default is 4096.

transactions_attempted
                Specifies the upper limit for the number of transaction
                attempts that are made throughout the test. Possible values
                range from 0 to 4294967295. The default is 4294967295.

load_pattern
                Determines the traffic pattern in which the load is
                generated for the test phase. The default is flat.

load_phase_duration_units
                Specifies the units of time for the selected
                phase's load generation. The default is seconds.

phase_name
                Specifies the name for the load phase.

height
                The total amount of load related to the load type
                that the system achieves. Possible values range
                from 0 to 10000000. The default is 30.

ramp_time
                The amount of time each step takes to reach the load
                type applied to height. Possible values range
                from 0 to 40000000. The default is 20.
                The load_phase_duration_units you specify determines
                the units for this field. This option will be available
                when load_pattern value is stair|flat|sinusoid|random|sawtooth.

steady_time
                The amount of time the step takes. Possible values range
                from 0 to 40000000. The default is 40.
                The load_phase_duration_units you specify determines
                the units for this field. This option will be available
                when load_pattern value is stair|flat|sinusoid|random|sawtooth.

burst_time
                The duration of the burst. Possible values range
                from 0 to 40000000. The default is 20.
                The load_phase_duration_units you specify determines
                the units for this field. This option will be
                available when load_pattern value is burst.

pause_time
                The pause time between bursts. Possible values range
                from 0 to 40000000. The default is 20.
                The load_phase_duration_units you specify determines
                the units for this field.
                This option will be available when load_pattern value
                is burst|sawtooth.

period
                The amount of time to gradually achieve the total load
                designated in the height field. Possible values range
                from 0 to 1000. The load_phase_duration_units you
                specify determines the units for this field.
                This option will be available when load_pattern value
                is sinusoid.

repetitions
                The number of times that you want the pattern to repeat.
                Possible values range from 0 to 100. The default is 1.
                This option will be available when load_pattern value
                is stair|burst|sinusoid|random|sawtooth.

Arguments Unsupported by Save as HLTAPI:

None
Ciscospecific Arguments:

The following arguments are specific to the Cisco HLTAPI but are not supported by Spirent HLTAPI:

call_accept_delay_enable
communication_resource_priority
device
desired_refresh_interval
encapsulation
gateway_enable
gateway_ipv4_address
gateway_ipv6_address
local_username_suffix_repeat
minimum_refresh_interval
network_delay_interval
network_address_translation_enable
nat_ipv4_addr
nat_ipv4_addr_step
nat_ipv4_addr_repeat
privacy_header
remote_username_suffix_repeat
register_on_enable
resource_priority
session_refresh_timer_enable
transaction_timer_t1
transaction_timer_t2
transaction_timer_t4
user_agent_refresher
Return Values:

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

handle    The handle that identifies a group of SIP emulation created
          by the ``emulation sip config`` function.

status     Success (1) or failure (0) of the operation.

log       An error message (if the operation failed).
Description:

The emulation sip config function creates, modifies, enables, disables or deletes SIPv4 emulation. Use the mode argument to specify the action to perform. (See the mode argument description for information about the actions.)

The first created SIPv4 device is emulated as SIP UASs, and the second created SIPv4 device is emulated as SIP UACs which initiate the SIP calls . Use the registration_server_enable argument to specify the SIP topology of SIP callers and callees. (See the registration_server_enable argument description for more information).

For peerto-peer SIP calls, which will be established directly between the UACs and UASs without the Proxy Server, the following arguments are required to specify the IPv4 addresses of the remote subscribers:

call_using_aor
remote_host
remote_host_step

For SIP calls through Proxy Server, which provides a name mapping function when registering the user’s locations, the following arguments are required to specify the usernames of the remote subscribers:

remote_username_prefix
remote_username_suffix
remote_username_suffix_step

After you create SIP UACs and UASs, a successful pointto-point calls should be established between the SIP callers and callees if they both specify each other as the remote subscribers. The number of UACs is supposed to be equal to the number of UASs.

Spirent HLTAPI supports creating “SIPv4 with DHCP” and “SIPv4 over PPPoX” devices by using the handle argument, which is returned from the sth::emulation_dhcp_group_config or emulation pppox, to specify on which SIPv4 emulation is to be created.

Then, you can use the “emulation_sip_control mode register” command for Spirent HLTAPI to register SIP UAs only when the SIP calls are established through a Proxy Server.

And you can use the “emulation_sip_control mode establish” command for Spirent HLTAPI to start the SIP calls both for peerto-peer or throughgoing Proxy Server SIP calls.

Once you start SIP sessions, Spirent HLTAPI handles all of the message traffic for the emulated hosts. During the test, use the emulation sip control start=individual SIP sessions.

Examples:

The following examples create peertopeer= SIP UASs and UACs:

#step1: create two SIP UASs
emulation sip config
      port_handle= port1 \
      mode= create \
      count= 2
      name= Callee
      mac_address_start= 00:10:94:00:00:01
      local_ip_addr= 192.1.0.15
      remote_ip_addr= 192.1.0.1
      local_username_prefix= callee
      local_username_suffix= 1000
      registration_server_enable= 0
      call_using_aor= 1
      remote_host= 192.1.0.1

#step2: create two SIP UACs
emulation sip config
      port_handle= port2
      mode= create
      count= 2
      name= Caller
      mac_address_start= 00:10:94:00:01:01
      local_ip_addr= 192.1.0.1
      remote_ip_addr= 192.1.0.15 \
      local_username_prefix= caller \
      local_username_suffix= 3000 \
      registration_server_enable= 0 \
      call_using_aor= 1 \
      remote_host= 192.1.0.15 \

Sample output for step 1:

{handle host1} {status 1}

Sample output for step 2:

{handle host2} {status 1}

The following examples create throughgoing= Proxy Server SIP UASs and UACs:

#step1: create 10 SIP UASs
emulation sip config
      port_handle= port1
      mode= create
      count= 10
      mac_address_start= 00:10:94:00:02:01
      vlan_id1= 500
      vlan_id1= 500
      local_ip_addr= 150.1.0.5
      remote_ip_addr= 150.1.0.1
      local_username_prefix= callee
      local_username_suffix= 3000
      remote_username_prefix= caller
      remote_username_suffix= 1000
      registration_server_enable= 1
      registrar_address= 150.48.0.10
      call_using_aor= 0

#step2: create 10 SIP UACs
emulation sip config
     port_handle= port2
     mode= create
     count= 10
     mac_address_start= 00:10:94:00:03:01
     vlan_id1= 600
     local_ip_addr= 160.1.0.2
     remote_ip_addr= 160.1.0.1
     local_username_prefix= caller
     local_username_suffix= 1000
     remote_username_prefix= callee
     remote_username_suffix= 3000
     registration_server_enable= 1
     registrar_address= 150.48.0.10
     call_using_aor= 0

Sample output for step 1:

{handle host3} {status 1}]}

Sample output for step 2:

{handle host4} {status 1}

The following examples create “SIPv4 with DHCP” device:

#step1: create DHCP port configuration
set returnedString [emulation dhcp config
                    mode= create
                    port_handle= port1]

keylget returnedString handles dhcpHandle

#step2: create a DHCP client host
set returnedString [emulation dhcp group config
                       handle= $dhcpHandle
                       mode= create
                       encap= ethernet_ii_vlan
                       num_sessions= 10
                       mac_addr= 00:10:94:00:00:01
                       mac_addr_step= 00.00.00.00.00.01
                       vlan_id= 500]

 keylget returnedString handle dhcpClient

#step3: create a "SIPv4 with DHCP" device
set returnedString [emulation sip config
                       handle= $ dhcpClient
                       mode= create
                       name= Caller1
                       local_username_prefix= caller
                       local_username_suffix= 1000
                       registration_server_enable= 1
                       registrar_address= 150.48.0.20
                       media_payload_type= SIP_MEDIA_ITU_G711_64K_160BYTE
                       media_port_number= 50550
                       remote_username_prefix= callee
                       remote_username_suffix= 3000
                       remote_username_suffix_step= 3]

The following examples create “SIPv4 over PPPoX” device:

#step1: create a PPPoE host
set returnedString [HLTCRS pppox config
                       mode= create
                       port_handle= port1
                       protocol=  pppoe
                       num_sessions= 10
                       encap= ethernet_ii
                       mac_addr= 00.00.12.00.01.02
                       mac_addr_step= 00.00.00.00.00.01
                       username= spirent
                       password= spirent]

  keylget returnedString handle pppHandle

#step2: create a "SIPv4 over PPPoE" device
set returnedString [emulation sip config
                        handle= $pppHandle
                        mode= create
                        local_username_prefix= caller
                        local_username_suffix= 1000
                        registration_server_enable= 1
                        registrar_address= 150.48.0.20
                        media_payload_type= SIP_MEDIA_ITU_G711_64K_160BYTE
                        media_port_number= 50550
                        remote_username_prefix= callee
                        remote_username_suffix= 3000
                        remote_username_suffix_step= 3]

The following example modifies the created SIP host:

emulation sip config
     handle= host1
     mode= modify
     desired_expiry_time= 100000
     call_accept_delay_enable= 1
     response_delay_interval= 5
     media_payload_type= SIP_MEDIA_ITU_G711_64K_160BYTE
     media_port_number= 50550 \

Sample output for example shown above:

{handle host1} {status 1}

The following example deletes the specified SIP hosts:

emulation sip config
     mode= delete
     handle= host1 host2\

Sample output for example shown above:

{status 1}

The following example enables the specified SIP hosts:

emulation sip config
     mode= enable
     handle= host1 host2\

Sample output for example shown above:

{status 1}

The following example disable all SIP hosts on the specified port:

emulation sip config
     mode= disable
     port_handle= port1\

Sample output for example shown above:

{status 1}

emulation sip control

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
emulation sip control allows the users to register, deregister, starts, stops the SIP sessions as well as it provides few more timing parameters to control over session actions.

Synopsis:

Note: M indicates the argument is `Mandatory`.

   emulation sip control
      handle= <sip_emulation_handle_list> M
      action= {register|deregister|establish|terminate} M
      action_control= {start|stop}
      batch_rate= <integer>

Arguments:

handle
                Specifies a list of SIP emulation handles. This argument
                is `Mandatory`.

action
                Specifies the action that will be performed on the SIP session.
                This argument is `Mandatory`. The actions are described below::

                 register - Registers the specified UA. This action is valid
                       only for throughgoing Proxy Server SIP UAs.

                 deregister - Deregisters the alreadyregistered UA. This action
                       is valid only for throughgoing Proxy Server SIP UAs.

                 establish - Starts SIP call sessions between the UAs. This
                        action is valid only for SIP UACs (callers) which would
                        initiate SIP calls.

                 terminate - Stops the SIP calls between the UAs. This action
                        is valid only for SIP UACs (callers).

action_control
                Used to give commands to the action specified by action at a fixed
                rate. The action is performed on each emulation determining the
                state. Possible values are start and stop.
                start - Starts the specified action specified by action.
                stop - Stops the specified action specified by action.

batch_rate
                To be used with the action_control argument to specify the number
                of sessions that will perform the specified action within
                a second. The default is 1.You can use this argument when
                you specify the action_control argument.
Ciscospecific Arguments:

The following arguments are specific to the Cisco HLTAPI but are not supported by Spirent HLTAPI:

batch_rate_interval
job_handle
Return Values:

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status    Success (1) or failure (0) of the operation.
log      An error message (if the operation failed).
Description:

The emulation sip control function registers, deregisters, establishes and terminates the SIP sessions. Use the action argument to specify the action to perform. (See the action argument description for information about the actions.)

For peerto-peer SIP UAs, there is no registration transaction, you can use action establish or terminate to start or stop SIP call sessions between the UAs.

For throughgoing Proxy Server SIP UAs, you can use -action register or deregister to register or deregister the specified UAs. Only when the UAs have registered successfully, then you can use action “establish” or “terminate” to start or stop SIP calls from the UACs.

The emulation sip control function also provides timing parameters to control over session actions. You can use action_control consistent with batch_rate to specify the number of SIP sessions to perform the specified action at a fix rate.

Examples:

The following example registers the specified SIP host:

emulation sip control
       handle= host1
       action= register

The following example uses action_control= to register SIP UAs at a particular batch rate:

emulation sip control
       handle= host1
       action= register
       action_control= start
       batch_rate= 10 \

The following example starts a SIP call:

emulation sip control
      action= establish
      handle= host1

Sample Output:

{status 1}

emulation sip stats

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
emulation sip stats allows user to collect or clear statistics about the SIP device.

Synopsis:

Note: M indicates the argument is `Mandatory`.

   emulation sip stats
        handle= <sip_emulation_handle> M
        action=  {collect|clear} M
        mode= {device}

Arguments:

handle
                Specifies a list of handles to query statistics from. Handles
                must be preselected for statistics collection. This argument
                is `Mandatory`.

action
                Specifies the action to do with the SIP stats for the SIP
                device. This argument
                is `Mandatory`. Possible values are collect and clear::

                 collect - Gets statistics of the specified SIP UAs.

                 clear - Clears statistics of the specified SIP UAs.

mode
                Defines the statistic type to be collected. Possible values are::


                 device - Collects statistics of the SIP device block.

                Note: The "instance" option is not supported.
Ciscospecific Arguments:

The following arguments are specific to the Cisco HLTAPI but are not supported by Spirent HLTAPI:

device_instance
Return Values:

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status         Retrieves a value indicating the success(1) or failure(0)
               of the operation.

log            Retrieves a message describing the last error that occurred
               during the operation. If the operation was successful
               - {status 1} - the log value is null.

The following keys are Session Statistics:

registration_state

The registration state of the SIPv4 device block. Possible values are:

NOT_REGISTERED
           SIP UA is not registered with the SIP server.

REGISTERING
           SIP UA is currently trying to register with the SIP server.

REGISTRATION_SUCCEEDED
           SIP UA has successfully registered with the SIP server.

REGISTRATION_FAILED
           SIP UA failed to register with the SIP server.

REGISTRATION_CANCELED
           Sending the SIP User Agent registration request to the SIP
           server is cancelled.

UNREGISTERING
           SIP User Agent is attempting to unregister from the SIP
           server.
attempted_sessions
The count for how many UAs will attempt to start call.
successful_sessions
The count for how many UAs started call successfully.
unsuccessful_sessions
The count for how many UAs started calls unsuccessfully.
avg_establishment_time
The average time of all SIP UAs calls.
min_establishment_time
The minimum time in all SIP UAs calls.
max_establishment_time
The maximum time in all SIP UAs calls.
successful_registrations
Sip UAs count that registered to SIP Proxy Server successfully.
unsuccessful_registrations
Sip UAs count that registered to SIP Proxy Server unsuccessfully.
avg_registration_time
The average registration time of all SIP UAs registration.
min_registration_time
The minimum time in all SIP UAs registration.
max_registration_time
The maximum time in all SIP UAs registration.
Description:

The emulation sip stats function provides information about the specified SIP device block.

For “SIP with DHCP” or “SIP over PPPoX” device, you should bind DHCP client to DHCP server or connect PPPoX client to PPPoX Server successfully before you use emulation sip stats to get SIP information.

This function returns the requested data and a status value (1 for success). If there is an error, the function returns the status value (0) and an error message. Function return values are formatted as a keyed list (supported by the Tcl extension software - TclX). Use the TclX function keylget to retrieve data from the keyed list. (See Return Values for a description of each key.)

Examples:

Sample Input:

emulation sip stats
         action= collect
         mode= device
         handle= host1\

Sample Output:

{host1 {{registration_state REGISTRATION_SUCCEEDED}}}
{session {{host1 {{min_registration_time 4} {successful_sessions 10}
{avg_registration_time 7} {unsuccessful_sessions 0}
{successful_registrations 10}{max_establishment_time 30}
{max_registration_time 10} {unsuccessful_registrations 0}
{min_establishment_time 11} {attempted_sessions 10}
{avg_establishment_time 16}}}}} {status 1}

End of Procedure Header