Changeset 4739 for pjproject


Ignore:
Timestamp:
Feb 11, 2014 4:46:49 AM (10 years ago)
Author:
riza
Message:

Re #1734: Add flash support for DTMF rfc 2833.

Location:
pjproject/trunk
Files:
5 edited

Legend:

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

    r3841 r4739  
    342342 * 
    343343 * @param stream        The media stream. 
    344  * @param ascii_digit   String containing digits to be sent to remote. 
     344 * @param ascii_digit   String containing digits to be sent to remote as  
     345 *                      described on RFC 2833 section 3.10. Character 'R' is  
     346 *                      used to represent the event type 16 (flash) as stated  
     347 *                      in RFC 4730. 
    345348 *                      Currently the maximum number of digits are 32. 
    346349 * 
  • pjproject/trunk/pjmedia/src/pjmedia/endpoint.c

    r4613 r4739  
    559559        attr = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_attr); 
    560560        attr->name = pj_str("fmtp"); 
    561         attr->value = pj_str(PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR " 0-15"); 
     561        attr->value = pj_str(PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR " 0-16"); 
    562562        m->attr[m->attr_count++] = attr; 
    563563    } 
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r4728 r4739  
    231231 
    232232/* RFC 2833 digit */ 
    233 static const char digitmap[16] = { '0', '1', '2', '3', 
     233static const char digitmap[17] = { '0', '1', '2', '3', 
    234234                                   '4', '5', '6', '7', 
    235235                                   '8', '9', '*', '#', 
    236                                    'A', 'B', 'C', 'D'}; 
     236                                   'A', 'B', 'C', 'D',  
     237                                   'R'}; 
    237238 
    238239/* Zero audio frame samples */ 
     
    15691570 
    15701571    /* Ignore unknown event. */ 
    1571     if (event->event > 15) { 
     1572    if (event->event > 16) { 
    15721573        PJ_LOG(5,(stream->port.info.name.ptr, 
    15731574                  "Ignored RTP pkt with bad DTMF event %d", 
     
    27552756                pt = 11; 
    27562757            } 
     2758            else if (dig == 'r') 
     2759            { 
     2760                pt = 16; 
     2761            } 
    27572762            else 
    27582763            { 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_legacy.c

    r4729 r4739  
    12021202        char buf[128]; 
    12031203 
    1204         if (!simple_input("DTMF strings to send (0-9*#A-B)", buf, 
     1204        if (!simple_input("DTMF strings to send (0-9*R#A-B)", buf, 
    12051205            sizeof(buf))) 
    12061206        { 
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r4724 r4739  
    46944694 
    46954695/** 
    4696  * Send DTMF digits to remote using RFC 2833 payload formats. 
     4696 * Send DTMF digits to remote using RFC 2833 payload formats.  
    46974697 * 
    46984698 * @param call_id       Call identification. 
    4699  * @param digits        DTMF string digits to be sent. 
     4699 * @param digits        DTMF string digits to be sent as described on RFC 2833  
     4700 *                      section 3.10. Character 'R' is used to represent the  
     4701 *                      event type 16 (flash) as stated in RFC 4730. 
    47004702 * 
    47014703 * @return              PJ_SUCCESS on success, or the appropriate error code. 
Note: See TracChangeset for help on using the changeset viewer.