AMI busy on busy

Hello,

I use the AMI (Asterisk Manager Interface) with different CTI clients.
Is it possible to see a incomming call with AMI when the extension/phone is busy ?

Thank you,
Tom

In the “debug” I can see a busy on busy call:

root@freepbx:~# tail -f /var/log/asterisk/full | grep “CALLERID(number)”
[2018-05-15 07:38:13] VERBOSE[24983][C-00000017] pbx.c: Executing [s@macro-user-callerid:35] Set(“SIP/T-Online SIP 9xxxxxx-0000002c”, “CALLERID(number)=+4917xxxxxxxx”) in new stack

I’d really like to help you, but I still don’t understand what you’re asking for. Can you give a poor, simple systems engineer a little more to work with?

Hello Dave,
thank you for you post.
My extension is busy on busy. If someone call me, while I have a call, the caller got a busy signal. That is very good.
But I wan’t to know how was tried to call me. Bevore Asterisk I used ISDN and the Call-Monitor shows me every incomming call. Doesn’t matter if the phone is busy or not.
I thnik Asterisk/Freebpx can do this too. Because in the debug I see the callerid while I’m on phone.
But who can I got this messange on my computer ? I installed a lot of CTI Clients with use die AMI but it doesn’t work.
Can you help me, please ?
Tom

OK - this sounds perfectly reasonable, although there are call redirection technologies built into the system that can make that experience more satisfying for your callers.

At this juncture, busy signals are equivalent to coal trains. They work and everybody knows the technology, but unless you want to ride through the Black Hills on a tourist train, no one actually wants to use one. For example, there are now queues, where (instead of getting a busy signal) you can put a caller “on hold” while you wrap up your current call. This also allows for many other options (call backs, VM on demand, dial-to-extension, etc.) that the ubiquitous busy signal doesn’t afford the user.

OK - there are several technologies that can help you with that. For example:

  • You could establish a FindMe/FollowMe sequence that calls (among other things) something that will trigger your CTI application.

  • There are ways to do this in the SuperFecta setup, by redirecting the call to a webpage as the call is being ‘inboarded’.

  • You could use the new CRM Commercial Module and work the Sangoma guys to make it work with your existing CRM/CTI system.

  • You could use the CDR database and scan it on a ‘regular’ basis to report ‘busy’ calls to the screen.

Out of the box, however, there’s nothing that you can just slap onto the system that will help you.

Hello Dave,

different countries have different customs :blush: And this PBX is for my homeoffice and coal trains driver :blush:

I found a soultion but I need a hint from great engineer.

I modified the extensions_override_freepbx.conf [ext-group] line 3-14. But it send me a email for every call.
I tried to put the echo-command into the busy block line 12, but it didn’t work.

Can you help me ? How to include a “If busy then” ?

Thank you,
Tom

  1. [ext-group]

  2. include => ext-group-custom

  3. ;

  4. ;Kommentar CK: Dieser Änderungen schickt eine E-Mail bei Besetzt/Frei

  5. exten => 999,1,TrySystem(echo “Call from ${CALLERID(name)} at ${CALLERID(number)} received ${STRFTIME(${EPOCH},on %A %B %e %c)}” | mail -s ‘ANRUF fuer TJ Buero’ ‘[email protected]’)

  6. exten => 999,n,GotoIf($["${DEVICE_STATE(SIP/1)}"=“INUSE”]?Busy,1)

  7. exten => 999,n,GotoIf($["${DEVICE_STATE(SIP/10)}"=“INUSE”]?Busy,1)

  8. exten => 999,n,GotoIf($["${DEVICE_STATE(SIP/11)}"=“INUSE”]?Busy,1)

  9. exten => 999,n,GotoIf($["${DEVICE_STATE(SIP/12)}"=“INUSE”]?Busy,1)

  10. ;exten => 999,n,Dial(SIP/1&SIP/10&SIP/11&local/s@send-email)

  11. exten => Busy,1,BUSY(10)

  12. exten => Busy,n,Hangup

  13. ; Modifizierung CK Ende

  14. ;

  15. exten => 999,1,GotoIf($["${__RINGINGSENT}" = “TRUE”]?cid)

  16. exten => 999,n,Playtones(ring)

  17. exten => 999,n,Progress

  18. exten => 999,n(cid),Macro(user-callerid,)

  19. exten => 999,n,Macro(blkvm-setifempty,)

  20. exten => 999,n,GotoIf($["${GOSUB_RETVAL}" = “TRUE”]?skipov)

  21. exten => 999,n,Macro(blkvm-set,reset)

  22. exten => 999,n,Set(__NODEST=)

  23. exten => 999,n(skipov),Set(RRNODEST=${NODEST})

  24. exten => 999,n(skipvmblk),Set(__NODEST=${EXTEN})

  25. exten => 999,n,GosubIf($[${DB_EXISTS(RINGGROUP/999/changecid)} = 1 & “${DB(RINGGROUP/999/changecid)}” != “default” & “${DB(RINGGROUP/999/changecid)}” != “”]?sub-rgsetcid,s,1())

  26. exten => 999,n,Gosub(sub-record-check,s,1(rg,999,force))

  27. exten => 999,n,Set(RingGroupMethod=ringall)

  28. exten => 999,n,Set(__ALT_CONFIRM_MSG=${IF($[${LEN(${VQ_CONFIRMMSG})}>1]?${IF($["${VQ_CONFIRMMSG}"!=“0”]?${VQ_CONFIRMMSG}: )}:)})

  29. exten => 999,n,GotoIf($[$["${RG_CONFIRM}"=“1”] | $[${LEN(${VQ_CONFIRMMSG})}>1]]?RGVQANNOUNCE:NORGVQANNOUNCE)

  30. exten => 999,n(RGVQANNOUNCE),Macro(dial-confirm,15,${DIAL_OPTIONS},1-10-12-13,999)

  31. exten => 999,n,Goto(gosubhere)

  32. exten => 999,n(NORGVQANNOUNCE),Macro(dial,15,${DIAL_OPTIONS},1-10-12-13)

  33. exten => 999,n(gosubhere),Gosub(sub-record-cancel,s,1())

  34. exten => 999,n,Set(RingGroupMethod=)

  35. exten => 999,n,GotoIf($[“foo${RRNODEST}” != “foo”]?nodest)

  36. exten => 999,n,Set(__NODEST=)

  37. exten => 999,n,Macro(blkvm-clr,)

  38. exten => 999,n,Goto(ext-local,vmu10,1)

  39. exten => 999,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})

  40. exten => h,1,Macro(hangupcall,)

  41. ;–== end of [ext-group] ==–;

We’ll have to get someone else involved in the conversation. Until then, you’re stuck with me .:wink:

[ext-group]
include => ext-group-custom
;
exten => 999,1,GotoIf($[“${__RINGINGSENT}” = “TRUE”]?cid)
exten => 999,n,Playtones(ring)
exten => 999,n,Progress
exten => 999,n(cid),Macro(user-callerid,)
exten => 999,n,Macro(blkvm-setifempty,)
exten => 999,n,GotoIf($[“${GOSUB_RETVAL}” = “TRUE”]?skipov)
exten => 999,n,Macro(blkvm-set,reset)
exten => 999,n,Set(__NODEST=)
exten => 999,n(skipov),Set(RRNODEST=${NODEST})
exten => 999,n(skipvmblk),Set(__NODEST=${EXTEN})
exten => 999,n,GosubIf($[${DB_EXISTS(RINGGROUP/999/changecid)} = 1 & “${DB(RINGGROUP/999/changecid)}” != “default” & “${DB(RINGGROUP/999/changecid)}” != “”]?sub-rgsetcid,s,1())
exten => 999,n,Gosub(sub-record-check,s,1(rg,999,force))
exten => 999,n,Set(RingGroupMethod=ringall)
exten => 999,n,Set(__ALT_CONFIRM_MSG=${IF($[${LEN(${VQ_CONFIRMMSG})}>1]?${IF($[“${VQ_CONFIRMMSG}”!=“0”]?${VQ_CONFIRMMSG}: )}:)})
exten => 999,n,GotoIf($[$[“${RG_CONFIRM}”=“1”] | $[${LEN(${VQ_CONFIRMMSG})}>1]]?RGVQANNOUNCE:NORGVQANNOUNCE)
exten => 999,n(RGVQANNOUNCE),Macro(dial-confirm,15,${DIAL_OPTIONS},1-10-12-13,999)
exten => 999,n,Goto(gosubhere)
exten => 999,n(NORGVQANNOUNCE),Macro(dial,15,${DIAL_OPTIONS},1-10-12-13)
exten => 999,n(gosubhere),Gosub(sub-record-cancel,s,1())
exten => 999,n,Set(RingGroupMethod=)
exten => 999,n,GotoIf($[“foo${RRNODEST}” != “foo”]?nodest)
exten => 999,n,Set(__NODEST=)
exten => 999,n,Macro(blkvm-clr,)
exten => 999,n,Goto(ext-local,vmu10,1)
exten => 999,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})
exten => h,1,Macro(hangupcall,)
;–== end of [ext-group] ==–;

I’m pretty sure this isn’t what you want to do.

To start with, you’re preventing the code that runs when your ring group is established from running correctly.So to start, let’s put your code someplace where it doesn’t do any more damage than it needs to:

In the file “extensions_custom.conf”

[ext-group-custom]
;Kommentar CK: Dieser Änderungen schickt eine E-Mail bei Besetzt/Frei
exten => 999,1,TrySystem(echo “Call from ${CALLERID(name)} at ${CALLERID(number)} received ${STRFTIME(${EPOCH},on %A %B %e %c)}” | mail -s ‘ANRUF fuer TJ Buero’ ‘[email protected]’)
exten => 999,n,GotoIf($[“${DEVICE_STATE(SIP/1)}”=“INUSE”]?busy)
exten => 999,n,GotoIf($[“${DEVICE_STATE(SIP/10)}”=“INUSE”]?busy)
exten => 999,n,GotoIf($[“${DEVICE_STATE(SIP/11)}”=“INUSE”]?busy)
exten => 999,n,GotoIf($[“${DEVICE_STATE(SIP/12)}”=“INUSE”]?busy)
exten => 999,n,Goto(ext-group,999,1)
exten => 999,n(busy),BUSY(10)
exten => 999,n,Goto(ext-local,h,1)
exten => 999,n(end),NoOp(“End of ext-group-custom”)
; Modifizierung CK Ende

I’m pretty sure that’s still wrong, but it’s closer.

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