Ignore:
Timestamp:
Jun 20, 2007 10:03:46 AM (17 years ago)
Author:
bennylp
Message:

More on ticket #399: a)send full offer on 200/OK response when re-INVITE does not have SDP, b) added on_create_offer() callback, c) handle some error cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/sdp_neg.h

    r1072 r1379  
    5151 *     create_w_local_offer()  +-------------+  send_local_offer() 
    5252 *     ----------------------->| LOCAL_OFFER |<----------------------- 
    53  *    |                        +-------------+                        | 
    54  *    |                               |                               | 
    55  *    |           set_remote_answer() |                               | 
    56  *    |                               V                               | 
    57  * +--+---+                     +-----------+     negotiate()     +------+ 
     53 *    |                        +-------------+______                  | 
     54 *    |                               |             \______ cancel()  | 
     55 *    |           set_remote_answer() |                    \______    | 
     56 *    |                               V                            \  | 
     57 * +--+---+                     +-----------+     negotiate()     +-~----+ 
    5858 * | NULL |                     | WAIT_NEGO |-------------------->| DONE | 
    5959 * +------+                     +-----------+                     +------+ 
     
    173173 * the negotiator state will move to PJMEDIA_SDP_NEG_STATE_DONE. 
    174174 *  
     175 * 
     176 * \subsection sdpneg_cancel_offer Cancelling an Offer 
     177 * 
     178 * In other case, after an offer is generated (negotiator state is in 
     179 * PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER), the answer may not be received, and 
     180 * application wants the negotiator to reset itself to its previous state. 
     181 * Consider this example: 
     182 * 
     183 *  - media has been established, and negotiator state is 
     184 *    PJMEDIA_SDP_NEG_STATE_DONE. 
     185 *  - application generates a new offer for re-INVITE, so in this case 
     186 *    it would either call #pjmedia_sdp_neg_send_local_offer() or 
     187 *    #pjmedia_sdp_neg_modify_local_offer() 
     188 *  - the negotiator state moves to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER 
     189 *  - the re-INVITE was rejected with an error 
     190 * 
     191 * Since an answer is not received, it is necessary to reset the negotiator 
     192 * state back to PJMEDIA_SDP_NEG_STATE_DONE so that the negotiator can 
     193 * create or receive new offer. 
     194 * 
     195 * This can be accomplished by calling #pjmedia_sdp_neg_cancel_offer(), 
     196 * to reset the negotiator state back to PJMEDIA_SDP_NEG_STATE_DONE. In 
     197 * this case, both active local and active remote will not be modified. 
    175198 * 
    176199 * \subsection sdpneg_create_answer Generating SDP Answer 
     
    599622 
    600623/** 
     624 * Cancel previously sent offer, and move negotiator state back to 
     625 * previous stable state (PJMEDIA_SDP_NEG_STATE_DONE). The negotiator 
     626 * must be in PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER state. 
     627 * 
     628 * @param neg           The negotiator. 
     629 * 
     630 * @return              PJ_SUCCESS or the appropriate error code. 
     631 */ 
     632PJ_DECL(pj_status_t) pjmedia_sdp_neg_cancel_offer(pjmedia_sdp_neg *neg); 
     633 
     634 
     635/** 
    601636 * Negotiate local and remote answer. Before calling this function, the 
    602637 * SDP negotiator must be in PJMEDIA_SDP_NEG_STATE_WAIT_NEGO state. 
Note: See TracChangeset for help on using the changeset viewer.