[reSIProcate] Cisco DTMF

Matt Porter mporter at calltower.com
Fri Apr 14 14:37:09 CDT 2006


In the past I have made some modifications to the DUM in order to
support dtmf using sip NOTIFY.  The changes were pretty straight forward
before, but now i am trying to sync up with the latest codebase, and
wanted to see if maybe someone out there had a better way to handle it.
 
just to quickly explain the way it works. When you receive an INVITE
from the gateway it will have a Call-Info header.
if your final 200 response to the invite contains that Call-Info then
NOTIFY will be used for DTMF instead of the rtp media stream.
 
So the stack has to be extended so you can receive unsoliticited NOTIFY
messages.
Im a little confused now where the best place to make this change is. it
used to be done in Dialog.cxx.. but the NOTIFY handling has changed
somewhat.
 
These were the 3 changes i had in the older codebase to support this (
probably a couple months old ).
 
void 
DialogUsage::send(SharedPtr<SipMessage> msg)
{
   //if (msg->isRequest())           <-----  !!!!  took this out,
because i need to add the "Call-Info" header !!!!
   {
      // give app an chance to adorn the message.
      onReadyToSend(*msg);
   }
   mDialog.send(msg);
}

 

class InviteSessionHandler
{

......existing code.............

 //!! Added this !!  (return 0, if you like the message)
 virtual int onUnsolicitedNotify(InviteSessionHandle,const SipMessage&
msg){ return -1; }

}

 

void 
Dialog::dispatch(const SipMessage& msg)
 
 
......existing code.............
 
  case NOTIFY:
 
   ......existing code.............
 
    //last chance to let the app decide if i likes this NOTIFY
  if( mDum.mInviteSessionHandler->onUnsolicitedNotify(
mInviteSession->getSessionHandle(), msg) != 0 )
  {
         SipMessage response;
         makeResponse(response, msg, 406);
        send(response);
  }




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20060414/8644a8b2/attachment.htm>


More information about the resiprocate-devel mailing list