TFM Message Expect Actions
TFM actions are concrete test actions derived from Action. See Resip TFM. Each concrete action acts as a memento; the actual exectution of the action is delayed until triggered by the TFM Implementation#Intepreter
Contents
ReInvite
Accessed with the reInvite method on TestSipEndPoint. Creates an INVITE message within an existing INVITE dialog. Throws if there is no existing INVITE dialog -- the throw will cause the test to fail.
Subscribe
Accessed with the subscribe method on TestSipEndPoint. Creates and sends a SUBSCRIBE message. There are several interfaces for specifying the request Url (the document of interest).
SipEndPointAction
Refer
ExpectAction
InviteReferReplaces
Retransmit
MessageExpectAction
Overrides the operator() and delegates message creation to the virtual method go. This hides message sending and more importantly, allows the geneneric application of message conditioners before the message is sent. See Resip TFM#Message Conditioners.
Macros
Most of the derived MessageExpectActions are declared via macro
EXPECT_FUNCTOR
Declares an Action triggered by a SIP message. The TetsSipEndPoint involved is available to the action's function.
Dump
This is a debugging aid. The triggering message is logged.
Ack
Used through out sanityTests.cxx for INVITE transactions. Creates the request in dialog for successes. Returns the ACK for sendinf in INVITE success and failure cases.
AckReferred
Not used. Not defined!?
Bye
Creates the BYE message in dialog.
Cancel
Creates the CANCEL message against the sent INVITE (note that TestSipEndPoint assumes a single simultaneous INVITE session per endpoint).
Notify200
Creates the NOTIFY/200 response in the appropriate dialog, as determined by target.
EXPECT_FUNCTOR_RESPONSE
Declares an Action triggered by a SIP message. The action's function is defined to respond with a SIP response with the configured response code. If there is a dialog, the response is sent in dialog. Each action can be accessed by a method on TestSipEndPoint of similar name. For example, Ring is created with a call to the method ring.
Most of this class of actions is better replaced with a generic send response action. E.g. send(403). Some of them have semantic content identifiable beyond the specific response code carried and are helpful, for exameple, ring, and ok. Arguably, each of these should take an optional reponse code parameter to allow 183, 202 (respectively) or other possible codes.
These actions are used throughout sanityTests.cxx
Ring
Ring183
Ok
Send403
Send404
Send415
Send480
Send486
Send487
Send202
Send100
Send503
EXPECT_FUNCTOR_TARGETED
This defines a set of actions simialr to EXPECT_FUNCTOR_RESPONSE, but stores a target that is likely different from the sender. The implementation of the action's function is in TestSipEndPoint.cxx
ByeTo
Used to implement bye() and bye with target argument. See testInviteCallerHangsUp in sanityTests.cxx
Notify200To
Used to send a notification of an INVITE 200 receipt for transfer. See testAttendedExtensionToExtensionTransfer in sanityTests.cxx.
RawReply
Not used. Present to allow malformed SIP messages. Useful for low level stack negative tests.
Send302
Looks just like SendX. Should be subsumed by send(x)?