Changeset 324
- Timestamp:
- Mar 17, 2006 5:57:52 PM (19 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/main.c
r323 r324 571 571 if (status == PJ_SUCCESS) 572 572 status = pjsip_inv_send_msg(pjsua.calls[current_call].inv, 573 tdata , NULL);573 tdata); 574 574 575 575 if (status != PJ_SUCCESS) -
pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h
r283 r324 187 187 * 188 188 * @param endpt The endpoint instance. 189 * @param app_module Application module.190 189 * @param callback Callback structure. 191 190 * … … 193 192 */ 194 193 PJ_DECL(pj_status_t) pjsip_inv_usage_init(pjsip_endpoint *endpt, 195 pjsip_module *app_module,196 194 const pjsip_inv_callback *cb); 197 195 … … 519 517 * @param inv The invite session. 520 518 * @param tdata The message to be sent. 521 * @param token The token is an arbitrary application data that522 * will be put in the transaction's mod_data array,523 * at application module's index. Application can inspect524 * this value when the framework reports the completion525 * of the transaction that sends this message.526 519 * 527 520 * @return PJ_SUCCESS if transaction can be initiated … … 532 525 */ 533 526 PJ_DECL(pj_status_t) pjsip_inv_send_msg(pjsip_inv_session *inv, 534 pjsip_tx_data *tdata, 535 void *token ); 527 pjsip_tx_data *tdata); 536 528 537 529 … … 559 551 560 552 553 /** 554 * Get state names for INVITE session state. 555 * 556 * @param state The invite state. 557 * 558 * @return String describing the state. 559 */ 560 PJ_DECL(const char *) pjsip_inv_state_name(pjsip_inv_state state); 561 561 562 562 563 PJ_END_DECL -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r315 r324 34 34 #define THIS_FILE "sip_invite_session.c" 35 35 36 static const char *inv_state_names[] = 37 { 38 "NULL ", 39 "CALLING ", 40 "INCOMING ", 41 "EARLY ", 42 "CONNECTING", 43 "CONFIRMED ", 44 "DISCONNCTD", 45 "TERMINATED", 46 }; 47 36 48 /* 37 49 * Static prototypes. … … 67 79 pjsip_endpoint *endpt; 68 80 pjsip_inv_callback cb; 69 pjsip_module *app_user;70 81 } mod_inv = 71 82 { … … 317 328 */ 318 329 PJ_DEF(pj_status_t) pjsip_inv_usage_init( pjsip_endpoint *endpt, 319 pjsip_module *app_module,320 330 const pjsip_inv_callback *cb) 321 331 { … … 323 333 324 334 /* Check arguments. */ 325 PJ_ASSERT_RETURN(endpt && app_module &&cb, PJ_EINVAL);335 PJ_ASSERT_RETURN(endpt && cb, PJ_EINVAL); 326 336 327 337 /* Some callbacks are mandatory */ … … 335 345 336 346 mod_inv.endpt = endpt; 337 mod_inv.app_user = app_module;338 347 339 348 /* Register the module. */ … … 361 370 } 362 371 372 373 /* 374 * Get INVITE state name. 375 */ 376 PJ_DEF(const char *) pjsip_inv_state_name(pjsip_inv_state state) 377 { 378 PJ_ASSERT_RETURN(state >= PJSIP_INV_STATE_NULL && 379 state <= PJSIP_INV_STATE_DISCONNECTED, 380 "??"); 381 382 return inv_state_names[state]; 383 } 363 384 364 385 /* … … 1549 1570 */ 1550 1571 PJ_DEF(pj_status_t) pjsip_inv_send_msg( pjsip_inv_session *inv, 1551 pjsip_tx_data *tdata, 1552 void *token ) 1572 pjsip_tx_data *tdata) 1553 1573 { 1554 1574 pj_status_t status; … … 1572 1592 1573 1593 tsx->mod_data[mod_inv.mod.id] = tsx_inv_data; 1574 tsx->mod_data[mod_inv.app_user->id] = token;1575 1594 1576 1595 } else { … … 1718 1737 } else { 1719 1738 /* Re-send BYE. */ 1720 status = pjsip_inv_send_msg(inv, tdata , NULL);1739 status = pjsip_inv_send_msg(inv, tdata); 1721 1740 } 1722 1741 … … 1852 1871 1853 1872 /* Send the request. */ 1854 status = pjsip_inv_send_msg(inv, tdata , NULL);1873 status = pjsip_inv_send_msg(inv, tdata); 1855 1874 } 1856 1875 … … 2272 2291 return; 2273 2292 2274 status = pjsip_inv_send_msg(inv, tdata , NULL);2293 status = pjsip_inv_send_msg(inv, tdata); 2275 2294 2276 2295 } … … 2311 2330 2312 2331 /* Send re-INVITE */ 2313 status = pjsip_inv_send_msg( inv, tdata , NULL);2332 status = pjsip_inv_send_msg( inv, tdata); 2314 2333 2315 2334 } else if (tsx->status_code==PJSIP_SC_CALL_TSX_DOES_NOT_EXIST || -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r323 r324 191 191 /* Send initial INVITE: */ 192 192 193 status = pjsip_inv_send_msg(inv, tdata , NULL);193 status = pjsip_inv_send_msg(inv, tdata); 194 194 if (status != PJ_SUCCESS) { 195 195 pjsua_perror(THIS_FILE, "Unable to send initial INVITE request", … … 375 375 376 376 } else { 377 status = pjsip_inv_send_msg(inv, response , NULL);377 status = pjsip_inv_send_msg(inv, response); 378 378 if (status != PJ_SUCCESS) 379 379 pjsua_perror(THIS_FILE, "Unable to send 100 response", status); … … 837 837 status = pjsip_inv_end_session(inv, st_code, NULL, &tdata); 838 838 if (status == PJ_SUCCESS) 839 status = pjsip_inv_send_msg(inv, tdata , NULL);839 status = pjsip_inv_send_msg(inv, tdata); 840 840 841 841 if (status != PJ_SUCCESS) { … … 871 871 inv->state != PJSIP_INV_STATE_CONFIRMED) 872 872 { 873 call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);873 //call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE); 874 874 } 875 875 return; … … 892 892 "Unable to retrieve currently active local SDP", 893 893 status); 894 call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);894 //call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE); 895 895 return; 896 896 } … … 902 902 "Unable to retrieve currently active remote SDP", 903 903 status); 904 call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);904 //call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE); 905 905 return; 906 906 } … … 920 920 pjsua_perror(THIS_FILE, "Unable to create media session", 921 921 status); 922 call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);922 //call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE); 923 923 return; 924 924 } … … 950 950 pjmedia_session_destroy(call->session); 951 951 call->session = NULL; 952 call_disconnect(inv, PJSIP_SC_INTERNAL_SERVER_ERROR);952 //call_disconnect(inv, PJSIP_SC_INTERNAL_SERVER_ERROR); 953 953 return; 954 954 } … … 1080 1080 return; 1081 1081 1082 status = pjsip_inv_send_msg(call->inv, tdata , NULL);1082 status = pjsip_inv_send_msg(call->inv, tdata); 1083 1083 if (status != PJ_SUCCESS) { 1084 1084 pjsua_perror(THIS_FILE, … … 1123 1123 } 1124 1124 1125 status = pjsip_inv_send_msg( call->inv, tdata , NULL);1125 status = pjsip_inv_send_msg( call->inv, tdata); 1126 1126 if (status != PJ_SUCCESS) { 1127 1127 pjsua_perror(THIS_FILE, "Unable to send re-INVITE", status); … … 1170 1170 } 1171 1171 1172 status = pjsip_inv_send_msg( call->inv, tdata , NULL);1172 status = pjsip_inv_send_msg( call->inv, tdata); 1173 1173 if (status != PJ_SUCCESS) { 1174 1174 pjsua_perror(THIS_FILE, "Unable to send re-INVITE", status); … … 1353 1353 if (pjsip_inv_end_session(call->inv, st_code, NULL, &tdata)==0) { 1354 1354 if (tdata) 1355 pjsip_inv_send_msg(call->inv, tdata , NULL);1355 pjsip_inv_send_msg(call->inv, tdata); 1356 1356 } 1357 1357 } … … 1374 1374 1375 1375 /* Initialize invite session module: */ 1376 status = pjsip_inv_usage_init(pjsua.endpt, & pjsua.mod, &inv_cb);1376 status = pjsip_inv_usage_init(pjsua.endpt, &inv_cb); 1377 1377 1378 1378 return status;
Note: See TracChangeset
for help on using the changeset viewer.