hangup detection with alsa voicemodems !

Hi there,

I'm very happy to have found this channel, I've managed to multiplex 2 modems (one is doing the ring detection and the cid announcement, the other one does the on/off hock and provides the dsp device)
( AT protocol, no acoustic ring detection )

It works well !
Meanwhile, it seems it doesn't detect when an call has ended.
For example, if I Record with silence detection, it also records the busy tone after the end user has terminated the communication. (Record stops because i've given a maximal recording time)

Is there a way to do busy tone detection ?

does need_acoustic_ring=1 also enable busy tone/hangup detection ?

(unfortunatly the voice modem doesn't work well in no_serial mode, when a call arrives it detects it and bug doing hock on/off/on/off/on/off/....)


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

hmm btw, the voice modem

hmm btw, the voice modem can't detect ended call.
(the voice modem is a dirty trick, snd-intel8x0m + dmix/dsnoop + slmodem)


alsa_voicemodem

Yo man,

you're hackish ;-).

There was an ALSA_VOICEMODEM serial protocol in the sources, that works well with alsavoicemodems.

It will come back in the future, if there is interest enough.

Voicemodems do not signal when a call is ended (it's also because of that that they are cheap and telephony boards are costly).

The trick it was using was to assume the call is ended after a configurable amount of time of silence, and to generate audio dtmf tones to do the call, and use the alsa mixer to do the onhook/offhook of the modem.

Busy tone is not easily identified, because is different in each country :-(.

Giovanni


changed the way i'M doing it BUT having ECHO issue

Hi :)

ALSA_VOICEMODEM would have worked for me I guess, but i wouldn't have had the callerid feature.

I'm having issues with recording, I thought it was about the dmix/dsnoop hack to share the alsadevice between slmodem and cellix.
I'm not using dmix/dsnoop/slmodem anymore since I don't need slmodem to do the hooking on/off.
It's now my python script that calls amixer to do it. And it's simpler, celliax directly use the alsa modem device.

But the issues are still here:
If I redirect a incoming "celliax" call to a cip phone, it works ok.
If I only record the incomming call, there's now echo in the recording.
If I start arecord while asterisk record a call from the celliax channel there's NO echo.

Another weird thing and I'm not sure it's related to celliax, duraction in extensions commands are not honoured. Wait(10) last longer that 10seconds, Record(file|0|60) records for at least 150 seconds and in some case for several hours.

Have anybody ever encountered that weird issues ?

I'm going to try to reproduce with sip channels with and without celliax channel loaded

Cheers.


more info needed

Dear anonymous,

thanks for your hacking!!!!

Please check first if you have all the correct values in alsamixer.

Then try to explain more in detail what the echo problem is.

Can you please give much more info on the duration problem? It seems to me that I saw that problem, but not sure about...

Ciao for now,

Giovanni


trying to do so

Hi,

What about alsamixer ? is there something specific I need to do ?

amixer -c 1
Simple mixer control 'Caller ID',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Modem Speaker',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 0 [0%]
Front Right: 0 [0%]
Simple mixer control 'Off-hook',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]

I can provide a sample with echo I you want.
When I first tried there were no Echo. (if i recall correctly)
And then I realised that there were.

Note the echo only happens when using the Record function.
If a incoming "celliax" call is made, answered and transfered to a sip phone (using the Dial function), there's no echo.
If I replace Record(something) by System(/usr/bin/arecord something) there's no echo.
If I externaly start arecord before an incoming call arrives and get Record()ed there's no echo in the file Record()ed thru the celliax channel.

About the duration issue.
I've always noted a weird behavior when using celliax. I had to replace the Wait function by System(/bin/sleep ) to get the wanted duration. (because Wait was lasting more than expected)
And it was the same when expecting Record not to record for more than X seconds. In the worst case Record()ing was lasting for hours while it was expected not to record for more than 60s.

I'm now using a dummy alsa device in celliax.conf and using System(arecord ) instead of Record().

Could it be a thread locking/whatever issue ?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.