Inband DTMF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bill,

Yes this is what was simplest to be done indeed thanks again. 
Now I have my DTM stream detected in the pjsua layer:

I have used simple_pjsua application as a template. If I get incoming sip call this application connects the call to my default tdm audio device. 
While on call I can decode the DTMF and get this information to the application with no issues. 

Now I would like to open my audio device as soon as I pickup the analog phone. 
Probably I have to connect somehow my audio device to the null_device/null_port after I detect analog phone pick up, so my DTM detection routine start getting data?

All advices in this respect are welcome.

Thank you
Dimitar
   

From: Bill Gardner 
Sent: Tuesday, April 7, 2015 17:13
To: pjsip at lists.pjsip.org 
Subject: Re: Inband DTMF

You could also bypass pjsip entirely and just have your main loop poll your DTMF code directly, instead of using the capabilities infrastructure. You'll need locks to protect the dtmf event queue either way because the audio driver is a different thread than the application.

Bill


On 4/7/15 9:29 AM, dpn at switchvoice.com wrote:

  Hi Bill,

  Thank you. You help is really appreciated!

  I will dig in a code to get better view of what you are saying. 

  Best Regards
  Dimitar


  From: Bill Gardner 
  Sent: Tuesday, April 7, 2015 16:03
  To: pjsip at lists.pjsip.org 
  Subject: Re: Inband DTMF

  Hi Dimitar,

  You could try to duplicate the method currently used to get dtmf callbacks from incoming RTP, renaming things appropriately.

  Even simpler, but really a hack, would be to define a new audio device capability that would let the main loop poll the audio device for DTMF events using the pjsip audio capabilities infrastructure. You'd have to locally queue the incoming DTMF events in your device and periodically check them from your main loop using a timer event. There isn't anything built in that lets the audio device generate an application callback.

  Regards,

  Bill


  On 4/6/15 5:27 PM, dpn at switchvoice.com wrote:

    Hi Gents,

    I have added dtmf detection to my tdm audio device. 
    I have used spandsp tdmf detection which appears to work fine for my application.

    Now I am wondering what would be the best way to pass the dialed extension from my audio_device to the pjsua application layer.
    The spandsp dtmf allows an on_dtmf() callback to be hooked so we can have notification on each digit.

    Any comments will be appreciated.
    Dimitar 



    From: dpn@xxxxxxxxxxxxxxx 
    Sent: Saturday, April 4, 2015 03:18
    To: pjsip list 
    Subject: Inband DTMF

    Hi Gents,

    I am tiring to integrate analog phone thru SLIC from Silicon labs to the pjsip.
    Thanks to the help from the this mailing list I have managed to move the task 
    up to the point I have clean audio between my analog phone and a sip client 
    analog_phone - pjsip <---> (Asterisk SIP server) <---> SIP client

    My SLIC doesn?t have built in DTMF detection. 
    I just read that pjmedia doesn?t support inband DTMF detection. 
    Can you please confirm/refuse that ? 

    If DTMF doesn?t supported I am willing to borrow the inband DTMF detection 
    from Asterisk or some other open implementation and  put it in pjmedia. 
    Do you see benefits for the project?

    As I am very new to pjsip I am not sure which will be the native way to integrate such a detector in pjsip. 
    Is someone willing to advice me on the best way to put DTMF detection in the pjmedia?

    Thanks
    Dimitar

----------------------------------------------------------------------------
    _______________________________________________
    Visit our blog: http://blog.pjsip.org

    pjsip mailing list
    pjsip at lists.pjsip.org
    http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


     

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


------------------------------------------------------------------------------
  _______________________________________________
  Visit our blog: http://blog.pjsip.org

  pjsip mailing list
  pjsip at lists.pjsip.org
  http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


   

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




--------------------------------------------------------------------------------
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150408/b5cb9c08/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux