"Answer" Call But Keep Ringing

Yes, when I answer the call, I have normal audio.

I found the problem, and I don’t know that it’s something I can solve with the way I want to use this.

In the motif settings, there is a checkbox “Send Unanswered to Google Voicemail:” If you don’t check that box, then the PBX takes the call one ring after it it starts ringing. If you check that box then the PBX will ring, but not “take” the call. I have this checked because I have a number specified in GV that I want ringing along with sending the call through XMPP (to the PBX). When I intially set this up, the number specified in GV would ring once then stop, but the PBX kept ringing. This didn’t work for me, I wanted to be able to grab the call from GV directly via the other number so that’s why I checked this.

I discovered this call seizing by looking at the logs. If the box is unchecked, then at the very beginning of the call, there is this entry:

VERBOSE[4990][C-00000001] pbx.c: Executing [s@im-censored:16] SendDTMF("Motif/+11234567890-82bb", "1") in new stack

This is part of the Motif code, and lets the PBX actually establish the XMPP session with Google. Google stops ringing any other destination cause someone has taken the call in their eyes.

I don’t have the motif setting checked because I want google to ring the other destination and let whatever answers take it. So I don’t have this log entry at the beginning. So the XMPP session is never fully established.

Because of how the motif works I guess, the PBX doesn’t realize it doesn’t have the call. But it acts like it does so it was playing the announcement when the call gets to ring group 2. But because the call isn’t established, that never gets heard. The ringing I’m hearing from ring group 1 to ring group 2 to the google voicemail is all being generated by google.

I answered a call after it got to the second ring group after the announcement said it played and found the entry:

VERBOSE[11517][C-00000005] app_dial.c: Sending DTMF '1' to the calling party.

So at that point the call is fully established.

So now how to deal with this…

Try using this for your announcement (untar giving one.wav). It’s some silence followed by a DTMF 1.
(The forum won’t allow a .wav file to be attached directly.)
one.tgz (3.3 KB)

I tried that, I’m working on another post now of my latest attempts… :no_mouth:

In trying to resolve this I tried adding the number I have specified in GV as the other number to ring in to the first ring group so that the PBX would do what I wanted google to do. I could answer it there, or if I don’t then it goes to ring group 2 to ring until the caller hangs up. I wasn’t wild about that because the call is flowing through the PBX and more hops, routing, lag, etc. Turns out though it won’t work because for whatever reason, the call comes in, and then when the call gets sent to the ring group extensions and the other number in ring group 1, it seems to transfer the call to the other number. The extensions stop ringing, only the outside number rings.

I then got to thinking how I could send that DTMF 1 out just as the motif is doing when I transition from ring group 1 to ring group 2. I changed the announcement in ring group 2 to a recording of a DTMF 1 tone. Nope.

Last option is trying to do some custom scripting to make the PBX send out a DTMF tone when I transition from ring group 1 to ring group 2. The Simonics GV gateway option even says you need to send this tone out to ensure you avoid google voicemail (http://support.simonics.com/support/solutions/articles/3000031917-how-do-i-prevent-google-s-voicemail-from-answering-the-call-asterisk-)

I googled around for how to send a DTMF tone about this and found this post https://community.freepbx.org/t/send-dtmf-from-ivr/30146/2

I tried putting it together and added this to extensions_custom.conf:

[custom-senddtmf1]
exten => s,1,noop(entering user defined context [custom-senddtmf1] in extensions_custom.conf)
exten => s,n,answer()
exten => s,n,senddtmf(1)
exten => s,n,Dial(SIP/7782)

I added the custom destination [custom-senddtmf1,s,1] and set it as the destination of ring group 1.

And if you guessed it didn’t work, you’re right. Logs show:

[2018-04-18 02:39:00] VERBOSE[1506][C-00000014] pbx_builtins.c: Goto ([custom-senddtmf1,s,1)
[2018-04-18 02:39:00] WARNING[1506][C-00000014] pbx.c: Channel 'SIP/773-00000032' sent to invalid extension but no invalid handler: context,exten,priority=[custom-senddtmf1,s,1

I think this is a matter of my scripting not being right. I don’t know if this is going to fix it, but I’d like to get the scripting right to see if it would. Right now it seems I don’t have it coded correctly.

I don’t know where the ‘[’ character in the Goto argument is coming from, but am pretty sure it shouldn’t be there.

I believe that the Target for your Custom Destination should be
custom-senddtmf1,s,1
without any brackets. Is that how you have it?

For some reason, when I went back in, it did have it in brackets. I didn’t add them in the beginning. Crazy thing.

New errors. :weary: It doesn’t like dialing the second ring group. I can call either ring group directly and they work.

[2018-04-18 03:34:41] VERBOSE[6798][C-00000001] pbx_builtins.c: Goto (custom-senddtmf1,s,1)
[2018-04-18 03:34:41] VERBOSE[6798][C-00000001] pbx.c: Executing [s@custom-senddtmf1:1] NoOp("SIP/773-00000004", "entering user defined context [custom-senddtmf1] in extensions_custom.conf") in new stack
[2018-04-18 03:34:41] VERBOSE[6798][C-00000001] pbx.c: Executing [s@custom-senddtmf1:2] Answer("SIP/773-00000004", "") in new stack
[2018-04-18 03:34:41] VERBOSE[6798][C-00000001] pbx.c: Executing [s@custom-senddtmf1:3] SendDTMF("SIP/773-00000004", "1") in new stack
[2018-04-18 03:34:41] VERBOSE[6798][C-00000001] pbx.c: Executing [s@custom-senddtmf1:4] Dial("SIP/773-00000004", "SIP/7782") in new stack
[2018-04-18 03:34:41] WARNING[6798][C-00000001] chan_sip.c: Purely numeric hostname (7782), and not a peer--rejecting!
[2018-04-18 03:34:41] WARNING[6798][C-00000001] app_dial.c: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
[2018-04-18 03:34:41] VERBOSE[6798][C-00000001] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)
[2018-04-18 03:34:41] VERBOSE[6798][C-00000001] pbx.c: Auto fallthrough, channel 'SIP/773-00000004' status is 'CHANUNAVAIL'```

Try replacing
exten => s,n,Dial(SIP/7782)
with
exten => s,n,Goto(from-did-direct,7782,1)
which I believe should execute the ‘normal’ code for the extension.

That didn’t work, but got me thinking, so I flipped the dial plan around back to the original setup of rg1 to go to rg2 and then looked at the logs. And winner winner was “exten => s,n,Goto(ext-group,7782,1)”

And then I tried it…

AND IT FRIGGIN WORKED! :grin: GV rang the number it has and the chat, which rang the pbx and then after 4 rings the other gv destination stopped ringing, and rg2 started. When I listened as the caller you don’t hear the DTMF1, and just a short back to back ring when rg1 goes to rg2 and the tone is played.

I owe you your favorite beverage Stewart1!

Congrats. One minor improvement, you can change your dialplan to this:

[custom-senddtmf1]
exten => s,1,noop(entering user defined context [custom-senddtmf1] in extensions_custom.conf)
exten => s,n,answer()
exten => s,n,senddtmf(1)
exten => s,n,Return

then in your custom destination, you can enable the ‘Return’ option, and select the desired destination in the GUI in the same way you do for everything else. Less thinking involved.

Love the tip and idea, TY! Easier for me to ‘dork’ with it later instead of always having to go edit the conf file. I tried it. But alas, the stars aren’t aligned… In the custom destination in the GUI I did change return to Yes and then selected ring group 2 in the destination.

[2018-04-18 16:11:07] VERBOSE[3033][C-00000000] pbx.c: Executing [778@ext-group:20] Goto("Motif/+11234567890-ffc6", "custom-senddtmf1,s,1") in new stack
[2018-04-18 16:11:07] VERBOSE[3033][C-00000000] pbx_builtins.c: Goto (custom-senddtmf1,s,1)
[2018-04-18 16:11:07] VERBOSE[3033][C-00000000] pbx.c: Executing [s@custom-senddtmf1:1] NoOp("Motif/+11234567890-ffc6", "entering user defined context [custom-senddtmf1] in extensions_custom.conf") in new stack
[2018-04-18 16:11:07] VERBOSE[3033][C-00000000] pbx.c: Executing [s@custom-senddtmf1:2] Answer("Motif/+11234567890-ffc6", "") in new stack
[2018-04-18 16:11:07] VERBOSE[3033][C-00000000] pbx.c: Executing [s@custom-senddtmf1:3] SendDTMF("Motif/+11234567890-ffc6", "1") in new stack
[2018-04-18 16:11:07] VERBOSE[3033][C-00000000] pbx.c: Executing [s@custom-senddtmf1:4] Return("Motif/+11234567890-ffc6", "") in new stack
[2018-04-18 16:11:07] ERROR[3033][C-00000000] app_stack.c: Return without Gosub: stack is empty
[2018-04-18 16:11:07] VERBOSE[3033][C-00000000] pbx.c: Spawn extension (custom-senddtmf1, s, 4) exited non-zero on 'Motif/+11234567890-ffc6'

I’ve got one more question too please while I’m getting this all dialed in. So a call is ringing, and is ringing on ring group 2. This is set to ring for 300 seconds. And there is only one extension in ring group’s 2 destination. I’m not at this extension, and I want to pick up the ringing call. Am I correctly understanding the settings under ring groups that if I change “Enable Call Pickup” to YES then per the setting’s descriptions I can just dial the ring group from another extension and get the call??

When enabled, this will allow calls to the Ring Group to be picked up with the directed call pickup feature using the group number. When not checked, individual extensions that are part of the group can still be picked up by doing a directed call pickup to the ringing extension, which works whether or not this is checked.

Cause well… I’ve tried turning this on, having a call actively ringing ring group 2 that rings one extension only, and from another extension called the ring group. And all it did was show another call ringing on that destination extension.

You need the directed call pickup prefix. With default settings, you’d dial **7782.

Sorry for the delay and thanks for the tip. Initially it wasn’t working. I was trying to get the Return working that lgaetz suggested but I couldn’t figure it and get it to work so I reverted to the code that forces it to the second ring group. Fixed that problem but I still couldn’t grab the call.

When I would dial ** plus the ring group I would get “No Dial Plan Rules Matched” on the phone, but after digging I couldn’t find any entry in the logs where the extension even attempted to make a call. More digging and I found that the phone was never making the call. I left the default dial plan rules on the phone from it’s factory settings. * plus numbers work, but not double *'s. I tried to fight with the dial plan but it just wasn’t working out. So I cheated and went in to Feature Codes and just changed the code for Directed Call Pickup to *7 (didn’t see anything else using that combo).

And…it worked. Not an elegant solution on my dtmf1 code…but it works. The feature code change works too and hopefully I didn’t break anything else…but again it works.

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