Files
Michael Jerris d8c4d22d40 merge whitespace fixes from sofia-sip tree
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10802 d0543943-73ff-0310-b7d9-9358b9ac24b2
2008-12-16 18:05:22 +00:00

160 lines
8.0 KiB
Plaintext

#
# MSCs Illustrating NTA Usage
#
User Agent Client Initiating a Call
-----------------------------------
APP ¦ NTA
User ¦
Agent ¦
| ¦
| nta = nta_agent_create
|- - - - - - - - - - - - - - - - -> NTA
| (msg_cb, contact) ¦ agent
| ¦ |
| ¦ |
|- - ->Call ¦ |
| | ¦ |
| | leg = nta_leg_create |
| |- - - - - - -¦- - - - - - -|- - - -> leg
| |(nta, leg_cb, ..., To, From, ... ) |
| | ¦ | |
| | ¦ | |
| | oreq = nta_outgoing_create| |
| |- - - - - - -¦- - - - - - -|- - - - - | - - -> outgoing
| | (leg, response_cb, INVITE, url, headers...) |
| | ¦ | | |
| | ¦ | | | INVITE
| | ¦ | | |---->
| | ¦ | | |
| | ¦ | | | 100 Trying
| | ¦ | | |<----
| | ¦ | | |
| | ¦ | | | 180 Ringing
| | ¦ | response_cb(180) |<----
| ALERT |<--------------------------|----------|------------|
|<-------| ¦ | | | 200 OK
| | ¦ | response_cb(200) |<----
|OFFHOOK |<--------------------------|----------|------------|
|<-------| ¦ | | |
| | nta_outgoing_destroy | | |
| |---------------------------|----------|----------->|
| | ¦ | | X
| | nta_leg_destroy | |
| |---------------------------|--------->|
| | ¦ | X
| | leg = nta_leg_create |
| |- - - - - - -¦- - - - - - -|- - - -> leg
| |(nta, leg_cb, ..., To+tag, From, ...) |
| | ¦ | |
| | oreq = nta_outgoing_create| |
| |- - - - - - -¦- - - - - - -|- - - - - | - - -> outgoing
| | (leg, ..., ACK, url, headers) | |
| | ¦ | | | ACK
| | ¦ | | |---->
| | nta_outgoing_destroy | | |
| |---------------------------|----------|----------->|
| | ¦ | | X
User Agent Client Releasing a Call
-----------------------------------
APP ¦ NTA
User Call ¦ NTA leg
Agent | ¦ agent |
| | ¦ | |
|ONHOOK | ¦ | |
|------->| ¦ | |
| |oreq = nta_outgoing_create | |
| |- - - - - - -¦- - - - - - -|- - - - - | - - -> outgoing
| | (leg, ..., BYE, url, headers) | |
| | ¦ | | | BYE
| | ¦ | | |---->
| | ¦ | | |
| | ¦ | | | 180 Ringing
| | ¦ | response_cb(180) |<----
| |<--------------------------|----------|------------|
| | ¦ | | | 200 OK
| | ¦ | response_cb(200) |<----
| |<--------------------------|----------|------------|
| | ¦ | | |
| |nta_outgoing_destroy | | |
| |---------------------------|----------|----------->|
| | ¦ | | X
| |nta_leg_destroy | |
| |---------------------------|--------->|
| | ¦ | X
| X ¦ |
User Agent Server Accepting a Call
----------------------------------
APP ¦ NTA
User ¦ NTA
Agent ¦ agent
| ¦ | INVITE
| ¦ |<----------------------
| ¦ |
| msg_cb(leg, msg) |
|<-----------------------------------|
| ¦ |
|- - -> Call ¦ |
| | nta_msg_leg ¦ |
| |-------------------------->|- - - -> leg
| | (msg, request_cb) | |
| | ¦ | |- - - -> incoming
| | nta_leg_tag ¦ | | |
| |---------------------------|--------->| |
| | (tag) ¦ | | |
| | ¦ | request_cb(reply) |
| |<--------------------------|----------|------------|
| | ¦ | | |
| | nta_incoming_bind(ireq, ack_cb) | |
| |---------------------------|----------|----------->|
| | ¦ | | |
| | nta_incoming_reply(180) | | |
| ALERT |---------------------------|----------|----------->| 180 Ringing
|<-------| ¦ | | |---->
| | ¦ | | |
|OFFHOOK | ¦ | | |
|------->| nta_incoming_reply | | |
| |---------------------------|----------|----------->| 200 Ok
| | (200, sdp) ¦ | | |---->
| | ¦ | | |
| | ¦ | | | ACK
| | ¦ | |ack_cb(ACK) |<----
| |<--------------------------|----------|------------|
| | ¦ | | |
| | nta_incoming_destroy(ireq)| | |
| |---------------------------|----------|----------->|
| | ¦ | | X
User Agent Server Receiving a Call Release
------------------------------------------
APP ¦ NTA
User Call ¦ NTA leg
Agent | ¦ agent |
| | ¦ | | BYE
| | ¦ | |<------------------
| | ¦ | |
| | ¦ | |- - - -> Incoming
| | ¦ | | |
| | ¦ | request_cb(reply) |
| ONHOOK |<--------------------------|----------|------------|
|<-------| ¦ | | |
| | nta_incoming_reply(200) | | |
| |---------------------------|----------|----------->| 200 Ok
| | (200, sdp) ¦ | | |---->
| | ¦ | | |
| | nta_incoming_destroy(ireq)| | |
| |---------------------------|----------|----------->|
| | ¦ | | X
| |nta_leg_destroy | |
| |---------------------------|--------->|
| X ¦ | X