Medical call - to two participants number with announcements and transfer

Hello community, we need a medical call solution for our system. > see flow_chart.pdf

All works fine, but we cannot play announcement 2 if answer extern number 4000 (or 471 for testing)

We tested with various methods, it is certainly not difficult - but we are standing on the hose. :upside_down_face:

I hope it is understandable
Thank YOu
MfG Steffen









Please provide a call trace: https://sangomakb.atlassian.net/wiki/spaces/SS/pages/31162494/Providing+Great+Debug#Asterisk-Logs---Part-II

Not sure what your question is exactly, but when using ORIGINATE with FreePBX, it’s often better to use the freepbx dialplan internals with Local/xxxx@from-internal channels instead of PJSIP/xxx

Can we get the actual setup of FreePBX? What is happening when the call is sent to the PBX? What does the originate command or call file look like? Are you trying to dial both at the same time then bridge them together once announcements are played?

All we have here is snippets of dialplan and nothing to show how they are actually being used.

Hy and sorry for my late answer. I reading and try a lot of combinations.

The only thing I can’t get it, is the announcement after conversation assumption from the second participant?! ( is only directly call, thats is OK but i need the second announcement )

Is that possible at all or otherwise?

[amihatest1]
exten => _.,1,Answer()
exten => _.,n,Wait(1)
exten => _.,n,Set(CALLERID(name)=${CALLERID(num)}) ; Setzt den Anrufernamen auf die Anrufer-ID
exten => _.,n,Playback(cleveland) ; Erste Ansage fĂźr den Teilnehmer
;exten => _.,n,goto(from-dahdil,${EXTEN},1) ; TEST Ruft die Externe Nummer an
;exten => _.,n,Dial(Local/${EXTEN}@from-internal,${timeoutd}) ; TEST
;exten => _.,n,Dial(SIP/470) ; TEST Anruf an den Bereitschaftsdienst
;exten => _.,n,GotoIf($[“${DIALSTATUS}”=“ANSWER”]?bereitschaftsdienst-answered) ; TEST Überprüfen, ob der Bereitschaftsdienst den Anruf
;exten => _.,n,Playback(no) ; TEST Nachricht abspielen, wenn der Bereitschaftsdienst nicht antwortet
;exten => _.,n(bereitschaftsdienst-answered),Playback(brain) ; TEST Zweite Ansage fĂźr den Bereitschaftsdienst
;exten => _.,n,Wait(1) ; TEST
;exten => _.,n(startread),Playback(ent-target-attendant) ; TEST
;exten => _.,n,goto(from-dahdi,${EXTEN},1) ; TEST
;exten => _.,n,Playback(brian) ; TEST Zweite Ansage fĂźr den Bereitschaftsdienst
;exten => _.,n,GotoIf($[“${CHANNEL(state)}” = “Up”]?begin) ; TEST
;exten => _.,n,Goto(from-did-direct,470,1)
exten => _.,n,Dial(SIP/470)
exten => _.,n,Answer
exten => _.,n,Wait(1)
exten => _.,n(begin),Noop(Playing announcement Test_Ansage_3)
exten => _.,n,Playback(1-yes-2-no,noanswer)

LOG
https://pastebin.freepbx.org/view/f917a2b7

Is 470 supposed to have followme enabled?

This isn’t going to work the way you think it will work. What is the actual goal here? To play back a message to both parties when a call is answered?

yes FM is active - it this my problem … ?

To play back a message to both parties when a call is answered?

Yes, before the conversation is set up

The first announcement works, then the second participant is called (but he gets no announcement) and both can talk to each other

HMMM difficult ;(

flow_chart2

I think I don’t quite understand the expiry of the extensions_custom.conf

this is my idea:

the first number and the second number, i get out from HA Node-RED Flow

Then running context amihaxxx call first number, and than >> " goto(from-dahditxxxx " work off the second context

[amihatest]
exten => _.,1,Answer()
exten => _.,n,Wait(1)
exten => _.,n,Set(CALLERID(name)=${CALLERID(num)})
exten => _.,n,Playback(cleveland) ; erste TEST Ansage fĂźr den Bewohner
exten => _.,n,goto(from-dahditest,${EXTEN},1)

[from-dahditest]
exten => _.,n,Answer()
exten => _.,n,Wait(1)
exten => _.,n,Playback(alert) ; Zweite TEST Ansage fĂźr den Bereitschaftsdienst

Then you need to use the A option in the Dial() string which will play an announcement back per channel and each side can have their own announcement.

  • A(x:y) - Play an announcement to the called and/or calling parties, where x is the prompt to be played to the called party and y is the prompt to be played to the caller. The files may be different and will be played to each party simultaneously.

    • x - The file to play to the called party

    • y - The file to play to the calling party

WOWWWWW so easy OMG Thank You @BlazeStudios @lgaetz

it work´s

Detailed report follows

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

( Thank you for open the thread. )

so I’m desperate why not dial the second “Notruf Teilnehmer” when not answered the the first “Notruf Teilnehmer”
I get only DebugInfo Log until “DebugInfo-3”

I think the bold section ( ## ) is wrong, than i get my first “Notruf Teilnehmer” from HomeAssistant NodeRed,

Thank you for your help

[amihaalerttest2] ; test mit feedback und weiterer nummer
exten => _.,1,Answer()
same => n,Wait(1)
same => n,Set(CALLERID(name)=${CALLERID(num)}),NoOp(DebugInfo-1) ; Setzt den Anrufernamen auf die Anrufer-ID
same => n,Playback(custom/NotrufAnsage1),NoOp(DebugInfo-2) ; Erste Ansage fĂźr den Teilnehmer Bewohner

same => n,Set(ANSWERED=0),NoOp(DebugInfo-3) ; Initialisierung des Antwortstatus

; Rufe die Nummer an und setze die Variable ANSWERED, falls beantwortet

same => n,Dial(Local/${EXTEN}@from-internal,${timeoutd},A(added)),NoOp(DebugInfo-4).

; Überprüfe den DIALSTATUS

same => n,GotoIf($[“${DIALSTATUS}” = “ANSWER”]?answered:unanswered),NoOp(DebugInfo-5) ; Springe zu ‘answered’, wenn beantwortet, sonst zu ‘unanswered’

exten => _.,n(answered),NoOp(Der erste Notruf Teilnehmer hat geantwortet),NoOp(DebugInfo-6)
same => n,System(/home/asterisk/scripte/ha_hikvision_alarm_reset.sh),NoOp(DebugInfo-7) ; FĂźhre Skript aus, um den Alarm zu deaktivieren
same => n,System(echo ‘${DATETIME} - ${CALLERID(num)} - ${CHANNEL}’ >> /var/log/asterisk/anrufe),NoOp(DebugInfo-8)
same => n,Hangup(),NoOp(DebugInfo-9) ; Beende den Anruf

exten => _.,n(unanswered),NoOp(Der erste Notruf Teilnehmer hat nicht geantwortet),NoOp(DebugInfo-10)
same => n,Set(MAX_RING=10),NoOp(DebugInfo-11) ; Maximale Anzahl von Klingelzeichen festlegen
same => n,Set(COUNTER=0),NoOp(DebugInfo-12) ; Initialisieren des Zählers
same => n(start_loop),NoOp(Starte die Schleife),NoOp(DebugInfo-13)
same => n,Dial(Local/471@from-internal,10),NoOp(DebugInfo-14) ; Wähle eine weitere Notruf Nummer mit maximal MAX_RING Klingelzeichen
; Überprüfen, ob der Anruf beantwortet wurde
same => n,GotoIf($[“${DIALSTATUS}” = “ANSWER”]?call_answered:increment_counter),NoOp(DebugInfo-15)
; Anruf wurde nicht beantwortet
same => n(increment_counter),NoOp(Der Anruf wurde nicht beantwortet),NoOp(DebugInfo-16)
same => n,Set(COUNTER=$[${COUNTER} + 1]),NoOp(DebugInfo-17) ; ErhÜhe den Zähler
same => n,GotoIf($[${COUNTER} < ${MAX_RING}]?start_loop:hangup),NoOp(DebugInfo-18) ; Starte die Schleife erneut, wenn der Zähler kleiner als die maximale Anzahl von Klingelzeichen
same => n(hangup),Hangup(),NoOp(DebugInfo-19) ; Beende den Anruf
; Anruf wurde beantwortet
same => n(call_answered),NoOp(Der Anruf wurde beantwortet),NoOp(DebugInfo-20)
same => n,Hangup(),NoOp(DebugInfo-21) ; Beende den Anruf

I think, my problem is that the custom context jump to other context, and thus is the context after n,Dial(Local/${EXTEN}@from-internal, not working

OR ?

== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
– PJSIP/472-0000072b is ringing
> 0x7fe8f00d4a30 – Strict RTP learning after remote address set to: 192.168.39.28:5142
– PJSIP/472-0000072b answered
– Executing [470@amihaalert470:1] Answer(“PJSIP/472-0000072b”, “”) in new stack
– Executing [470@amihaalert470:2] Wait(“PJSIP/472-0000072b”, “1”) in new stack
> 0x7fe8f00d4a30 – Strict RTP switching to RTP target address 192.168.39.28:5142 as source
– Executing [470@amihaalert470:3] Set(“PJSIP/472-0000072b”, “CALLERID(name)=4499),NoOp(DebugInfo-1”) in new stack
– Executing [470@amihaalert470:4] Playback(“PJSIP/472-0000072b”, “custom/NotrufAnsage1),NoOp(DebugInfo-2”) in new stack
[2024-06-25 14:27:27] WARNING[224076][C-000002d1]: file.c:824 ast_openstream_full: File custom/NotrufAnsage1) does not exist in any format
[2024-06-25 14:27:27] WARNING[224076][C-000002d1]: file.c:1303 ast_streamfile: Unable to open custom/NotrufAnsage1) (format (g722)): No such file or directory
[2024-06-25 14:27:27] WARNING[224076][C-000002d1]: app_playback.c:512 playback_exec: Playback failed on PJSIP/472-0000072b for custom/NotrufAnsage1),NoOp(DebugInfo-2
– Executing [470@amihaalert470:5] Set(“PJSIP/472-0000072b”, “Answer=0),NoOp(DebugInfo-3-”) in new stack
– Executing [470@amihaalert470:6] Dial(“PJSIP/472-0000072b”, “Local/470@from-internal,A(added)),NoOp(DebugInfo-4-0),NoOp(DebugInfo-3–”“”) in new stack
[2024-06-25 14:27:27] WARNING[224076][C-000002d1]: app.c:3114 parse_options: Unrecognized option: ‘)’
– Called Local/470@from-internal
– Executing [470@from-internal:1] GotoIf(“Local/470@from-internal-0000009b;2”, “0?ext-local,*470,1”) in new stack
– Executing [470@from-internal:2] GotoIf(“Local/470@from-internal-0000009b;2”, “0?ext-local,470,1:followme-check,470,1”) in new stack
– Goto (followme-check,470,1)
– Executing [470@followme-check:1] Gosub(“Local/470@from-internal-0000009b;2”, “followme-sub,470,1()”) in new stack
– Executing [470@followme-sub:1] Set(“Local/470@from-internal-0000009b;2”, “__FMFM=TRUE”) in new stack
– Executing [470@followme-sub:2] GotoIf(“Local/470@from-internal-0000009b;2”, “0?skipclid”) in new stack
– Executing [470@followme-sub:3] Macro(“Local/470@from-internal-0000009b;2”, “user-callerid,”) in new stack

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