DTMF PJSIP Python

KT
Kaushik Turlapaty
Thu, Jun 9, 2016 12:54 PM
    if self.call.info().state == pj.CallState.CONFIRMED:
        print "call succesfully placed"
        time.sleep(3)
        self.call.dial_dtmf("1")


def on_dtmf_digit(self, digits):
    #print "hello"
    #self.sHelper.dtmf_queue = self.sHelper.dtmf_queue + digits
    #self.sHelper.send_dtmf(digits)
    print "received"
if self.call.info().state == pj.CallState.CONFIRMED: print "call succesfully placed" time.sleep(3) self.call.dial_dtmf("1") def on_dtmf_digit(self, digits): #print "hello" #self.sHelper.dtmf_queue = self.sHelper.dtmf_queue + digits #self.sHelper.send_dtmf(digits) print "received"
KT
Kaushik Turlapaty
Thu, Jun 9, 2016 12:55 PM

Why does not the above code work ? When I make a call , it is not printing
received which means it is not entering the on_dtmf_digits ()

Pls help me out

On Thu, Jun 9, 2016 at 6:24 PM, Kaushik Turlapaty <
turlapatykaushik95@gmail.com> wrote:

     if self.call.info().state == pj.CallState.CONFIRMED:
         print "call succesfully placed"
         time.sleep(3)
         self.call.dial_dtmf("1")


 def on_dtmf_digit(self, digits):
     #print "hello"
     #self.sHelper.dtmf_queue = self.sHelper.dtmf_queue + digits
     #self.sHelper.send_dtmf(digits)
     print "received"
Why does not the above code work ? When I make a call , it is not printing received which means it is not entering the on_dtmf_digits () Pls help me out On Thu, Jun 9, 2016 at 6:24 PM, Kaushik Turlapaty < turlapatykaushik95@gmail.com> wrote: > if self.call.info().state == pj.CallState.CONFIRMED: > print "call succesfully placed" > time.sleep(3) > self.call.dial_dtmf("1") > > > def on_dtmf_digit(self, digits): > #print "hello" > #self.sHelper.dtmf_queue = self.sHelper.dtmf_queue + digits > #self.sHelper.send_dtmf(digits) > print "received" >