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

Not Working on asterisk-16.16.2 #12

Open
masteringvoip opened this issue Aug 4, 2021 · 12 comments
Open

Not Working on asterisk-16.16.2 #12

masteringvoip opened this issue Aug 4, 2021 · 12 comments

Comments

@masteringvoip
Copy link

Hi Sir,

It not working with asterisk 16

Here is the error:

== Using SIP RTP CoS mark 5
> 0x7f35dc008ad0 -- Strict RTP learning after remote address set to: 202.52.48.210:4002
-- Executing [7000@main-out:1] Answer("SIP/9999-00000000", "") in new stack
-- Executing [7000@main-out:2] Verbose("SIP/9999-00000000", "starting audio fork") in new stack
starting audio fork
-- Executing [7000@main-out:3] AudioFork("SIP/9999-00000000", "ws://localhost:8080/") in new stack
== setting wsserver to ws://localhost:8080/
== setting direction to 2
> 0x7f35dc008ad0 -- Strict RTP learning after remote address set to: 202.52.48.210:4002
asterisk-tts*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
Asterisk ending (0).
[root@asterisk-tts asterisk-16.16.2]# dmesg
[92488.239632] asterisk[14000]: segfault at 88 ip 00007f36b14e7a7d sp 00007f36b73d42e0 error 4 in app_audiofork.so[7f36b14e3000+9000]
[92598.178537] asterisk[14178]: segfault at 88 ip 00007fb7910e5a7d sp 00007fb791b462e0 error 4 in app_audiofork.so[7fb7910e1000+9000]
[92873.266843] asterisk[17954]: segfault at 88 ip 00007f35e2cfda7d sp 00007f35763882e0 error 4 in app_audiofork.so[7f35e2cf9000+9000]

Thanks

@MattRiddell
Copy link

The only difference I can see from a machine that I had this working on was this:

diff --git a/apps/app_audiofork.c b/apps/app_audiofork.c
index 1b3a0174f..12e5b2f81 100644
--- a/apps/app_audiofork.c
+++ b/apps/app_audiofork.c
@@ -598,7 +598,7 @@ static int setup_audiofork_ds(struct audiofork *audiofork,
 
 
   ast_verb(2, "Connecting websocket server at %s\n",
-           audiofork_ds->wsserver);
+           audiofork->audiofork_ds->wsserver);
 
   //check if we're running with TLS
   if (audiofork->has_tls == 1) {

It definitely worked for me before I switched over to using the external media channel via ARI:

globalARI.channels.externalMedia({
    channelId: "EM-"+incoming.id,
    app: "externalMedia",
    external_host: ip+":"+rtpPort,
    format: "slin16",
    encapsulation: "rtp",
    transport: "udp",
    variables: {channel: incoming.id}
})

@masteringvoip
Copy link
Author

Hi Sir @MattRiddell ,

Can you share, the specific type of asterisk that you use so that this script https://github.com/nadirhamid/asterisk-audiofork/blob/master/app_audiofork.c worked?

Thanks

@MattRiddell
Copy link

It's out of a git fork but just config changes.

Version is 16.10.x

@MattRiddell
Copy link

If it keeps crashing do a backtrace on it and see where:

Getting a backtrace

@masteringvoip
Copy link
Author

@MattRiddell it working on asterisk 16.10

Thanks Sir

@MattRiddell
Copy link

No problems - post back if you have issues and I'll help where I can

@masteringvoip
Copy link
Author

Hi Sir @MattRiddell ,

On previous message you said "I switched over to using the external media channel via ARI", can you share it on this github?
so I can try it

i'm looking programs for realtime TTS or STT conneted to Google Voice.

Thanks

@MattRiddell
Copy link

Hah ok,

So @danjenkins shared a repository with me that I used:

RTP Audio Server

I'm using it for a different purpose than what I used this repository for.

This repository I used to send off a stream for transcribing.

Dan's repository I used for just dealing directly with the audio so I could feed it into my AI pipeline.

Bear in mind, with Dan's repository you'd be responsible for parsing RTP etc.

Anyway, hope that helps 😊

@MattRiddell
Copy link

Dan's repository is probably perfect for you - he connects to Microsoft's dialog voice or whatever it's called.

I still use this repository to split off a stream for transcribing though.

Each has its purpose 😊

@masteringvoip
Copy link
Author

Hi Sir @MattRiddell @danjenkins

Thank you very much for the help, you are so kind to reply to my question, I am so happy to be able to try it. Good luck to me.

Thanks

@jayasingh1802
Copy link

Hi @MattRiddell @masteringvoip

I tried this with Asterisk 16.6.2 & Asterisk 16.10.0 but no luck.

Here is the error:
-- Executing [s@STREAM:1] NoOp("SIP/voda-00000000", ""starting audio fork------"") in new stack
-- Executing [s@STREAM:2] Answer("SIP/voda-00000000", "") in new stack
> 0x7fdc1c00a670 -- Strict RTP switching to RTP target address 10.229.6.148:17800 as source
vl073096-app52-pd-obd-vcz-cts-blr-in-vf*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups

@MattRiddell
Copy link

You'll need to get a back trace.

Instructions here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants