Hello,
o [email protected] [01/15/09 01:10]:
More on this problem.
The following log section shows what happens. The remote user pressed
DTMF 1, which triggered the series of RTP events starting at timestamp
16:54.39. None of these events resulted in an AmSession DTMF event
being triggered. Then, the user pressed DTMF 3, at 16:54:42, which
also resulted in a sequence of RTP events. Only this time, an
AmSession event *was* triggered, at 16:54:43. Interestingly, the
AmSession event was for the "1" key, not the "3" key.
there is some logic in the RTP detection: as you have seen in the log,
there are several rfc2833 key press events sent out for every key press.
the detection needs to correlate these events and the input that
additionally may come from inband and SIP INFO messages, and make sure
that every key press is delivered only once to the application. the
detector waits WAIT_TIMEOUT milliseconds, or MAX_PACKET_WAIT processed
packets, until it delivers the key press to the application, and this is
refreshed when another rfc2833-event is received. so, the key is
delivered at maximum 100 millisec after the key is received. a key is
delivered immediately, if the received event changes, e.g. if you press
different keys one after another.
Is there something I can tweak to get the RTP events to reliably
trigger an AmSession event?
you can adapt WAIT_TIMEOUT and MAX_PACKET_WAIT in AmDtmfDetector.h
if you are sure that you only have rfc2833 (well, whats the current
rfc...) events, then you can apply the patch from
http://tracker.iptel.org/browse/SEMS-43
see also
http://tracker.iptel.org/browse/SEMS-32
if you feel it does not work as expected, a complete trace with RTP
(pastebin) would possibly be helpful.
Regards
Stefan
16:54:39 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=1; e=0; r=0;
volume=12; duration=120
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:39 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=1; e=0; r=0;
volume=12; duration=280
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:39 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=1; e=0; r=0;
volume=12; duration=440
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:39 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=1; e=0; r=0;
volume=12; duration=600
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:39 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=1; e=0; r=0;
volume=12; duration=760
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:39 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=1; e=1; r=0;
volume=12; duration=880
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:39 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=1; e=1; r=0;
volume=12; duration=880
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:39 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=1; e=1; r=0;
volume=12; duration=880
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:39 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:39 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:39 (10155) DEBUG: conceal_loss (AmRtpAudio.cpp:182): default PLC (ts_diff
= 160; s = 320)
16:54:40 (10155) DEBUG: conceal_loss (AmRtpAudio.cpp:182): default PLC (ts_diff
= 160; s = 320)
16:54:40 (10155) DEBUG: conceal_loss (AmRtpAudio.cpp:182): default PLC (ts_diff
= 160; s = 320)
16:54:41 (10155) DEBUG: conceal_loss (AmRtpAudio.cpp:182): default PLC (ts_diff
= 160; s = 320)
16:54:42 (10155) DEBUG: read (AmAudioFile.cpp:330): 0-stuffing packet: adding
160 bytes (packet size=320)
16:54:42 (10155) DEBUG: get (AmPlaylist.cpp:78): get: gotoNextItem
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:42 (10155) DEBUG: get (AmPlaylist.cpp:78): get: gotoNextItem
16:54:42 (10155) DEBUG: gotoNextItem (AmPlaylist.cpp:62): posting
AmAudioEvent::noAudio event!
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:42 (10155) DEBUG: run (AmSession.cpp:404):
[email protected] dlg.getUACTransPending() = 0
16:54:42 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=3; e=0; r=0;
volume=13; duration=80
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:42 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=3; e=0; r=0;
volume=13; duration=240
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:42 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=3; e=0; r=0;
volume=13; duration=400
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:42 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=3; e=0; r=0;
volume=13; duration=560
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:42 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=3; e=0; r=0;
volume=13; duration=720
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:42 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:42 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:43 (10155) DEBUG: receive (AmRtpStream.cpp:323): DTMF: event=3; e=1; r=0;
volume=13; duration=880
16:54:43 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:43 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:43 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:43 (10155) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying
to post event
16:54:43 (10155) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
16:54:43 (10155) DEBUG: processEvents (AmEventQueue.cpp:71): event processed
16:54:43 (10155) DEBUG: processEvents (AmEventQueue.cpp:69): before processing
event
16:54:43 (10155) DEBUG: process (AmSession.cpp:542): AmSession::process
16:54:43 (10155) DEBUG: process (AmSession.cpp:560): Session received DTMF,
event = 1, duration = 1000
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems
--
Stefan Sayer
VoIP Services
[email protected]
www.iptego.com
IPTEGO GmbH
Am Borsigturm 40
13507 Berlin
Germany
Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems