Toolpack monitoring sip simulator
(10 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | The Toolpack Monitoring " | + | [[Image:Monitoring_generator_overview.png|thumb|300px]] |
+ | The Toolpack Monitoring "SIP Simulator" is a behavior that can be attached to a call flow, and that will send simulated SIP messages to a destination host, simulating that a SIP call is being monitored. | ||
The SIP simulator sends SIP messages, but does not expect any reply from the destination. | The SIP simulator sends SIP messages, but does not expect any reply from the destination. | ||
It simulates both sides of the SIP call (simulating a sip "Invite" from one side, then "100-Trying" from the other side, etc.) | It simulates both sides of the SIP call (simulating a sip "Invite" from one side, then "100-Trying" from the other side, etc.) | ||
− | It also | + | It can also send a copy of the monitored legs audio using RTP packets, as indicated in the SDP of the simulated SIP message (Invite, 183-Progress and 200-OK). |
== SIP simulator call flow == | == SIP simulator call flow == | ||
− | Once attached to a call flow, the " | + | Once attached to a call flow, the "SIP simulator" behavior will identify the "main" legs of the attached call flow (one incoming and one outgoing), and watch for call state changes of these legs. |
Corresponding SIP messages are generated. | Corresponding SIP messages are generated. | ||
− | [[ | + | [[Image:SIP_simulator_call_flow.png|560px]] |
=== Attaching to a monitoring call flow === | === Attaching to a monitoring call flow === | ||
Line 23: | Line 24: | ||
=== RTP generation options === | === RTP generation options === | ||
− | The | + | The SIP simulator can send RTP packets that contain a copy of the audio of the monitored call. These RTP packets are sent by a VOIP resource on the [[TMedia]] unit. |
RTP generation options are: | RTP generation options are: | ||
− | * The VOIP Media NAP to generate RTP from. This NAP defines: | + | * The VOIP Media NAP to generate RTP from. "None" will disable RTP generation. This NAP defines: |
** The source IP interface, and port range to use | ** The source IP interface, and port range to use | ||
** A default "profile" | ** A default "profile" | ||
Line 38: | Line 39: | ||
=== SIP generation options === | === SIP generation options === | ||
− | The "SIP Simulator" will send SIP packets from the application using the following options: | + | The "SIP Simulator" will send SIP packets from the application using the following "source" options: |
* Source "host" IP interface (or "ANY" to choose by subnet matching or default gateway) | * Source "host" IP interface (or "ANY" to choose by subnet matching or default gateway) | ||
* Source UDP port | * Source UDP port | ||
Line 47: | Line 48: | ||
* The simulated "from" IP address and port (can be "fictive" IP address representing one "side" of the call) | * The simulated "from" IP address and port (can be "fictive" IP address representing one "side" of the call) | ||
* The simulated "to" IP address and port (can be "fictive" IP address representing one "side" of the call) | * The simulated "to" IP address and port (can be "fictive" IP address representing one "side" of the call) | ||
− | * The SIP message text of each SIP message, built using [[toolpack_monitoring_sip_simulator_variables|well-known variables]] | + | * The SIP message text of each SIP message, built using [[toolpack_monitoring_sip_simulator_variables|well-known variables]], and user-defined variables. |
** From caller: | ** From caller: | ||
*** SIP INVITE | *** SIP INVITE | ||
Line 63: | Line 64: | ||
*** SIP 200 OK (after BYE or CANCEL) | *** SIP 200 OK (after BYE or CANCEL) | ||
*** SIP 487 Request Terminated | *** SIP 487 Request Terminated | ||
+ | |||
+ | === Example SIP message configuration === | ||
+ | INVITE sip:#{called}@#{callee_sip_ip}:#{callee_sip_port} SIP/2.0 | ||
+ | Call-ID:#{call_id} | ||
+ | X-Monitored-Sender:#{sender_label}:#{sender} | ||
+ | X-Isdn-Info:interface-id:#{isdn_interface_id};channel-number:#{isdn_channel_number} | ||
+ | X-Example-Var:#{example_var} | ||
+ | To:<sip:#{sip_to}> | ||
+ | From:#{calling_display}<sip:#{sip_from}>;tag=#{caller_tag} | ||
+ | Remote-Party-ID:#{calling_private_display}<sip:#{calling_private}@#{caller_sip_ip}:#{caller_sip_port}>;party=calling;screen=#{calling_screening};privacy=#{calling_presentation};noa=#{calling_noa} | ||
+ | Privacy:#{calling_privacy} | ||
+ | Contact:sip:#{calling}@#{caller_sip_ip}:#{caller_sip_port} | ||
+ | Via:SIP/2.0/UDP #{caller_sip_ip}:#{caller_sip_port};branch=#{branch};rport | ||
+ | User-to-User:#{uui};encoding=text;purpose=isdn-interwork;content=isdn-uui | ||
+ | Date:#{date} | ||
+ | Timestamp:#{timestamp} | ||
+ | CSeq:#{cseq} | ||
+ | Max-Forwards:70 | ||
+ | #{caller_content} | ||
+ | |||
For more information about available variables used to generate the SIP messages (SIP headers and body), read the following article: | For more information about available variables used to generate the SIP messages (SIP headers and body), read the following article: | ||
[[toolpack_monitoring_sip_simulator_variables|SIP Simulator messages formatting variables]] | [[toolpack_monitoring_sip_simulator_variables|SIP Simulator messages formatting variables]] | ||
− | === SIP | + | === SIP and RTP destination === |
+ | The generated SIP messages are sent to the specified IP address and port. | ||
+ | |||
+ | The generated RTP packets are sent to the specified IP address (can be different from SIP destination IP address), using a port chosen from the NAP's port ranges, and indicated to the remote equipment through the SDP in the SIP messages ("INVITE", "183-Progress" and "200-OK"). | ||
== Using multiple destinations == | == Using multiple destinations == | ||
+ | If necessary, multiple redundant destinations can be configured. Each destination includes: | ||
+ | * SIP destination IP and port | ||
+ | * RTP destination IP | ||
+ | * Optional destination "TCP" polling IP and port | ||
+ | * A priority | ||
=== Destination polling === | === Destination polling === | ||
+ | To determine which destination is available, a "ping" will be made toward the destination SIP IP address. | ||
+ | |||
+ | In addition to the "ping", a "TCP" polling can be performed, by attempting a TCP connection to the given IP address and port. | ||
+ | |||
+ | A destination is considered available if the "ping" and the "TCP connection polling" (if used) both succeed. | ||
+ | |||
+ | The available destination with the highest priority will be chosen. | ||
+ | |||
+ | == Configuring SIP Simulators in Toolpack Web Portal == | ||
+ | Developers can use SIP Simulators in their application by using class CTBCAFSipSimulator to define SIP simulator parameters and allocate SIP sender socket, and attach behavior CTBCAFCallBehaviorSipSimulator to their call flow. | ||
+ | |||
+ | Non-developers that use Toolpack system with built-in Gateway application can also use SIP Simulators and attach them to ISDN analyzers. | ||
+ | |||
+ | For more information and step-by-step screen shots of the configuration of SIP Simulators, please refer to the [[Web Portal Tutorial Guide v2.9]]. | ||
+ | |||
+ | [[Category:Tmonitor_OAM%26P|SIP Simulator]] |
Latest revision as of 13:40, 1 June 2017
The Toolpack Monitoring "SIP Simulator" is a behavior that can be attached to a call flow, and that will send simulated SIP messages to a destination host, simulating that a SIP call is being monitored.
The SIP simulator sends SIP messages, but does not expect any reply from the destination. It simulates both sides of the SIP call (simulating a sip "Invite" from one side, then "100-Trying" from the other side, etc.)
It can also send a copy of the monitored legs audio using RTP packets, as indicated in the SDP of the simulated SIP message (Invite, 183-Progress and 200-OK).
Contents |
SIP simulator call flow
Once attached to a call flow, the "SIP simulator" behavior will identify the "main" legs of the attached call flow (one incoming and one outgoing), and watch for call state changes of these legs. Corresponding SIP messages are generated.
Attaching to a monitoring call flow
The SIP simulator behavior can be attached to a standard call flow (CTBCAFBrige for example, which deals with a bridge between one incoming and one outgoing call legs).
It can also be attached to a "monitoring" call flow that receives call state change events from an analyzer (like an ISDN Analyzer).
In both cases, it will generate SIP messages based on the call state changes event received (call accepted, alerting, answered, etc...)
SIP simulator configuration
The SIP simulator has multiple options that can be configured (from it's "parameters" class for developers, or from the Web Portal for Toolpack Gateway users).
RTP generation options
The SIP simulator can send RTP packets that contain a copy of the audio of the monitored call. These RTP packets are sent by a VOIP resource on the TMedia unit.
RTP generation options are:
- The VOIP Media NAP to generate RTP from. "None" will disable RTP generation. This NAP defines:
- The source IP interface, and port range to use
- A default "profile"
- A "profile" to use instead of the NAP's default profile. The profile will define:
- The codec to use (the SDP)
- The DTMF relay scheme (Note: only "in-band" and "RFC-2833" being available with the "SIP simulator")
- Note: The "SIP" options available in the "profile" page in the web portal are ignored here
- Audio options (volume control, voice activity detection)
- RTCP options
- IP header "TOS" field
SIP generation options
The "SIP Simulator" will send SIP packets from the application using the following "source" options:
- Source "host" IP interface (or "ANY" to choose by subnet matching or default gateway)
- Source UDP port
- IP header "TOS" field for SIP packets
SIP messages formatting
The "SIP Simulator" offers configurable SIP messages content, which will be used when necessary by the "SIP Simulator"
- The simulated "from" IP address and port (can be "fictive" IP address representing one "side" of the call)
- The simulated "to" IP address and port (can be "fictive" IP address representing one "side" of the call)
- The SIP message text of each SIP message, built using well-known variables, and user-defined variables.
- From caller:
- SIP INVITE
- SIP ACK (after the INVITE 200 OK)
- SIP BYE
- SIP CANCEL
- SIP 200 OK (after BYE)
- SIP ACK (after 487)
- From callee:
- SIP 100 Trying
- SIP 183 Session Progress
- SIP 200 OK
- SIP Decline
- SIP BYE
- SIP 200 OK (after BYE or CANCEL)
- SIP 487 Request Terminated
- From caller:
Example SIP message configuration
INVITE sip:#{called}@#{callee_sip_ip}:#{callee_sip_port} SIP/2.0 Call-ID:#{call_id} X-Monitored-Sender:#{sender_label}:#{sender} X-Isdn-Info:interface-id:#{isdn_interface_id};channel-number:#{isdn_channel_number} X-Example-Var:#{example_var} To:<sip:#{sip_to}> From:#{calling_display}<sip:#{sip_from}>;tag=#{caller_tag} Remote-Party-ID:#{calling_private_display}<sip:#{calling_private}@#{caller_sip_ip}:#{caller_sip_port}>;party=calling;screen=#{calling_screening};privacy=#{calling_presentation};noa=#{calling_noa} Privacy:#{calling_privacy} Contact:sip:#{calling}@#{caller_sip_ip}:#{caller_sip_port} Via:SIP/2.0/UDP #{caller_sip_ip}:#{caller_sip_port};branch=#{branch};rport User-to-User:#{uui};encoding=text;purpose=isdn-interwork;content=isdn-uui Date:#{date} Timestamp:#{timestamp} CSeq:#{cseq} Max-Forwards:70 #{caller_content}
For more information about available variables used to generate the SIP messages (SIP headers and body), read the following article:
SIP Simulator messages formatting variables
SIP and RTP destination
The generated SIP messages are sent to the specified IP address and port.
The generated RTP packets are sent to the specified IP address (can be different from SIP destination IP address), using a port chosen from the NAP's port ranges, and indicated to the remote equipment through the SDP in the SIP messages ("INVITE", "183-Progress" and "200-OK").
Using multiple destinations
If necessary, multiple redundant destinations can be configured. Each destination includes:
- SIP destination IP and port
- RTP destination IP
- Optional destination "TCP" polling IP and port
- A priority
Destination polling
To determine which destination is available, a "ping" will be made toward the destination SIP IP address.
In addition to the "ping", a "TCP" polling can be performed, by attempting a TCP connection to the given IP address and port.
A destination is considered available if the "ping" and the "TCP connection polling" (if used) both succeed.
The available destination with the highest priority will be chosen.
Configuring SIP Simulators in Toolpack Web Portal
Developers can use SIP Simulators in their application by using class CTBCAFSipSimulator to define SIP simulator parameters and allocate SIP sender socket, and attach behavior CTBCAFCallBehaviorSipSimulator to their call flow.
Non-developers that use Toolpack system with built-in Gateway application can also use SIP Simulators and attach them to ISDN analyzers.
For more information and step-by-step screen shots of the configuration of SIP Simulators, please refer to the Web Portal Tutorial Guide v2.9.