Hello,
I am building a Python application based on pjsua library. One
functionality involves detecting dtmf digits. The caller goes through
a SIP trunk, and sends DTMF signals to the Python SIP user agent I am
creating. My understanding is that the SIP trunk uses RFC 2833 to send
RTP packets for DTMF digits. However, the on_dtmf_digit method I added
to my CallCallback class is never run.
def on_dtmf_digit(self, digits):
print "DTMF received, digit=", digits
outputs nothing.
I made testings using pjsua command line tool to trace packets,
however nothing is traced when I send DTMF digits. Should'nt I notice
incoming RTP packets when hitting the telephone numbers?
Thank you for your help.
Eric
Hi,
I have done several tests with pjsua command line. When I make a
direct call over the LAN to pjsua from a SIP phone (MicroSIP installed
on a Windows PC), pjsua correctly detects DTMF digits. Exemple output:
09:52:30.173 pjsua_app.c ...Call 1 state changed to CONFIRMED
09:52:30.788 strm0xac896c VAD re-enabled
09:53:09.372 pjsua_app.c .Incoming DTMF on call 1: 1
09:53:10.805 pjsua_app.c .Incoming DTMF on call 1: 2
09:53:11.586 pjsua_app.c .Incoming DTMF on call 1: 3
09:53:12.471 pjsua_app.c .Incoming DTMF on call 1: 4
09:53:13.232 pjsua_app.c .Incoming DTMF on call 1: 5
09:53:13.832 pjsua_app.c .Incoming DTMF on call 1: 6
09:53:14.472 pjsua_app.c .Incoming DTMF on call 1: 7
09:53:14.868 pjsua_app.c .Incoming DTMF on call 1: 8
09:53:15.387 pjsua_app.c .Incoming DTMF on call 1: 9
09:53:17.113 pjsua_app.c .Incoming DTMF on call 1: *
09:53:17.692 pjsua_app.c .Incoming DTMF on call 1: 0
09:53:18.332 pjsua_app.c .Incoming DTMF on call 1: #
Now, if pjsua registers to a SIP trunk to call a phone number, the
call succeeds, however pjsua does not detect DTMF digits sent from the
phone. The trunk used is freephonie.net. Note that if I call some
vocal server from the same phone, number keys seem to work well. My
understanding is that the problem is somewhere between the SIP trunk
and pjsua.
I read in some old list message that a change between pjsip versions
1.5.5 and 1.8 in config.h had caused trouble with RFC2833 (changed
PJMEDIA_RTP_PT_TELEPHONE_EVENTS from 101 to 96). Could it be related
with my issue?
Ref: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2011-January/012500.html
Any help will be greatly appreciated!
Eric
2017-01-13 9:25 GMT+01:00 Eric Le Bras eric.lebras@gmail.com:
Hello,
I am building a Python application based on pjsua library. One
functionality involves detecting dtmf digits. The caller goes through
a SIP trunk, and sends DTMF signals to the Python SIP user agent I am
creating. My understanding is that the SIP trunk uses RFC 2833 to send
RTP packets for DTMF digits. However, the on_dtmf_digit method I added
to my CallCallback class is never run.
def on_dtmf_digit(self, digits):
print "DTMF received, digit=", digits
outputs nothing.
I made testings using pjsua command line tool to trace packets,
however nothing is traced when I send DTMF digits. Should'nt I notice
incoming RTP packets when hitting the telephone numbers?
Thank you for your help.
Eric