Menu

sip-audio fine, but not applied for incominig

Help
Dima77
2009-07-26
2013-05-28
  • Dima77

    Dima77 - 2009-07-26

      --sip-audio [!]wildcard   : Enable the audio format(s) matching the
                                  wildcard. The '*' character match any
                                  substring. The leading '!' character indicates
                                  a negative test.
                                  Default: G.711-uLaw-64k and G.711-ALaw-64k.
                                  May be used multiple times.
    Works fine as for outgoing calls but fully ignored for incoming.
    For example if I have speex...dll g723...dll iLBC...dll in application folder and use
    --sip-audio G723.1 no problem: all outgoing calls will be g723 only.
    Nevertheless incoming calls can be g711,g723,iLBC, speex (all available).
    Is there a way to resolve it?

     
    • Dima77

      Dima77 - 2009-07-29

      It will work if to do so for examplle:
      c:\t38modem\opal\manager.cxx
      ---
      PBoolean MyManager::Initialise(const PConfigArgs & args)
      {
      ...
      //---------------------------------
        PString SIPaudio = args.GetOptionString("sip-audio");
        PString toRemove ="";
        PString AllAvailable ="";

          OpalMediaFormatList list = OpalMediaFormat::GetAllRegisteredMediaFormats();

          for (OpalMediaFormatList::iterator f = list.begin(); f != list.end(); ++f) {
            if (f->GetMediaType() == OpalMediaType::Audio() && f->IsValidForProtocol("sip") && f->IsTransportable())
            {
              if (SIPaudio.Find(f->GetName()) == P_MAX_INDEX){
                  toRemove = toRemove + "\n" + f->GetName() ;
              }
              AllAvailable = AllAvailable + "\n" + f->GetName() ;
            }
          }
          cout << "Available audio formats :"  << AllAvailable << "\n";
          cout << "Target formats we want:" << "\n" << SIPaudio << "\n";
          cout << "Audio formats for removing:"  << toRemove << "\n";
        //PString toRemove = "G.711-uLaw-64k\nG.711-ALaw-64k";
          SetMediaFormatMask(toRemove.Lines());
      //---------------------------------
      I do not know if it is possible to do the same if in sipep.cxx...

       

Log in to post a comment.