Asterisk Server Configurations for Real-Time External Media Listening:

[stream-audio]
; Handle calls between any two extensions in the 7000 range using external media
exten => _7XXX,1,NoOp(Starting call to ${EXTEN} from ${CALLERID(num)})
same => n,ExternalMedia(rtp,3.252.149.9:3000/3.252.149.9:3001,slin16) ; Send RTP to your Node.js server ports
same => n,Hangup()

; Voicemail handling for any extensions in the 8000 range
exten => _8XXX,1,VoicemailMain(${EXTEN}@main)
same => n,Hangup()

You’re going to need to elaborate on the purpose of this post.

I want to make the rela time listening for the call that are coming from asterisk to my ndoe js code

Well, ExternalMedia is not a dialplan application. You use it in ARI. There’s been quite a few threads on it, which you can find by searching or someone else may chime in. How did you come up with the given dialplan?

I have configured the call from the extensions.conf, I succeeded in making the record on the asterisk side with the mixmonitor but I want to know how can I listen in the real time to the call using external media from the channels Rest API?

I’ve responded previously:

I talked about options at AstriCon too:

What configurations should I have to make in the extensions.conf?
[stream-audio]
; Handle calls between any two extensions in the 7000 range using external media
exten => _7XXX,1,NoOp(Starting call to ${EXTEN} from ${CALLERID(num)})
same => n,ExternalMedia(rtp,3.252.149.9:3000/3.252.149.9:3001,slin16) ; Send RTP to your Node.js server ports
same => n,Hangup()

; Voicemail handling for any extensions in the 8000 range
exten => _8XXX,1,VoicemailMain(${EXTEN}@main)
same => n,Hangup()

You would call the ARI application using the Stasis dialplan application, and specifying the name of the ARI application. It is up to you to write the ARI application though.

it should be in the extensions.conf:
[stream-audio]
; Handle calls between any two extensions in the 7000 range using external media
exten => _7XXX,1,NoOp(Starting call to ${EXTEN} from ${CALLERID(num)})
same => n,ExternalMedia(rtp,3.252.149.9:3000/3.252.149.9:3001,slin16) ; Send RTP to your Node.js server ports
same => n,Hangup()

; Voicemail handling for any extensions in the 8000 range
exten => _8XXX,1,VoicemailMain(${EXTEN}@main)
same => n,Hangup()

~

It looks to me that you are repeating a question because you don’t like the, good, answer that you got. That won’t change the way that Asterisk works.

the answer that I got it, it is not what I need, and I don’t understand why are you talking in an impolite way, my question was clear, I want to make real-time connection from my node js code to listen in the real-time to the call, and make the transcription of the call.
all that I need are the configurations from the asterisk side???
@david551

So… do you have an ARI application written?

"Yes, sure! I successfully managed to record the call using MixMonitor. I stored the recording on the server and then retrieved it using Asterisk’s API via /recordings/stored.

Now, I’m trying to enable real-time listening of the call to perform transcription. What I need to know is what specific configurations I should add to the extensions.conf file to achieve this."

Let me know if you need further adjustments!

I’m going to bow out of this thread at this point, someone else may chime in.

On Tuesday 10 September 2024 at 16:05:29, jaafar via Asterisk Community wrote:

Yes, sure! I successfully managed to record the call using MixMonitor.

I need to know is what specific configurations I should add to the
extensions.conf file to achieve … [what I’m trying to do].

I recommend that you learn about ARI, since that’s what has been recommended
that you use:

https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/

Feel free to come back with any questions once you knwo what ARI is and what
it’s for.

Antony.


The words “e pluribus unum” on the Great Seal of the United States are from a
poem by Virgil entitled “Moretum”, which is about cheese and garlic salad
dressing.

                                               Please reply to the list;
                                                     please *don't* CC me.

On Tuesday 10 September 2024 at 16:20:45, Antony Stone wrote:

https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-
ARI/

What Really Is ARI? ⋆ Asterisk

I should have mentioned Overview - Asterisk Documentation
Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/ as well

Antony.


Never automate fully anything that does not have a manual override capability.
Never design anything that cannot work under degraded conditions in emergency.

                                               Please reply to the list;
                                                     please *don't* CC me.

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