VoiceMail Asterisk & codec Negotiation

Hey,

I’m doing a research about codec negotiation. Is it possible to make the codec negotiation when a call is forwarded to the voicemail? For example, if I have to make the negotiation from G.711 to G.729

I don’t think this is possible to do in Asterisk dialplan. But I could be wrong.

Why on earth would you want to do that?

I don’t believe that you can force a re-invite with a different set of codecs.

Based on this info i think could be possible if not you will get a 488 (Not Acceptable Here).

[quote]Modifying an Existing Session

A successful INVITE request (see Section 13) establishes both a
dialog between two user agents and a session using the offer-answer
model. Section 12 explains how to modify an existing dialog using a
target refresh request (for example, changing the remote target URI
of the dialog). This section describes how to modify the actual
session. This modification can involve changing addresses or ports,
adding a media stream, deleting a media stream, and so on. This is
accomplished by sending a new INVITE request within the same dialog
that established the session. An INVITE request sent within an
existing dialog is known as a re-INVITE.

  Note that a single re-INVITE can modify the dialog and the
  parameters of the session at the same time.[/quote]

ietf.org/rfc/rfc3261.txt

[quote=“dejanst”]I don’t think this is possible to do in Asterisk dialplan. But I could be wrong.

Why on earth would you want to do that?[/quote]
This is the subject of a research project. It is supposed that our gateway accept only G.711 because of hardware restrictions, so we are seeking to make the negotiation at the moment of receiving the record.

Not acceptable here is sent instead of completing the initial negotiation. It is more likely to result in the call completely failing, as the caller will normally offer all their capability. The question seems to be about how you remove a codec that you previously said you were prepared to use, which can only be done by a re-invite.

(Note that the “negotiation” results in allowed sets of codecs. The peer can switch between any of those in the set, at will.)

If the gateway only accepts g711, make this clear in the codec negotiation at the start of the call. Everything else is over complicating things.