Changeset 3901 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Dec 7, 2011 10:43:28 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r3894 r3901 2634 2634 * Handle INFO method. 2635 2635 */ 2636 if (tsx->role == PJSIP_ROLE_UAC && 2636 const pj_str_t STR_APPLICATION = { "application", 11}; 2637 const pj_str_t STR_DTMF_RELAY = { "dtmf-relay", 10 }; 2638 pjsip_msg_body *body = NULL; 2639 pj_bool_t dtmf_info = PJ_FALSE; 2640 2641 if (tsx->role == PJSIP_ROLE_UAC) { 2642 if (e->body.tsx_state.type == PJSIP_EVENT_TX_MSG) 2643 body = e->body.tsx_state.src.tdata->msg->body; 2644 else 2645 body = e->body.tsx_state.tsx->last_tx->msg->body; 2646 } else { 2647 if (e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) 2648 body = e->body.tsx_state.src.rdata->msg_info.msg->body; 2649 } 2650 2651 /* Check DTMF content in the INFO message */ 2652 if (body && body->len && 2653 pj_stricmp(&body->content_type.type, &STR_APPLICATION)==0 && 2654 pj_stricmp(&body->content_type.subtype, &STR_DTMF_RELAY)==0) 2655 { 2656 dtmf_info = PJ_TRUE; 2657 } 2658 2659 if (dtmf_info && tsx->role == PJSIP_ROLE_UAC && 2637 2660 (tsx->state == PJSIP_TSX_STATE_COMPLETED || 2638 2661 (tsx->state == PJSIP_TSX_STATE_TERMINATED && … … 2652 2675 tsx->status_text.ptr)); 2653 2676 } 2654 } else if ( tsx->role == PJSIP_ROLE_UAS &&2677 } else if (dtmf_info && tsx->role == PJSIP_ROLE_UAS && 2655 2678 tsx->state == PJSIP_TSX_STATE_TRYING) 2656 2679 { … … 2883 2906 if (vid_idx == -1 || call_info.media[vid_idx].dir == PJMEDIA_DIR_NONE) { 2884 2907 PJ_LOG(3,(THIS_FILE, 2885 "Just rejected incoming video offer on call %d "2886 "use \"vid call add\" to enable video!",2887 call_id ));2908 "Just rejected incoming video offer on call %d, " 2909 "use \"vid call enable %d\" or \"vid call add\" to enable video!", 2910 call_id, vid_idx)); 2888 2911 } 2889 2912 }
Note: See TracChangeset
for help on using the changeset viewer.