Changeset 611 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Jul 18, 2006 12:33:02 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r597 r611 192 192 pjsua_call *call; 193 193 unsigned call_id; 194 pj_str_t contact; 194 195 pjsip_tx_data *tdata; 195 196 pj_status_t status; … … 233 234 call->res_time.sec = 0; 234 235 236 /* Create suitable Contact header */ 237 status = pjsua_acc_create_uac_contact(pjsua_var.pool, &contact, 238 acc_id, dest_uri); 239 if (status != PJ_SUCCESS) { 240 pjsua_perror(THIS_FILE, "Unable to generate Contact header", status); 241 PJSUA_UNLOCK(); 242 return status; 243 } 244 235 245 /* Create outgoing dialog: */ 236 246 status = pjsip_dlg_create_uac( pjsip_ua_instance(), 237 &acc->cfg.id, & acc->real_contact,247 &acc->cfg.id, &contact, 238 248 dest_uri, dest_uri, &dlg); 239 249 if (status != PJ_SUCCESS) { … … 346 356 pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata) 347 357 { 358 pj_str_t contact; 348 359 pjsip_dialog *dlg = pjsip_rdata_get_dlg(rdata); 349 360 pjsip_transaction *tsx = pjsip_rdata_get_tsx(rdata); … … 440 451 acc_id = pjsua_acc_find_for_incoming(rdata); 441 452 453 /* Get suitable Contact header */ 454 status = pjsua_acc_create_uas_contact(rdata->tp_info.pool, &contact, 455 acc_id, rdata); 456 if (status != PJ_SUCCESS) { 457 pjsua_perror(THIS_FILE, "Unable to generate Contact header", status); 458 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, 459 NULL, NULL); 460 return PJ_TRUE; 461 } 462 442 463 /* Create dialog: */ 443 464 status = pjsip_dlg_create_uas( pjsip_ua_instance(), rdata, 444 &pjsua_var.acc[acc_id].real_contact, 445 &dlg); 465 &contact, &dlg); 446 466 if (status != PJ_SUCCESS) { 447 467 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, … … 922 942 923 943 /* Create SDP */ 944 PJ_TODO(create_active_inactive_sdp_based_on_unhold_arg); 924 945 status = pjmedia_endpt_create_sdp( pjsua_var.med_endpt, call->inv->pool, 925 946 1, &call->skinfo, &sdp);
Note: See TracChangeset
for help on using the changeset viewer.