Key Pad Input is not working

Hi all, If I use keypad input “Read()” application after making outbound call with “Originate()” application asterisk is not capturing the keypad input. Below is my dial plan and logs can anyone help.


[initial-outbound]
exten => _+91X.,1,NoOp(Incoming call from ${CALLERID(num)})
	same => n,Set(DESTINATION_NUMBER=0${FILTER(A-Za-z0-9,${EXTEN}):2})
	same => n,NoOp(Exten : ${EXTEN}, DESTINATION_NUMBER : ${DESTINATION_NUMBER} LOCAL_CHANNEL:${LOCAL_CHANNEL})
	same => n,Originate(SIP/airtel/${DESTINATION_NUMBER},exten,airtelin,${EXTEN},1)



[airtelin]
exten => _+91X.,1,Answer()
	same => n,NoOp(Incoming call from ${CALLERID(num)})
	same => n,Read(user_input,custom/mybeep,1)
	same => n,NoOp(User input : ${user_input})

logs

    -- Executing [+917671998644@initial-outbound:1] NoOp("Console/dsp", "Incoming call from ") in new stack
    -- Executing [+917671998644@initial-outbound:2] Set("Console/dsp", "DESTINATION_NUMBER=07671998644") in new stack
    -- Executing [+917671998644@initial-outbound:3] NoOp("Console/dsp", "Exten : +917671998644, DESTINATION_NUMBER : 07671998644 LOCAL_CHANNEL:") in new stack
    -- Executing [+917671998644@initial-outbound:4] Originate("Console/dsp", "SIP/airtel/07671998644,exten,airtelin,+917671998644,1") in new stack
  == Using SIP RTP CoS mark 5
    -- Called airtel/07671998644
    -- SIP/airtel-00000004 is making progress
    -- SIP/airtel-00000004 is making progress
    -- SIP/airtel-00000004 answered
    -- Executing [+917671998644@airtelin:1] Answer("SIP/airtel-00000004", "") in new stack
    -- Executing [+917671998644@airtelin:2] NoOp("SIP/airtel-00000004", "Incoming call from ") in new stack
    -- Executing [+917671998644@airtelin:3] Read("SIP/airtel-00000004", "user_input,custom/mybeep,1") in new stack
    -- Accepting a maximum of 1 digits.
    -- Auto fallthrough, channel 'Console/dsp' status is 'UNKNOWN'
    -- <SIP/airtel-00000004> Playing 'custom/mybeep.gsm' (language 'en')
    -- User entered nothing.
    -- Executing [+917671998644@airtelin:4] NoOp("SIP/airtel-00000004", "User input : ") in new stack

Please can anyone help me on this

This looks like the continuation of another thread.

I did not get you @david551, If you say this is duplicate thread, can I please get the thread that has solution for this, it is very important to me.

I mean that you have started more than one thread on basically the same topic. People are likely to look at each thread in isolation, but you need the combination to work out what you are doing.

I thought you said you were just practising. That doesn’t sound important.

okay, please tell me how to fix this, to capture DTMF(keypad) input after Originate(). I’m not practising :stuck_out_tongue: :crazy_face: I’m building an IVR system to trigger outbound calls. Thanks in advance

Read should work, provided that you have a suitable means of getting DTMF, so I would expect you to provide DTMF logging, to see if DTMF is being received reliably, or channel driver protocol traces, if you are not, to see if you have negotiated a reasonable way of communicating DTMF.

Given that serious users haven’t used chan_sip for years, you may get more help if you use chan_pjsip.

I understand, But I’m not able to register Pjsip with my provider trunk properly, that’s why I have shifted to sip. I’m getting as not in use for endpoints

Endpoint:  airtel                                               Not in use    0 of inf
    OutAuth:  airtel/airtel
     InAuth:  airtel/airtel
        Aor:  airtel                                             0
      Contact:  airtel/sip:+91XXXXXX@ap.ims.airtel.in  2ad0610172 NonQual         nan
   Identify:  airtel/airtel
        Match: XX.X.XXX.XX/XX(proxy)


Objects found: 1

and for pjsip show registrations it is showing 0 objects

And @david551 posted on your thread for the registration issue, but there was nothing further. Regardless, without logging nothing can be done. You might not even be getting DTMF in which case Asterisk can’t do anything and it won’t appear in Read.

@jcolp , I’m not getting any logs either related to pjsip.conf

What is the actual configuration in use?
What is the output of “sip set debug on” during a call?
What is the output of “rtp set debug on” during a call when DTMF is done?

@jcolp below is the RTP logs while entering the keypad input

--- (8 headers 0 lines) ---
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062241, ts 3602677033, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062242, ts 3602677193, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062243, ts 3602677353, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062244, ts 3602677513, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062245, ts 3602677673, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062246, ts 3602677833, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062247, ts 3602677993, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062248, ts 3602678153, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062249, ts 3602678313, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062250, ts 3602678473, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062251, ts 3602678633, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062252, ts 3602678793, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062253, ts 3602678953, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062254, ts 3602679113, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062255, ts 3602679273, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062256, ts 3602679433, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062257, ts 3602679593, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062258, ts 3602679753, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062259, ts 3602679913, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062260, ts 3602680073, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062261, ts 3602680233, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062262, ts 3602680393, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062263, ts 3602680553, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062264, ts 3602680713, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062265, ts 3602680873, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062266, ts 3602681033, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062267, ts 3602681193, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062268, ts 3602681353, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062269, ts 3602681513, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062270, ts 3602681673, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062271, ts 3602681833, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062272, ts 3602681993, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062273, ts 3602682153, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062274, ts 3602682313, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062275, ts 3602682473, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062276, ts 3602682633, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062277, ts 3602682793, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062278, ts 3602682953, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062279, ts 3602683113, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062280, ts 3602683273, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062281, ts 3602683433, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062282, ts 3602683593, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062283, ts 3602683753, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062284, ts 3602683913, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062285, ts 3602684073, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062286, ts 3602684233, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062287, ts 3602684393, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062288, ts 3602684553, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062289, ts 3602684713, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062290, ts 3602684873, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062291, ts 3602685033, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062292, ts 3602685193, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062293, ts 3602685353, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062294, ts 3602685513, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062295, ts 3602685673, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062296, ts 3602685833, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062297, ts 3602685993, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062298, ts 3602686153, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062299, ts 3602686313, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062300, ts 3602686473, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062301, ts 3602686633, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062302, ts 3602686793, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062303, ts 3602686953, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062304, ts 3602687113, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062305, ts 3602687273, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062306, ts 3602687433, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062307, ts 3602687593, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062308, ts 3602687753, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062309, ts 3602687913, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062310, ts 3602688073, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062311, ts 3602688233, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062312, ts 3602688393, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062313, ts 3602688553, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062314, ts 3602688713, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062315, ts 3602688873, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062316, ts 3602689033, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062317, ts 3602689193, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062318, ts 3602689353, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062319, ts 3602689513, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062320, ts 3602689673, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062321, ts 3602689833, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062322, ts 3602689993, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062323, ts 3602690153, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062324, ts 3602690313, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062325, ts 3602690473, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062326, ts 3602690633, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062327, ts 3602690793, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062328, ts 3602690953, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062329, ts 3602691113, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062330, ts 3602691273, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062331, ts 3602691433, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062332, ts 3602691593, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062333, ts 3602691753, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062334, ts 3602691913, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062335, ts 3602692073, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062336, ts 3602692233, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062337, ts 3602692393, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062338, ts 3602692553, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062339, ts 3602692713, len 000160)
Got  RTP packet from    10.5.64.114:10712 (type 00, seq 062340, ts 3602692873, len 000160)
    -- User entered nothing.
    -- Executing [+91XXXXXXXXXX@keypad_input:3] Set("SIP/airtel-0000000c", "user_input_to_app=") in new stack
    -- Executing [+91XXXXXXXXXX@keypad_input:4] Goto("SIP/airtel-0000000c", "send_user_input,+91XXXXXXXXXX,1") in new stack
    -- Goto (send_user_input,+91XXXXXXXXXX,1)

and below is the sip logs

<------------->
--- (11 headers 0 lines) ---
Reliably Transmitting (no NAT) to 10.5.109.147:5060:
OPTIONS sip:ap.ims.airtel.in SIP/2.0
Via: SIP/2.0/UDP 10.241.1.134:5060;branch=z9hG4bK71b10f9d
Max-Forwards: 70
From: "asterisk" <sip:asterisk@10.241.1.134>;tag=as032dc7c9
To: <sip:ap.ims.airtel.in>
Contact: <sip:asterisk@10.241.1.134:5060>
Call-ID: 0f24a096145ca68c14537fa01e387325@10.241.1.134:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 18.9.0
Date: Mon, 03 Jul 2023 15:33:56 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---

<--- SIP read from UDP:10.5.109.147:5060 --->
SIP/2.0 488 Not Acceptable Here
Call-ID: 0f24a096145ca68c14537fa01e387325@10.241.1.134:5060
Via: SIP/2.0/UDP 10.241.1.134:5060;received=10.241.1.134;branch=z9hG4bK71b10f9d
To: <sip:ap.ims.airtel.in>;tag=6345eae1-64a2ea6431446203
From: "asterisk" <sip:asterisk@10.241.1.134>;tag=as032dc7c9
CSeq: 102 OPTIONS
Date: Mon, 03 Jul 2023 15:33:56 GMT
Reason: SIP;cause=404;text="No matched ingress trunk group"
Reason: Q.850;cause=1;text="No matched ingress trunk group"
Warning: 399 app27.ims.mnc049.mcc404.3gppnetwork.org "No matched ingress trunk group"
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---
Really destroying SIP dialog '0f24a096145ca68c14537fa01e387325@10.241.1.134:5060' Method: OPTIONS

<--- SIP read from UDP:10.5.109.147:5060 --->
SIP/2.0 488 Not Acceptable Here
Call-ID: 1769bb5838d325b577af5e2f2a40af3a@10.241.1.134:5060
Via: SIP/2.0/UDP 10.241.1.134:5060;received=10.241.1.134;branch=z9hG4bK51ab1a27
To: <sip:ap.ims.airtel.in>;tag=6345eae1-64a2ea602f0a6154
From: "asterisk" <sip:asterisk@10.241.1.134>;tag=as16fd2643
CSeq: 102 OPTIONS
Date: Mon, 03 Jul 2023 15:33:52 GMT
Reason: SIP;cause=404;text="No matched ingress trunk group"
Reason: Q.850;cause=1;text="No matched ingress trunk group"
Warning: 399 app27.ims.mnc049.mcc404.3gppnetwork.org "No matched ingress trunk group"
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---

<--- SIP read from UDP:10.5.109.147:5060 --->
SIP/2.0 488 Not Acceptable Here
Call-ID: 1769bb5838d325b577af5e2f2a40af3a@10.241.1.134:5060
Via: SIP/2.0/UDP 10.241.1.134:5060;received=10.241.1.134;branch=z9hG4bK51ab1a27
To: <sip:ap.ims.airtel.in>;tag=6345eae1-64a2ea602f0a6154
From: "asterisk" <sip:asterisk@10.241.1.134>;tag=as16fd2643
CSeq: 102 OPTIONS
Date: Mon, 03 Jul 2023 15:33:52 GMT
Reason: SIP;cause=404;text="No matched ingress trunk group"
Reason: Q.850;cause=1;text="No matched ingress trunk group"
Warning: 399 app27.ims.mnc049.mcc404.3gppnetwork.org "No matched ingress trunk group"
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---
  == Using SIP RTP CoS mark 5
We think we can do text
Audio is at 19372
Adding codec slin192 to SDP
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding codec gsm to SDP
Adding codec g726 to SDP
Adding codec g726aal2 to SDP
Adding codec adpcm to SDP
Adding codec slin to SDP
Adding codec slin12 to SDP
Adding codec slin16 to SDP
Adding codec slin24 to SDP
Adding codec slin32 to SDP
Adding codec slin44 to SDP
Adding codec slin48 to SDP
Adding codec slin96 to SDP
Adding codec lpc10 to SDP
Adding codec ilbc to SDP
Adding codec g722 to SDP
Adding codec testlaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 10.5.109.147:5060:
INVITE sip:+91XXXXXXXXXX@ap.ims.airtel.in SIP/2.0
Via: SIP/2.0/UDP 10.241.1.134:5060;branch=z9hG4bK592fd056
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@ap.ims.airtel.in>;tag=as50104be5
To: <sip:+91XXXXXXXXXX@ap.ims.airtel.in>
Contact: <sip:anonymous@10.241.1.134:5060>
Call-ID: 7897a485042edfb22e13637b324c2328@ap.ims.airtel.in
CSeq: 102 INVITE
User-Agent: Asterisk PBX 18.9.0
Date: Mon, 03 Jul 2023 15:33:58 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 716

v=0
o=root 1073375530 1073375530 IN IP4 10.241.1.134
s=Asterisk PBX 18.9.0
c=IN IP4 10.241.1.134
t=0 0
m=audio 19372 RTP/AVP 96 0 8 3 111 112 5 10 122 118 123 124 125 126 127 7 97 9 101
a=rtpmap:96 L16/192000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:112 AAL2-G726-32/8000
a=rtpmap:5 DVI4/8000
a=rtpmap:10 L16/8000
a=rtpmap:122 L16/12000
a=rtpmap:118 L16/16000
a=rtpmap:123 L16/24000
a=rtpmap:124 L16/32000
a=rtpmap:125 L16/44000
a=rtpmap:126 L16/48000
a=rtpmap:127 L16/96000
a=rtpmap:7 LPC/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:20
a=sendrecv

---
    -- Called airtel/+91XXXXXXXXXX

<--- SIP read from UDP:10.5.109.147:5060 --->
SIP/2.0 100 Trying
Call-ID: 7897a485042edfb22e13637b324c2328@ap.ims.airtel.in
Via: SIP/2.0/UDP 10.241.1.134:5060;received=10.241.1.134;branch=z9hG4bK592fd056
To: <sip:+91XXXXXXXXXX@ap.ims.airtel.in>
From: "Anonymous" <sip:anonymous@ap.ims.airtel.in>;tag=as50104be5
CSeq: 102 INVITE
Date: Mon, 03 Jul 2023 15:33:58 GMT
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:10.5.109.147:5060 --->
SIP/2.0 183 Session Progress
From: "Anonymous" <sip:anonymous@ap.ims.airtel.in>;tag=as50104be5
To: <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea66304765df-gm-po-lucentPCSF-036045
Via: SIP/2.0/UDP 10.241.1.134:5060;received=10.241.1.134;branch=z9hG4bK592fd056
Call-ID: 7897a485042edfb22e13637b324c2328@ap.ims.airtel.in
CSeq: 102 INVITE
Allow: INVITE,BYE,REGISTER,ACK,OPTIONS,CANCEL,SUBSCRIBE,NOTIFY,INFO,REFER,UPDATE
Content-Type: application/sdp
Contact: <sip:lucentNGFS-123562@10.5.109.147:5060;x-afi=7>
Content-Length: 200

v=0
o=LucentPCSF 179009828 179009828 IN IP4 i8.apa37.org
s=-
c=IN IP4 10.5.64.114
t=0 0
a=sendrecv
m=audio 1802 RTP/AVP 0
c=IN IP4 10.5.64.114
b=RR:3000
b=RS:1000
a=ptime:20
a=maxptime:20
<------------->
--- (10 headers 12 lines) ---
sip_route_dump: route/path hop: <sip:lucentNGFS-123562@10.5.109.147:5060;x-afi=7>
Got SDP version 179009828 and unique parts [LucentPCSF 179009828 IN IP4 i8.apa37.org]
Found RTP audio format 0
Capabilities: us - (codec2|g723|ulaw|alaw|gsm|g726|g726aal2|adpcm|slin|slin12|slin16|slin24|slin32|slin44|slin48|slin96|slin192|lpc10|g729|speex|speex16|speex32|ilbc|g722|siren7|siren14|testlaw|g719|opus|jpeg|png|h261|h263|h263p|h264|h265|mpeg4|vp8|vp9|red|t140|t38|silk8|silk12|silk16|silk24), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x0 (nothing), combined - 0x0 (nothing)
Peer audio RTP is at port 10.5.64.114:1802
    -- SIP/airtel-00000010 is making progress

<--- SIP read from UDP:10.5.109.147:5060 --->
SIP/2.0 488 Not Acceptable Here
Call-ID: 1769bb5838d325b577af5e2f2a40af3a@10.241.1.134:5060
Via: SIP/2.0/UDP 10.241.1.134:5060;received=10.241.1.134;branch=z9hG4bK51ab1a27
To: <sip:ap.ims.airtel.in>;tag=6345eae1-64a2ea602f0a6154
From: "asterisk" <sip:asterisk@10.241.1.134>;tag=as16fd2643
CSeq: 102 OPTIONS
Date: Mon, 03 Jul 2023 15:33:52 GMT
Reason: SIP;cause=404;text="No matched ingress trunk group"
Reason: Q.850;cause=1;text="No matched ingress trunk group"
Warning: 399 app27.ims.mnc049.mcc404.3gppnetwork.org "No matched ingress trunk group"
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---

<--- SIP read from UDP:10.5.109.147:5060 --->
SIP/2.0 423 Interval Too Brief - 126
Via: SIP/2.0/UDP 10.241.1.134:5060;received=10.241.1.134;branch=z9hG4bK36404237;rport=5060
From: <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=as6a0d989e
To: <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=1904790655
Call-ID: 40b82f28480fb2352b85893950f85bed@127.0.1.1
CSeq: 2390 REGISTER
Min-Expires: 900
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:10.5.109.147:5060 --->
INVITE sip:+91XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.5.109.147:5060;branch=z9hG4bKd897ea9e0576622451c683225e7126e4635f83b2-0-ac123a2-64a2ea683639a65;_aluscr_
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK_0001_1688398440-56761-761221-LucentPCSF
From: "Unavailable" <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea68361e7ab-gm-pt-lucentPCSF-036042
To: <sip:0XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone>
Max-Forwards: 68
Call-ID: LU-168839844056745-257985@i8.apa37.org
CSeq: 1 INVITE
P-Asserted-Identity: "Unavailable" <sip:+91XXXXXXXXXX@ap.ims.airtel.in>
Accept: application/sdp
Allow: INVITE,BYE,REGISTER,ACK,OPTIONS,CANCEL,SUBSCRIBE,NOTIFY,PRACK,INFO,REFER,UPDATE
Supported: histinfo,100rel
Content-Type: application/sdp
Contact: <sip:lucentNGFS-128905@10.5.109.147:5060;x-afi=7>
Content-Length: 561
History-Info: <sip:+91XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone>;index=1

v=0
o=LucentPCSF 35727457 35727457 IN IP4 i8.apa37.org
s=-
c=IN IP4 10.5.64.115
t=0 0
a=sendrecv
m=audio 38160 RTP/AVP 96 97 8 0 18 100 98
c=IN IP4 10.5.64.115
b=RR:1087
b=RS:362
a=rtpmap:96 AMR/8000
a=fmtp:96 mode-set=7;max-red=0
a=rtpmap:97 AMR/8000
a=fmtp:97 mode-set=0,2,4,7;mode-change-period=2;mode-change-capability=2;mode-change-neighbor=1;max-red=0
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=rtpmap:100 AMR/8000
a=rtpmap:98 telephone-event/8000
a=fmtp:98 0-15
a=ptime:20
a=maxptime:40
<------------->
--- (16 headers 23 lines) ---
Sending to 10.5.109.147:5060 (no NAT)
Sending to 10.5.109.147:5060 (no NAT)
Using INVITE request as basis request - LU-168839844056745-257985@i8.apa37.org
Found peer 'airtel' for '+91XXXXXXXXXX' from 10.5.109.147:5060
  == Using SIP RTP CoS mark 5
Got SDP version 35727457 and unique parts [LucentPCSF 35727457 IN IP4 i8.apa37.org]
Found RTP audio format 96
Found RTP audio format 97
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 18
Found RTP audio format 100
Found RTP audio format 98
Found unknown media description format AMR for ID 96
Found unknown media description format AMR for ID 97
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format G729 for ID 18
Found unknown media description format AMR for ID 100
Found audio description format telephone-event for ID 98
Capabilities: us - (codec2|g723|ulaw|alaw|gsm|g726|g726aal2|adpcm|slin|slin12|slin16|slin24|slin32|slin44|slin48|slin96|slin192|lpc10|g729|speex|speex16|speex32|ilbc|g722|siren7|siren14|testlaw|g719|opus|jpeg|png|h261|h263|h263p|h264|h265|mpeg4|vp8|vp9|red|t140|t38|silk8|silk12|silk16|silk24), peer - audio=(ulaw|alaw|g729)/video=(nothing)/text=(nothing), combined - (ulaw|alaw|g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 10.5.64.115:38160
Looking for +91XXXXXXXXXX in airtelin (domain ap.ims.airtel.in)
sip_route_dump: route/path hop: <sip:lucentNGFS-128905@10.5.109.147:5060;x-afi=7>

<--- Transmitting (no NAT) to 10.5.109.147:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.5.109.147:5060;branch=z9hG4bKd897ea9e0576622451c683225e7126e4635f83b2-0-ac123a2-64a2ea683639a65;_aluscr_;received=10.5.109.147
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK_0001_1688398440-56761-761221-LucentPCSF
From: "Unavailable" <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea68361e7ab-gm-pt-lucentPCSF-036042
To: <sip:0XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone>
Call-ID: LU-168839844056745-257985@i8.apa37.org
CSeq: 1 INVITE
Server: Asterisk PBX 18.9.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:+91XXXXXXXXXX@10.241.1.134:5060>
Content-Length: 0


<------------>
    -- Executing [+91XXXXXXXXXX@airtelin:1] Answer("SIP/airtel-00000011", "") in new stack
Audio is at 17346
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding codec g729 to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 10.5.109.147:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.5.109.147:5060;branch=z9hG4bKd897ea9e0576622451c683225e7126e4635f83b2-0-ac123a2-64a2ea683639a65;_aluscr_;received=10.5.109.147
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK_0001_1688398440-56761-761221-LucentPCSF
From: "Unavailable" <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea68361e7ab-gm-pt-lucentPCSF-036042
To: <sip:0XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone>;tag=as45c615df
Call-ID: LU-168839844056745-257985@i8.apa37.org
CSeq: 1 INVITE
Server: Asterisk PBX 18.9.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:+91XXXXXXXXXX@10.241.1.134:5060>
Content-Type: application/sdp
Content-Length: 307

v=0
o=root 1387017446 1387017446 IN IP4 10.241.1.134
s=Asterisk PBX 18.9.0
c=IN IP4 10.241.1.134
t=0 0
m=audio 17346 RTP/AVP 0 8 18 98
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:98 telephone-event/8000
a=fmtp:98 0-16
a=maxptime:150
a=sendrecv

<------------>
    -- Executing [+91XXXXXXXXXX@airtelin:2] NoOp("SIP/airtel-00000011", "Incoming call from +91XXXXXXXXXX") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:3] NoOp("SIP/airtel-00000011", "Call landed on +91XXXXXXXXXX") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:4] Set("SIP/airtel-00000011", "AGI_DEBUG=1") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:5] AGI("SIP/airtel-00000011", "initial_message.py, +91XXXXXXXXXX") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/initial_message.py

<--- SIP read from UDP:10.5.109.147:5060 --->
ACK sip:+91XXXXXXXXXX@10.241.1.134:5060 SIP/2.0
Via: SIP/2.0/UDP 10.5.109.147:5060;branch=z9hG4bK0139707524583345;_aluscr_
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK_0001_1688398440-156876-761222-LucentPCSF
From: "Unavailable" <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea68361e7ab-gm-pt-lucentPCSF-036042
To: <sip:0XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone>;tag=as45c615df
Max-Forwards: 68
Call-ID: LU-168839844056745-257985@i8.apa37.org
CSeq: 1 ACK
Content-Length: 0
Contact: <sip:lucentNGFS-128905@10.5.109.147:5060;x-afi=7>

<------------->
--- (10 headers 0 lines) ---

<--- SIP read from UDP:10.5.109.147:5060 --->
INVITE sip:+91XXXXXXXXXX@10.241.1.134:5060;transport=udp SIP/2.0
Call-ID: LU-168839844056745-257985@i8.apa37.org
Via: SIP/2.0/UDP 10.5.109.147:5060;branch=z9hG4bKf24b8f28bcf39811e6a86d87cee5c17f635f83b2-0-ac123ac-64a2ea68b6f53c5;_aluscr_
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK_0001_1688398440-191750-761223-LucentPCSF
To: <sip:0XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone>;tag=as45c615df
From: "Unavailable" <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea68361e7ab-gm-pt-lucentPCSF-036042
CSeq: 2 INVITE
Accept: application/sdp
Contact: <sip:lucentNGFS-128905@10.5.109.147:5060;x-afi=7>
Content-Type: application/sdp
Max-Forwards: 68
P-Asserted-Identity: <sip:+91XXXXXXXXXX@ap.ims.airtel.in>
Content-Length: 287

v=0
o=LucentPCSF 35727457 35727458 IN IP4 i8.apa37.org
s=-
c=IN IP4 10.5.64.115
t=0 0
a=sendrecv
m=audio 38160 RTP/AVP 0 8 100 98
c=IN IP4 10.5.64.115
b=RR:3000
b=RS:1000
a=rtpmap:100 AMR/8000
a=fmtp:100 max-red=0
a=rtpmap:98 telephone-event/8000
a=ptime:20
a=maxptime:30
<------------->
--- (13 headers 15 lines) ---
Sending to 10.5.109.147:5060 (no NAT)
Comparing SDP version 35727457 -> 35727458 and unique parts [LucentPCSF 35727457 IN IP4 i8.apa37.org] -> [LucentPCSF 35727457 IN IP4 i8.apa37.org]
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 100
Found RTP audio format 98
Found unknown media description format AMR for ID 100
Found audio description format telephone-event for ID 98
Capabilities: us - (codec2|g723|ulaw|alaw|gsm|g726|g726aal2|adpcm|slin|slin12|slin16|slin24|slin32|slin44|slin48|slin96|slin192|lpc10|g729|speex|speex16|speex32|ilbc|g722|siren7|siren14|testlaw|g719|opus|jpeg|png|h261|h263|h263p|h264|h265|mpeg4|vp8|vp9|red|t140|t38|silk8|silk12|silk16|silk24), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 10.5.64.115:38160

<--- Transmitting (no NAT) to 10.5.109.147:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.5.109.147:5060;branch=z9hG4bKf24b8f28bcf39811e6a86d87cee5c17f635f83b2-0-ac123ac-64a2ea68b6f53c5;_aluscr_;received=10.5.109.147
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK_0001_1688398440-191750-761223-LucentPCSF
From: "Unavailable" <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea68361e7ab-gm-pt-lucentPCSF-036042
To: <sip:0XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone>;tag=as45c615df
Call-ID: LU-168839844056745-257985@i8.apa37.org
CSeq: 2 INVITE
Server: Asterisk PBX 18.9.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:+91XXXXXXXXXX@10.241.1.134:5060>
Content-Length: 0



---
    -- SIP/airtel-00000012 answered
    -- Executing [+91XXXXXXXXXX@airtelin:1] Answer("SIP/airtel-00000012", "") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:2] NoOp("SIP/airtel-00000012", "Incoming call from ") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:3] NoOp("SIP/airtel-00000012", "Call landed on +91XXXXXXXXXX") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:4] Set("SIP/airtel-00000012", "AGI_DEBUG=1") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:5] AGI("SIP/airtel-00000012", "initial_message.py, +91XXXXXXXXXX") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/initial_message.py
    -- Auto fallthrough, channel 'SIP/airtel-00000010' status is 'UNKNOWN'
Scheduling destruction of SIP dialog '7897a485042edfb22e13637b324c2328@ap.ims.airtel.in' in 6400 ms (Method: INVITE)
set_destination: Parsing <sip:lucentNGFS-123562@10.5.109.147:5060;x-afi=7> for address/port to send to
set_destination: set destination to 10.5.109.147:5060
Reliably Transmitting (no NAT) to 10.5.109.147:5060:
BYE sip:lucentNGFS-123562@10.5.109.147:5060;x-afi=7 SIP/2.0
Via: SIP/2.0/UDP 10.241.1.134:5060;branch=z9hG4bK093ad23f
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@ap.ims.airtel.in>;tag=as50104be5
To: <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea66304765df-gm-po-lucentPCSF-036045
Call-ID: 7897a485042edfb22e13637b324c2328@ap.ims.airtel.in
CSeq: 103 BYE
User-Agent: Asterisk PBX 18.9.0
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---

<--- SIP read from UDP:10.5.109.147:5060 --->
SIP/2.0 200 OK
Call-ID: 7897a485042edfb22e13637b324c2328@ap.ims.airtel.in
Via: SIP/2.0/UDP 10.241.1.134:5060;received=10.241.1.134;branch=z9hG4bK093ad23f
To: <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea66304765df-gm-po-lucentPCSF-036045
From: "Anonymous" <sip:anonymous@ap.ims.airtel.in>;tag=as50104be5
CSeq: 103 BYE
Date: Mon, 03 Jul 2023 15:34:04 GMT
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog '7897a485042edfb22e13637b324c2328@ap.ims.airtel.in' Method: INVITE
    -- <SIP/airtel-00000012>AGI Script initial_message.py completed, returning 0
    -- Executing [+91XXXXXXXXXX@airtelin:6] NoOp("SIP/airtel-00000012", "playback_msg: custom/first_bot/welcome1 | 12345") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:7] Set("SIP/airtel-00000012", "CDR(call_id)=12345") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:8] Set("SIP/airtel-00000012", "CDR(bot_id)=first_bot") in new stack
    -- Executing [+91XXXXXXXXXX@airtelin:9] Playback("SIP/airtel-00000012", "custom/first_bot/welcome1") in new stack
    -- <SIP/airtel-00000012> Playing 'custom/first_bot/welcome1.slin' (language 'en')

<--- SIP read from UDP:10.5.109.147:5060 --->
BYE sip:+91XXXXXXXXXX@10.241.1.134:5060 SIP/2.0
Via: SIP/2.0/UDP 10.5.109.147:5060;branch=z9hG4bK5c19c9d3fd0b5e2cb1bc863ca3a91352635f83b2-0-ac12471-64a2ea6c131df104;_aluscr_
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK_0001_1688398444-320638-761229-LucentPCSF;e2ecallid=0002148f
From: "Unavailable" <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea68361e7ab-gm-pt-lucentPCSF-036042
To: <sip:0XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone>;tag=as45c615df
Max-Forwards: 68
Call-ID: LU-168839844056745-257985@i8.apa37.org
CSeq: 3 BYE
Reason: Q.850;cause=16
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
Sending to 10.5.109.147:5060 (no NAT)
Scheduling destruction of SIP dialog 'LU-168839844056745-257985@i8.apa37.org' in 6400 ms (Method: BYE)

<--- Transmitting (no NAT) to 10.5.109.147:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.5.109.147:5060;branch=z9hG4bK5c19c9d3fd0b5e2cb1bc863ca3a91352635f83b2-0-ac12471-64a2ea6c131df104;_aluscr_;received=10.5.109.147
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK_0001_1688398444-320638-761229-LucentPCSF;e2ecallid=0002148f
From: "Unavailable" <sip:+91XXXXXXXXXX@ap.ims.airtel.in>;tag=635f83b2-64a2ea68361e7ab-gm-pt-lucentPCSF-036042
To: <sip:0XXXXXXXXXX@ap.ims.airtel.in;transport=udp;user=phone>;tag=as45c615df
Call-ID: LU-168839844056745-257985@i8.apa37.org
CSeq: 3 BYE
Server: Asterisk PBX 18.9.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

sorry they are very huge, few lines are eliminated

There is no DTMF as RFC2833 in this log. If that is the DTMF method that should be used, then nothing came in.

I have used Read() is there any other DTMF application I can use, or you are saying about Read?

If DTMF is to be received using RFC2833, then Asterisk is not getting DTMF. Changing a dialplan application doesn’t change this. If DTMF is to be received using some other method, then the SIP configuration would need to change to reflect that. We can’t tell you what is the correct option.

But same dialplan is working for inbound call :slightly_frowning_face:

That doesn’t change my answer. If Asterisk doesn’t get told the DTMF, then Asterisk doesn’t know it.

Okay, then how do I tell asterisk to take DTMF(keypad) input, can you please tell me that.

I don’t think you’re understanding. You can’t. This isn’t something on the Asterisk side. As I stated, if RFC2833 is the DTMF method that should be used then Asterisk isn’t being told the DTMF. You can’t do anything to Asterisk to change that.

Yes for same inbound call I got these logs RFC2833

Got  RTP packet from    10.5.64.114:34966 (type 98, seq 019883, ts 3614234406, len 000004)
Got  RTP RFC2833 from   10.5.64.114:34966 (type 98, seq 019883, ts 3614234406, len 000004, mark 0, event 00000002, end 0, duration 01320) 
Got  RTP packet from    10.5.64.114:34966 (type 98, seq 019884, ts 3614234406, len 000004)
Got  RTP RFC2833 from   10.5.64.114:34966 (type 98, seq 019884, ts 3614234406, len 000004, mark 0, event 00000002, end 1, duration 01440) 
    -- User entered '2'
    -- Executing [+914043792222@keypad_input:3] Set("SIP/airtel-00000017", "user_input_to_app=2") in new stack
    -- 

so is it like for an outbound call I cannot take Keypad Input? I dont think so