invite.msc 8 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
#
# 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
89
 |        X                          |
Pekka Pessi's avatar
Pekka Pessi committed
90 91 92 93 94 95


User Agent Server Accepting a Call
----------------------------------

                    APP  NTA
96
User                  		     NTA
Pekka Pessi's avatar
Pekka Pessi committed
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
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