Ignore:
Timestamp:
Dec 26, 2006 12:11:48 AM (14 years ago)
Author:
bennylp
Message:

Added DTMF callback support all the way to PJSUA API (ticket #48)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r847 r863  
    20512051 
    20522052/* 
     2053 * DTMF callback from the stream. 
     2054 */ 
     2055static void dtmf_callback(pjmedia_stream *strm, void *user_data, 
     2056                          int digit) 
     2057{ 
     2058    PJ_UNUSED_ARG(strm); 
     2059 
     2060    if (pjsua_var.ua_cfg.cb.on_dtmf_digit) { 
     2061        pjsua_call_id call_id; 
     2062 
     2063        call_id = (pjsua_call_id)user_data; 
     2064        pjsua_var.ua_cfg.cb.on_dtmf_digit(call_id, digit); 
     2065    } 
     2066} 
     2067 
     2068/* 
    20532069 * Callback to be called when SDP offer/answer negotiation has just completed 
    20542070 * in the session. This function will start/update media if negotiation 
     
    21892205        } 
    21902206 
     2207        /* If DTMF callback is installed by application, install our 
     2208         * callback to the session. 
     2209         */ 
     2210        if (pjsua_var.ua_cfg.cb.on_dtmf_digit) { 
     2211            pjmedia_session_set_dtmf_callback(call->session, 0,  
     2212                                              &dtmf_callback,  
     2213                                              (void*)(call->index)); 
     2214        } 
    21912215 
    21922216        /* Get the port interface of the first stream in the session. 
Note: See TracChangeset for help on using the changeset viewer.