contributions on configurable SDP-sessionname, new callbacks and configurable DTMF payload type,

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi  PJSIP-maintainers,
 
I have a contribution for 3 subjects:
 
1. Enable pjsua-lib application to configure SDP session name instead of ?pjmedia?. 
2. New callbacks to enable pjsua-lib based application to change codec-priorities per call.
3. Per call selectable payload type for telephone-event (DTMF).
 
My implementation is based on pjproject-1.8.5.
I have attached the changed files, and added a short description of the changes below.
 
I hope you find this contribution acceptable and include these changes in your library.
 
 
1. Enable pjsua-lib application to configure SDP session name instead of ?pjmedia?.
 
pjsua.h :    new member of pjsua_config :    pj_str_t  sdp_session_name;
pjsua_media.c : In pjsua_media_channel_create_sdp copy sdp_session_name to sdp. 
 
 
 
2. New callbacks to enable pjsua-lib based application to change codec-priorities per call.
I have added new callbacks:
- on_create_sdp and 
- on_media_update 
These callbacks are called from pjsua-lib before the codec-manager is consulted.
Callback on_create_sdp passes in case of an incoming INVITE also the INVITE request. I need this to pass a list of codecs for this call by means of a dedicated header.
 
See:  pjsua.h and  pjsua_call.c
 
 
3. Per call selectable payload type for telephone-event (DTMF).
 
Beside for telephone-event this is solved for dynamic payload types in general.
I have derived a codec for telephone-event (from the gsm-codec) files dtmf.h and dtmf.c. This DTMF codec null-implementation registers with the codec factory to allow its dynamic payload type to be configured
codec.c
pjmedia_codec_mgr_get_default_param.
pjmedia_codec_mgr_set_default_param
When the payload-type in the param has been changed, then update the payload-type in the info part of the codec-manager:
 
 
pjmedia-codec.h  : added include
 
pjmedia-codec\dtmf.h 
pjmedia-codec\dtmf.c
The DTMF codec implementation registers with the codec factory to allow the dynamic payload type to be configured. It is not meant to actually produce RTP-content.
 
pjsua_media.c
pjsua_media_subsys_init : 
- call pjmedia_codec_dtmf_init 
  but only if macro PJMEDIA_RTP_PT_TELEPHONE_EVENTS != 0
- Set telephone-event to lowest priority 
 
pjsua_media_subsys_destroy
- call pjmedia_codec_dtmf_deinit
  but only if macro PJMEDIA_RTP_PT_TELEPHONE_EVENTS != 0
 
endpoint.c
pjmedia_endpt_create_sdp
Note: Presence of dtmf-codec causes implicit generation of media-line for ?telephone-event?. 
Removed the explicit code using:
- PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR
- PJMEDIA_RTP_PT_TELEPHONE_EVENTS 
 
session.c
telephone_event_pt
New function which obtains payload-type for DTMF from the codec-manager.
pjmedia_stream_info_from_sdp :  Use telephone_event_pt 
 
pjmedia\config.h
Removed PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR : not used anymore.
 
 
 
Thank you,
 
Arie 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20101119/e87c4e32/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changes to pjproject-1.8.5.zip
Type: application/zip
Size: 115315 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20101119/e87c4e32/attachment-0001.zip>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux