From: Babar S. <bab...@ya...> - 2004-10-22 14:58:06
|
> You haven't described exactly what you're doing, so I dunno.. I m testing with two clients (both iaxclientOcx) and I got my answer after adding iaxc_get_codec, thanks :) > You could write one. It would be about 3 lines of code -- I'd accept a > patch for it. I m affraid more then 3 lines but its working I tested. int iaxc_get_codec(int callNo) { struct iaxc_call *call; if(callNo < 0) return audio_format_preferred; call = &calls[callNo]; if(callNo != selected_call) { return; } return call->format; } --- Steve Kann <st...@st...> wrote: > Babar Shafiq wrote: > > >Hi Steve n List, > > > >I added the CVS update, now codec negotiation is working nicely. > >I tried with all combination of codecs (at one side and different on other side) for testing > with > >success and no "Bad or incomplete voice packet" :) > > > >I tried with SetCodecPriority function to change codec on run time, but I didn't notice any > >difference in bandwidth usage I didn't tried to put any debug to check whats going on, What > will > >be problem ? > > > > > > You haven't described exactly what you're doing, so I dunno.. > > Other iax2 endpoints should honor our preferred codec when we make > calls. When calls come in, we will use the other side's preferred > codec, if we support it. I've written about that algorighm already, but > you can see it in the code. > > >or there is any iaxc_get_formats to output current codec in coming update ? > > > > > You could write one. It would be about 3 lines of code -- I'd accept a > patch for it. > > > > >Also Incomming call's codec is with higher priority ?? > > > > > > Described above, and earlier. > > >SetCodecPriority(int codec) > >{ > > iaxc_set_min_outgoing_framesize(160); > > if (codec==IAXC_FORMAT_GSM) > >iaxc_set_formats(IAXC_FORMAT_GSM,IAXC_FORMAT_ULAW|IAXC_FORMAT_GSM|IAXC_FORMAT_SPEEX|IAXC_FORMAT_ILBC); > > else if(codec==IAXC_FORMAT_SPEEX) > >iaxc_set_formats(IAXC_FORMAT_SPEEX,IAXC_FORMAT_ULAW|IAXC_FORMAT_GSM|IAXC_FORMAT_SPEEX|IAXC_FORMAT_ILBC); > > else if(codec==IAXC_FORMAT_ILBC) > > { > > > >iaxc_set_formats(IAXC_FORMAT_ILBC,IAXC_FORMAT_ULAW|IAXC_FORMAT_GSM|IAXC_FORMAT_SPEEX|IAXC_FORMAT_ILBC); > > iaxc_set_min_outgoing_framesize(240); > > > > > You don't need to set the min framesize here, it will always do the > right thing anyway. > > > } > > else if(codec==IAXC_FORMAT_ULAW) > > > >iaxc_set_formats(IAXC_FORMAT_ULAW,IAXC_FORMAT_ULAW|IAXC_FORMAT_GSM|IAXC_FORMAT_SPEEX|IAXC_FORMAT_ILBC); > > > >} > > > > > >===== > >God is a great Programmer > > > > > > > >_______________________________ > >Do you Yahoo!? > >Declare Yourself - Register online to vote today! > >http://vote.yahoo.com > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > >Use IT products in your business? Tell us what you think of them. Give us > >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > >http://productguide.itmanagersjournal.com/guidepromo.tmpl > >_______________________________________________ > >Iaxclient-devel mailing list > >Iax...@li... > >https://lists.sourceforge.net/lists/listinfo/iaxclient-devel > > > > > > > > ===== God is a great Programmer __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail |