<div dir="ltr">thanks for your answer<div><span style="font-size:12.8px">"set your nativeformats to the negotiated </span><span style="font-size:12.8px">codecs and let Asterisk do the rest." would be great for me but I could not find how to do this</span><br></div><div><span style="font-size:12.8px">if transcode is not allowed and one of my codec is compatible with the other side codec I would like to know which codec it is and then set my nativeformats... i don't care about the phase my channel (and the middleware/hardware managed) is flexible.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">regards</span></div><div><span style="font-size:12.8px">Aurèle</span></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-21 16:04 GMT+01:00 Joshua Colp <span dir="ltr"><<a href="mailto:jcolp@digium.com" target="_blank">jcolp@digium.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Mon, Nov 21, 2016, at 11:01 AM, Aurele Traynard wrote:<br>
> Hi everyone,<br>
><br>
> The main goal of the channel is to make or receive call from another<br>
> channel (mainly SIP)<br>
> I writing a custom channel I have now something working with codec "alaw"<br>
> When I add multiple codecs Asterisk's core "negociate" the good codec and<br>
> give it in the "request" function then I can know wich codec I have to<br>
> use.<br>
> (maybe it is not asterisk's core wich do this?)<br>
> When the call comes from my channel, I can'tknwo which codec will be used<br>
> by the other channel...<br>
><br>
> I tried to read chan_sip and chan_iax2 as I did to write my custom<br>
> channel,<br>
> but I could'n see what to do...<br>
><br>
> thanks for any help and feel free to ask anything about my problem if I<br>
> was<br>
> not clear enough.<br>
<br>
</span>There is currently no mechanism to know what the other side when<br>
answered has negotiated. It's been talked about previously that it would<br>
be good to have such a thing, but it does not exist currently.<br>
<br>
The only thing you can do is set your nativeformats to the negotiated<br>
codecs and let Asterisk do the rest.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
--<br>
Joshua Colp<br>
Digium, Inc. | Senior Software Developer<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br>
Check us out at: <a href="http://www.digium.com" rel="noreferrer" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" rel="noreferrer" target="_blank">www.asterisk.org</a><br>
<br>
--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-dev</a><br>
</font></span></blockquote></div><br></div></div>