[asterisk-dev] [Code Review] 2445: Pimp my SIP: Media Negotiations

Kevin Harwell reviewboard at asterisk.org
Fri Apr 26 16:34:07 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2445/
-----------------------------------------------------------

(Updated April 26, 2013, 9:34 p.m.)


Review request for Asterisk Developers.


Changes
-------

Renamed the MEDIA_OFFER dialplan function to GULP_MEDIA_OFFER.  Also since the a/v media write task is being pushed synchronously, refactored the code to allocate media_offer_data locally on the stack. 


Bugs: ASTERISK-21186
    https://issues.asterisk.org/jira/browse/ASTERISK-21186


Repository: Asterisk


Description
-------

Added a dialplan function MEDIA_OFFER that accepts a codec type (example: 'audio') and allows overriding, or re-ordering, of an endpoints codecs prior to dialing (e.g. using a pre-dial handler).  This adds functionality for outbound requests only.

Example: Set(MEDIA_OFFER(audio)=ulaw,g722) ; sets the outgoing codecs to be ulaw,g722

Note that using this function and setting new media offers completely overrides what is specified on the endpoint.  Currently it is allowed to even list a codec that was not previously specified on the endpoint.

The code allows for un/registering of media offer types that can be associated with the function itself.  This allows for future expansion of other types, for example T.38.  Types 'audio' and 'video' are currently supported.


Diffs (updated)
-----

  /team/group/pimp_my_sip/channels/chan_gulp.c 386664 
  /team/group/pimp_my_sip/include/asterisk/res_sip_session.h 386664 
  /team/group/pimp_my_sip/res/res_sip_sdp_rtp.c 386664 
  /team/group/pimp_my_sip/res/res_sip_session.c 386664 
  /team/group/pimp_my_sip/res/res_sip_session.exports.in 386664 

Diff: https://reviewboard.asterisk.org/r/2445/diff/


Testing
-------

Ran through several scenarios setting new MEDIA_OFFER(s).  Tested re-ordering of already specified codecs on an endpoint, tested setting only a single codec (both specified and not on endpoint).  Tested reading back out the newly set codecs in the dialplan.


Thanks,

Kevin Harwell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130426/d42a6b14/attachment.htm>


More information about the asterisk-dev mailing list