Test Asterisk Context with Sipp ----- Detect A DTMF send from SIPP

How to detect a dtmf send from sipp using pcap or rtp media protocol on asterisk cli?

If probably configured then DTMF is automatically detected and passed through. What exactly are you trying to do?

------------------------------------------ reg_uac.xml -------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="ISO-8859-1" ?> --> <![CDATA[ INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] From: [field0] ;tag=[call_number] To: sut Call-ID: [call_id] CSeq: 1 INVITE Contact: sip:2000@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Type: application/sdp Content-Length: [len]

v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0
a=rtpmap:0 PCMU/8000
]]>




<![CDATA[ ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] From: [field0] ;tag=[call_number] To: sut [peer_tag_param] Call-ID: [call_id] CSeq: 1 ACK Contact: sip:2000@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]> ************************************************** dtmf************************************ ************************************************** dtmf************************************ <![CDATA[ BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] From: [field0] ;tag=[call_number] To: sut [peer_tag_param] Call-ID: [call_id] CSeq: 2 BYE Contact: sip:2000@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]>

------------------------ Command to test the scenario ----------------------

sudo ./sipp -s 1000 -ap 1000 -r 1 -m 1 localhost:5060 -i localhost -sf reg_uac.xml -inf reg_uac.csv -trace_err -mi 192.168.0.61 -mp 6000

----------------------_Sipp response --------------------------------------

                             Messages  Retrans   Timeout   Unexpected-Msg
  INVITE ---------->         1         0         0                  
     100 <----------         1         0         0         0        
     180 <----------         0         0         0         0        
     200 <----------  E-RTD1 1         0         0         0        
     ACK ---------->         1         0                            
          [ NOP ]              
   Pause [   8000ms]         1                             0        
          [ NOP ]              
   Pause [   1000ms]         1                             0        
     BYE ---------->         1         0         0                  
     200 <----------         1         0         0         0      

Can you please share the proper configuration details to detect this dtmf sent on asterisk cli.

reg_uac.txt (2.2 KB)

How is DTMF being sent? As RFC2833 or as audio? What is the Asterisk configuration? As well like I originally asked - what are you trying to achieve?

The SDP rules out RFC 2833/4733 towards SIPP. I’m fairly sure that Asterisk will not offer it asymmetrically.

If it is in band, the only way of detecting it in the pcap is to listen to the RTP media stream. For info it would appear as signalling events, and for RFC 2833/4733, Wireshark would decode the RTP packets appropriately.

Firstly, I am trying to send dtmf from sipp as i mentioned in xml.

If is there any other way to send dtmf from sipp please suggest.

Now Caller is User-B 2000 which is mentioned in csv file. Also Context is mentioned in sip.conf.

------------------------------csv file------------------------------------

SEQUENTIAL
User-B;2000

-----------------------------sip.conf---------------------------------------

[1000]
secret=1000
context=from-sip ; the context of this setup
type=friend ; Can make inbound and outbound calls
callerid=“User-A” ; Set your Caller-id
host=dynamic ; This device needs to register
nat=yes
insecure=invite ; user is behind a NAT router
dtmfmode=rfc2833
;
[2000]
secret=2000
context=from-sip ; the context of this setup
type=friend ; Can make inbound and outbound calls
callerid=“User-B” ; Set your Caller-id
host=dynamic ; This device needs to register
nat=yes ; user is behind a NAT router
insecure=invite ; user is behind a NAT router
dtmfmode=rfc2833

--------------------------------------extension.conf--------------------------------------------------------------------------

[from-sip]
exten => _X.,1,NoOp(${CALLERID(ani)})
;same => n,wait(15)
;same => n,Dial(SIP/${EXTEN})
same => n,Background(english)
same => n,Background(english)
same => n,Background(english)
same => n,MixMonitor(/var/lib/asterisk/sounds/${UNIQUEID}.wav,)
same => n,Answer() ; Answer the call
same => n,hangup()

Is there any way to notice the dtmf send from sipp (any how) on the asterisk cli ?

The comment is wrong. insecure=invite has nothing do with whether or not there is a NAT router.

Yes sorry for the comment.

The comment reflects a very common misunderstanding, which leads many people to use type=friend, when type=peer is the safer option.

You should ask that question of the SIPP people. You can obviously use dtfmode=info, as that is done in the signalling channel, so is easy to do using basic SIPP techniques.

Can we please focus on sipp.
Please Share the details if you have any idea regarding sipp and a complete testing scenario with dtmf.

Google says: http://sipp-users.narkive.com/am4lb9Lt/entering-dtmf-in-the-sipp-scenario-please-read

Your SDP is not negotiating RFC2833, despite you attempting to use it. There is a test in the testsuite[1] which covers RFC2833 and uses SIPp. The SDP it uses is in the scenario file[2].

[1] https://github.com/asterisk/testsuite/tree/master/tests/channels/SIP/rfc2833_dtmf_detect
[2] https://github.com/asterisk/testsuite/blob/master/tests/channels/SIP/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml#L20

1 Like