[SIP Beyond VoIP] Debugging DTMF for conference bridge app

Jason Ostrom jpo at pobox.com
Fri Dec 20 17:00:07 CET 2013


Thank you very much Saúl, for taking the time to respond.  I started looking at the sip-session example in sipclients for DTMF handling.  I will debug and test this.

Thanks again and have a great weekend.
Jason

On Dec 20, 2013, at 6:36 AM, Saúl Ibarra Corretgé <saul at ag-projects.com> wrote:

> 
> On Dec 19, 2013, at 7:43 PM, Jason Ostrom wrote:
> 
>> Hi,
>> 
>> I have a python script (https://code.google.com/p/moshimoshi/) using SIP Simple that is dialing into an Asterisk server conference bridge using new confbridge module.  The python script is supposed to wait/listen for DTMF tones and when DTMF is input by another conference user, the script should take action based on DTMF.
>> 
>> The script does not appear to receive or process DTMF and I believe that DTMF pass through/broadcast/ relay is configured on Asterisk.  Asterisk logger.c shows that DTMF is getting processed.  Can you help me debug why this isn't working in SIP Simple python script?  
>> 
>> Code snippet:
>> "
>> def _NH_AudioStreamGotDTMF(self, notification):
>>               digit = notification.data.digit
>>               print 'Got DMTF %s ' % notification.data.digit
>>               self.dtmf_buffer += digit
>>               # '*' equal EOL
>>               if (digit == '*'):
>> 
>>                       print "Processing %s" % self.dtmf_buffer
>> 
>>                       # '0#*' eq Launching a pre-define application
>> 
>>                       if (self.dtmf_buffer.startswith("0#") == True):
>>                               print "Launching xeyes ..."
>>                               os.system('xeyes &')
>> "
>> 
> 
> The notification handler looks correct, but you need to be listening for notification from the audio stream to receive it. Also note that only RFC2833 based DTMFs are supported, if your Asterisk is using SIP INFO requests it's not going to work.
> 
> 
> Regards,
> 
> --
> Saúl Ibarra Corretgé
> AG Projects
> 
> 
> 



More information about the SIPBeyondVoIP mailing list