Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

play_pcap_audio play same dtmf pcap file, but detect only one dtmf for the first file . #516

Open
Django-xinfa opened this issue Apr 9, 2021 · 2 comments
Labels

Comments

@Django-xinfa
Copy link

Django-xinfa commented Apr 9, 2021

scripts of part:

 <nop>
    <action>
      <exec play_pcap_audio="/home/eshore/sipp-3.6.1/pcap/dtmf_2833_1.pcap"/>
    </action>
  </nop>

  <pause milliseconds="2000"/>

  <nop>
    <action>
      <exec play_pcap_audio="/home/eshore/sipp-3.6.1/pcap/dtmf_2833_1.pcap"/>
    </action>
  </nop>

  <pause milliseconds="2000"/>

  <nop>
    <action>
      <exec play_pcap_audio="/home/eshore/sipp-3.6.1/pcap/dtmf_2833_1.pcap"/>
    </action>
  </nop>

There is only one key for DTMF detection result when I use play_pcap_audio play same dtmf pcap file.

  • If files' order is "dtmf_2833_1.pcap, dtmf_2833_1.pcap, dtmf_2833_.pcap", just get "1" not "1,1,1".
  • If files' order is "dtmf_2833_1.pcap, dtmf_2833_1.pcap, dtmf_2833_2.pcap", just get "1,2" not "1,1,2".
@wdoekes
Copy link
Member

wdoekes commented Apr 9, 2021

Who detects this? Not sipp.

Seems to me like:

  • dtmf_2833_1.pcap plays the right tone
  • there is no silence (no RTP is streamed at all)
  • when played again, it repeats the right tone
  • the detecting side detects only that tone, because all RTP it has read contains the dtmf tone

I assume things will work for you if you start playing silence between dtmfs.

But.. you may want to look into the play_dtmf option instead (which appears to be undocumented in sphinx):

Features added in 3.6.0
=======================

* Add `play_dtmf` code originally from
  https://sourceforge.net/p/sipp/patches/50/ (Dmitry Kunilov), then
  pull #82 (@horacimacias) and then #141 (@vodik). Compile with
  pcap-play support, and use it by adding `<exec play_dtmf="1234*#"/>`
  similar to how you use `play_pcap_audio`.
  - Add RTP payload 96 in your SDP:
    m=audio [media_port] RTP/AVP 0 96 97
    a=rtpmap:0 PCMU/8000
    a=rtpmap:96 telephone-event/8000
    a=fmtp:96 0-15
    a=rtpmap:97 no-op/8000
  - Exec syntax is `<exec play_dtmf="digits[,length]"/>` where digits
    can be one or more of "0123456789#*ABCD" and length defaults to 200
    and must be between 50 and 2000.
  - Instead of digits a `[field...]` keyword is also accepted.
  - Make sure you add enough `<pause/>` after `play_dtmf`.

@Django-xinfa
Copy link
Author

Django-xinfa commented Apr 9, 2021 via email

@rkday rkday added the media label Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants