# Implement Talk Detect function

**URL:** <https://community.asterisk.org/t/implement-talk-detect-function/108534>\
**Category:** Asterisk APIs\
**Created:** [May 26, 2025, 8:59pm UTC](https://community.asterisk.org/t/implement-talk-detect-function/108534 "2025-05-26T20:59:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![farrellmochammad](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/farrellmochammad/32/9155_2.png) [@farrellmochammad](https://community.asterisk.org/u/farrellmochammad)\
**Post date:** [May 26, 2025, 8:59pm UTC](https://community.asterisk.org/t/implement-talk-detect-function/108534/1 "2025-05-26T20:59:26Z")

</div>

Hi Everyone,

I am new to asterisk, on my project I want to implement some detect when there is call active and there is voice from the device. Here are my configuration for docker compose

```auto
#docker-compose.yml
services:
  asterisk:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: asterisk
    ports:
      - "5060:5060/udp" # SIP
      - "8088:8088" # ARI HTTP/WebSocket
      - "10000-10100:10000-10100/udp" # RTP media (reduced range)
      - "5038:5038" # ✅ AMI (Asterisk Manager Interface)
    volumes:
      - ./asterisk-conf:/etc/asterisk
      - ./agi-scripts:/var/lib/asterisk/agi-bin
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    sysctls:
      - net.core.somaxconn=65536
      - net.ipv4.tcp_max_syn_backlog=65536
      - net.ipv4.ip_local_port_range=1024 65535
    restart: unless-stopped
    networks:
      - voipnet

networks:
  voipnet:
    driver: bridge

```

And this is my configuration for enable talk detect function

```auto
#extensions.conf

exten => 300,1,Answer()
 same => n,Set(TALK_DETECT(set)=)
 same => n,Dial(SIP/client1,15,b(default^apply_talk_detect^1)) 
 same => n,Hangup()

exten => apply_talk_detect,1,NoOp()
 same => n,Set(TALK_DETECT(set)=)
 same => n,Return()

```

I tried to only use TALK\_DETECT(SET), but on AMI channel there is no event type of ChannelTalkingStart or ChannelTalkingStop. Am I doing it wrong ?

#Asterisk > Asterisk Support #Asterisk > Asterisk Integration

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [May 27, 2025, 8:43am UTC](https://community.asterisk.org/t/implement-talk-detect-function/108534/2 "2025-05-27T08:43:49Z")

</div>

Is audio actually flowing? SIP embeds IP address information within the signaling and for media, if that’s wrong then you won’t get media flowing, and thus you wouldn’t get the events. So you need to verify the assumption that audio is flowing and that what you’ve done should work in the first place. There is the “rtp set debug on” CLI command to show RTP packets being sent/received.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [June 26, 2025, 8:44am UTC](https://community.asterisk.org/t/implement-talk-detect-function/108534/3 "2025-06-26T08:44:17Z")

</div>

Closed on June 26, 2025, 8:44am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
