PJSIP_SEND_SESSION_REFRESH([update_type])
This function will cause the PJSIP stack to immediately refresh the media session for the channel. This will be done using either a re-INVITE (default) or an UPDATE request.
This is most useful when combined with the PJSIP_MEDIA_OFFER dialplan function, as it allows the formats in use on a channel to be re-negotiated after call setup.
Warning
The formats the endpoint supports are not checked or enforced by this function. Using this function to offer formats not supported by the endpoint may result in a loss of media.
title="Re-negotiate format to g722"
; Within some existing extension on an answered channel
same => n,Set(PJSIP_MEDIA_OFFER(audio)=!all,g722)
same => n,Set(PJSIP_SEND_SESSION_REFRESH()=invite)
update_type- The type of update to send. Default isinvite.invite- Send the session refresh as a re-INVITE.update- Send the session refresh as an UPDATE.
User Notes
No notes yet. Be the first to contribute a tip or example.
Contribute a note
Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.