freePBX to IP PBX - outgoing calls taken as answered

Hello

Firstly i would like to thanks @lgaetz @dicko @david55 @comtech @Stewart1 for all the help and support right from setting up the freepbx (from nov 22, till date) and ironing out multiple issues.

all is working fine since then…

now i have started using a call file bash script to automate outgoing calls and wombat (cheap way of getting call centre like facility).

so my few issues

  1. as soon as the call from freepbx is transferred to matrix PBX, the recorded file starts playing even before the call has been actually answered. so one person can pick the call in 2 rings and another in 8 rings and thus the recording heard by the caller starts at different starting point.

  2. in CDR of the freepbx i am getting “anonymous” as the caller ID. link to the thread

I guess both the issues are due to some misconfiguration in the matrix PBX.

My setup

FreePBX - 192.168.1.81
CO/PSTN Matrix Gateway -192.168.1.240 with 4 FXO and 4 FXS ports
“BSNL WINGS” SIP trunk service (India)
Pfsense + firewall with NAT and firewall rules
Dynamic public IP allocation by ISP - attached to DDNS domain by pfsense.
softphone on android and on iOS

MATRIX PBX SETTINGS

fxo port general settings for normal PSTN line

fxo port general settings for Fibre line

SIP TRUNK SETTINGS

SIP TRUNK SETTINGS

SIP TRUNK SETTINGS

SIP TRUNK SETTINGS

image

Without answer supervision, the gateway has to assume that the call has been answered immediately, or more accurately, after the 2 seconds, configured by:

image
.

If your analogue service actually has answer supervision, of a type supported by the gateway, you need to select that answer supervision type. Otherwise, find a better service (ISDN, or VoIP).

You could also experiment with silence detection.

Post your callfile

I will try toggling the answer supervision and then see if it works. will update.
it has two option - none or battery reversal.

link to the call file thread - Outbound calls and play message - #7 by puneet1984

If the provider does not do a line reversal for answer, the call will be considered never to have been answered. (I suppose it is just possible that the 2 seconds is applied, in which case that will need to be increased, but I think that unlikely.)

yes you are correct… toggling the answer supervision to battery reversal … the call is never considered to be answered

asterisk log - without answer supervision “on”

    -- Attempting call on SIP/matrix_setu/OUTBOUND_NUM@from-internal for 988@from-internal:1 (Retry 1)
  == Using SIP VIDEO TOS bits 136
  == Using SIP VIDEO CoS mark 6
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called matrix_setu/OUTBOUND_NUM@from-internal
    -- SIP/matrix_setu-00001790 is making progress
    -- SIP/matrix_setu-00001790 answered
    -- Executing [988@from-internal:1] NoOp("SIP/matrix_setu-00001790", "Running miscapp 2: diverting gp outgoing calls to IVR recorded messag") in new stack
    -- Executing [988@from-internal:2] Macro("SIP/matrix_setu-00001790", "user-callerid,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/matrix_setu-00001790", "TOUCH_MONITOR=1709821249.10911") in new stack
    -- Executing [s@macro-user-callerid:2] Set("SIP/matrix_setu-00001790", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:3] Progress("SIP/matrix_setu-00001790", "") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/matrix_setu-00001790", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/matrix_setu-00001790", "CHANEXTENCONTEXT=matrix_setu-00001790") in new stack
    -- Executing [s@macro-user-callerid:6] Set("SIP/matrix_setu-00001790", "CHANEXTEN=matrix_setu-00001790") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/matrix_setu-00001790", "CALLERID(number)=") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/matrix_setu-00001790", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:9] Set("SIP/matrix_setu-00001790", "HOTDESCKCHAN=matrix_setu-00001790") in new stack
    -- Executing [s@macro-user-callerid:10] Set("SIP/matrix_setu-00001790", "HOTDESKEXTEN=matrix_setu") in new stack
    -- Executing [s@macro-user-callerid:11] Set("SIP/matrix_setu-00001790", "HOTDESKCALL=0") in new stack
    -- Executing [s@macro-user-callerid:12] ExecIf("SIP/matrix_setu-00001790", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("SIP/matrix_setu-00001790", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [s@macro-user-callerid:14] GotoIf("SIP/matrix_setu-00001790", "0?report") in new stack
    -- Executing [s@macro-user-callerid:15] ExecIf("SIP/matrix_setu-00001790", "1?Set(REALCALLERIDNUM=)") in new stack
    -- Executing [s@macro-user-callerid:16] Set("SIP/matrix_setu-00001790", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:17] GotoIf("SIP/matrix_setu-00001790", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:18] Set("SIP/matrix_setu-00001790", "AMPUSERCIDNAME=") in new stack
    -- Executing [s@macro-user-callerid:19] ExecIf("SIP/matrix_setu-00001790", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
    -- Executing [s@macro-user-callerid:20] GotoIf("SIP/matrix_setu-00001790", "1?report") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] NoOp("SIP/matrix_setu-00001790", "Macro Depth is 1") in new stack
    -- Executing [s@macro-user-callerid:30] GotoIf("SIP/matrix_setu-00001790", "1?report2:macroerror") in new stack
    -- Goto (macro-user-callerid,s,31)
    -- Executing [s@macro-user-callerid:31] GotoIf("SIP/matrix_setu-00001790", "0?continue") in new stack
    -- Executing [s@macro-user-callerid:32] ExecIf("SIP/matrix_setu-00001790", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack
    -- Executing [s@macro-user-callerid:33] Set("SIP/matrix_setu-00001790", "__TTL=64") in new stack
    -- Executing [s@macro-user-callerid:34] GotoIf("SIP/matrix_setu-00001790", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,50)
    -- Executing [s@macro-user-callerid:50] Set("SIP/matrix_setu-00001790", "CALLERID(number)=") in new stack
    -- Executing [s@macro-user-callerid:51] Set("SIP/matrix_setu-00001790", "CALLERID(name)=") in new stack
    -- Executing [s@macro-user-callerid:52] GotoIf("SIP/matrix_setu-00001790", "1?cnum") in new stack
    -- Goto (macro-user-callerid,s,54)
    -- Executing [s@macro-user-callerid:54] Set("SIP/matrix_setu-00001790", "CDR(cnum)=") in new stack
    -- Executing [s@macro-user-callerid:55] Set("SIP/matrix_setu-00001790", "CHANNEL(language)=en") in new stack
    -- Executing [988@from-internal:3] Goto("SIP/matrix_setu-00001790", "ivr-2,s,1") in new stack
    -- Goto (ivr-2,s,1)
    -- Executing [s@ivr-2:1] Set("SIP/matrix_setu-00001790", "TIMEOUT_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-2:2] Set("SIP/matrix_setu-00001790", "INVALID_LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-2:3] Set("SIP/matrix_setu-00001790", "_IVR_CONTEXT_ivr-2=") in new stack
    -- Executing [s@ivr-2:4] Set("SIP/matrix_setu-00001790", "_IVR_CONTEXT=ivr-2") in new stack
    -- Executing [s@ivr-2:5] Set("SIP/matrix_setu-00001790", "__IVR_RETVM=") in new stack
    -- Executing [s@ivr-2:6] GotoIf("SIP/matrix_setu-00001790", "1?skip") in new stack
    -- Goto (ivr-2,s,8)
    -- Executing [s@ivr-2:8] Set("SIP/matrix_setu-00001790", "IVR_MSG=custom/GP_CALL_NEW") in new stack
    -- Executing [s@ivr-2:9] Set("SIP/matrix_setu-00001790", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-2:10] ExecIf("SIP/matrix_setu-00001790", "1?Background(custom/GP_CALL_NEW)") in new stack
    -- <SIP/matrix_setu-00001790> Playing 'custom/GP_CALL_NEW.alaw' (language 'en')
    -- Executing [s@ivr-2:11] WaitExten("SIP/matrix_setu-00001790", "10,") in new stack
    -- Timeout on SIP/matrix_setu-00001790, going to 't'
    -- Executing [t@ivr-2:1] Set("SIP/matrix_setu-00001790", "TIMEOUT_LOOPCOUNT=1") in new stack
    -- Executing [t@ivr-2:2] GotoIf("SIP/matrix_setu-00001790", "0?final") in new stack
    -- Executing [t@ivr-2:3] Set("SIP/matrix_setu-00001790", "IVR_MSG=no-valid-responce-pls-try-again") in new stack
    -- Executing [t@ivr-2:4] Goto("SIP/matrix_setu-00001790", "s,start") in new stack
    -- Goto (ivr-2,s,9)
    -- Executing [s@ivr-2:9] Set("SIP/matrix_setu-00001790", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-2:10] ExecIf("SIP/matrix_setu-00001790", "1?Background(no-valid-responce-pls-try-again)") in new stack
    -- <SIP/matrix_setu-00001790> Playing 'no-valid-responce-pls-try-again.slin' (language 'en')
    -- Executing [s@ivr-2:11] WaitExten("SIP/matrix_setu-00001790", "10,") in new stack
    -- Timeout on SIP/matrix_setu-00001790, going to 't'
    -- Executing [t@ivr-2:1] Set("SIP/matrix_setu-00001790", "TIMEOUT_LOOPCOUNT=2") in new stack
    -- Executing [t@ivr-2:2] GotoIf("SIP/matrix_setu-00001790", "0?final") in new stack
    -- Executing [t@ivr-2:3] Set("SIP/matrix_setu-00001790", "IVR_MSG=no-valid-responce-pls-try-again") in new stack
    -- Executing [t@ivr-2:4] Goto("SIP/matrix_setu-00001790", "s,start") in new stack
    -- Goto (ivr-2,s,9)
    -- Executing [s@ivr-2:9] Set("SIP/matrix_setu-00001790", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-2:10] ExecIf("SIP/matrix_setu-00001790", "1?Background(no-valid-responce-pls-try-again)") in new stack
    -- <SIP/matrix_setu-00001790> Playing 'no-valid-responce-pls-try-again.slin' (language 'en')
    -- Executing [s@ivr-2:11] WaitExten("SIP/matrix_setu-00001790", "10,") in new stack
    -- Timeout on SIP/matrix_setu-00001790, going to 't'
    -- Executing [t@ivr-2:1] Set("SIP/matrix_setu-00001790", "TIMEOUT_LOOPCOUNT=3") in new stack
    -- Executing [t@ivr-2:2] GotoIf("SIP/matrix_setu-00001790", "0?final") in new stack
    -- Executing [t@ivr-2:3] Set("SIP/matrix_setu-00001790", "IVR_MSG=no-valid-responce-pls-try-again") in new stack
    -- Executing [t@ivr-2:4] Goto("SIP/matrix_setu-00001790", "s,start") in new stack
    -- Goto (ivr-2,s,9)
    -- Executing [s@ivr-2:9] Set("SIP/matrix_setu-00001790", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3.000
    -- Executing [s@ivr-2:10] ExecIf("SIP/matrix_setu-00001790", "1?Background(no-valid-responce-pls-try-again)") in new stack
    -- <SIP/matrix_setu-00001790> Playing 'no-valid-responce-pls-try-again.slin' (language 'en')
    -- Executing [s@ivr-2:11] WaitExten("SIP/matrix_setu-00001790", "10,") in new stack
    -- Timeout on SIP/matrix_setu-00001790, going to 't'
    -- Executing [t@ivr-2:1] Set("SIP/matrix_setu-00001790", "TIMEOUT_LOOPCOUNT=4") in new stack
    -- Executing [t@ivr-2:2] GotoIf("SIP/matrix_setu-00001790", "1?final") in new stack
    -- Goto (ivr-2,t,5)
    -- Executing [t@ivr-2:5] Playback("SIP/matrix_setu-00001790", "no-valid-responce-transfering") in new stack
    -- <SIP/matrix_setu-00001790> Playing 'no-valid-responce-transfering.slin' (language 'en')
    -- Executing [t@ivr-2:6] Goto("SIP/matrix_setu-00001790", "") in new stack
[2024-03-07 19:52:36] WARNING[19322][C-00000d87]: pbx.c:8887 pbx_parseable_goto: Goto requires an argument ([[context,]extension,]priority)
  == Spawn extension (ivr-2, t, 6) exited non-zero on 'SIP/matrix_setu-00001790'
    -- Executing [h@ivr-2:1] Hangup("SIP/matrix_setu-00001790", "") in new stack
  == Spawn extension (ivr-2, h, 1) exited non-zero on 'SIP/matrix_setu-00001790'
[2024-03-07 19:52:36] NOTICE[19322][C-00000d87]: pbx_spool.c:463 attempt_thread: Call completed to SIP/matrix_setu/OUTBOUND_NUM@from-internal

Silence Detection
in asterisk call file??

can you point me towards the right direction…

https://docs.asterisk.org/Asterisk_20_Documentation/API_Documentation/Dialplan_Applications/WaitForSilence/

However, there might be more GUI friendly ways.

In 2024 there are any number of speech-to-text systems, after the call is answered send it there, you could then intelligently act on any response or ignore it and play your file, however many folks like me won’t say anything unless it sounds like a human to avoid ‘cold-callers’ but the STT engines all operate on a ‘detect silence’ to end the session.

Hello
firstly i am not a coder or engineer in any way.
i am doctor by profession and run a small clinic.

i want this auto call facility so that i can inform the patients about their upcoming appointments and other announcements related to the clinic and its timings and any health events being organised.
thus i am unable to invest too much in the commercial add ons or services.

secondly, whatever i have learnt regarding asterisk and freepbx is through this community and by reading online and in no way i am expert in dealing with asterisk or freepbx.
lot of concepts and commands are new to me and some i don’t understand at all.

my point being, integrating STT engines and editing API and conf files are sometimes way over my level of understanding.

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