Need to pick analog trunk and go off-hook (2nd dialtone)

I need to be able to press a line button on a Grandstream GXP2100 and go off-hook on a specific FXO/trunk port # to hear the “true” central office dialtone (not PBX-simulated).

The reason is I have a door entry system that listens in on this shared FXO line for DTMF touch tones for various control features.

I believe I need 2 things:

  1. Configure FreePBX somehow to choose a specific FXO line # when some special dial string is initiated by a phone - let’s say *1234
  2. Configure a GXP2100 button to dial *1234, which then sends that to FreePBX. FreePBX sees this in dialplan (are * allowed in dialplans?) and then grabs FXO line and the GXP2100 goes off hook.

Can someone help me on how to do this? I’ve never done “second dialtone” before and Googling was a fruitless search. :frowning:

You can’t do it the way you want. The line key has no relation to the lines on the GXP1200.

This has been covered many times in forum.

My suggestion is to get a SIP door phone and call it a day. If you search the forums for sending DTMF in channel you will find some creative hacks.

Create an outbound route with a dial pattern of 999| and direct to the desired dahdi channel. Dialing 999 will then give you the second dial tone you want. This will work with David, but it won’t work over sip to an Ara device, unless you can config the data specifically to do it.

David = dahdi
Ara = ata
Data = ata
*amn autocorrect and *amn no edit

Thanks for the autocorrect translation lgaetz! :slight_smile: Pretty funny.

I think adding 999| to outbound route to the specific analog / dahdi channel should do the trick. I actually was headed down the same path, but I think I misconfigured the GXP2100’s dialplan as well as FreePBX’s dialplan.

Will have to try what you suggested.

Thanks!

Shoot. Two steps forward, one step back. I was able to get 2nd dialtone by adding 999| into a dialplan that goes out DAHDI channel 8. I hear dialtone, but pressing touchtones on the GXP2200 has no effect. I tried changing GXP2200 from its DTMF default RFC2833 to “In audio” and then to “SIP info” but touch tones don’t seem to be transmitting. I see nothing in in the asterisk -r console.

Further, after 6s of dialtone, the PBX hangs up. Why is that? Does the PBX or the Sangoma hardware consider analog dialtone a “hangup”? I only need like 2s to press “*79” anyway, so not too concerned about the fast hang-up, but I do need to be able to transmit DTMF touch tones.

Here’s my debug/trace: Appreciate any help:

== Using SIP VIDEO TOS bits 136
== Using SIP VIDEO CoS mark 6
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/155-00000044”, “user-callerid,SKIPTTL,”) in new stack
– Executing [[email protected]:1] Set(“SIP/155-00000044”, “AMPUSER=155”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/155-00000044”, “0?report”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/155-00000044”, “1?Set(REALCALLERIDNUM=155)”) in new stack
– Executing [[email protected]:4] Set(“SIP/155-00000044”, “AMPUSER=155”) in new stack
– Executing [[email protected]:5] Set(“SIP/155-00000044”, “AMPUSERCIDNAME=Tom GXP2200”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/155-00000044”, “0?report”) in new stack
– Executing [[email protected]:7] Set(“SIP/155-00000044”, “AMPUSERCID=155”) in new stack
– Executing [[email protected]:8] Set(“SIP/155-00000044”, “CALLERID(all)=“Tom GXP2200” <155>”) in new stack
– Executing [[email protected]:9] ExecIf(“SIP/155-00000044”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:10] GotoIf(“SIP/155-00000044”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [[email protected]:19] Set(“SIP/155-00000044”, “CALLERID(number)=155”) in new stack
– Executing [[email protected]:20] Set(“SIP/155-00000044”, “CALLERID(name)=Tom GXP2200”) in new stack
– Executing [[email protected]:21] NoOp(“SIP/155-00000044”, “Using CallerID “Tom GXP2200” <155>”) in new stack
– Executing [[email protected]:2] NoOp(“SIP/155-00000044”, “Calling Out Route: DoorKingOut”) in new stack
– Executing [[email protected]:3] Set(“SIP/155-00000044”, “MOHCLASS=default”) in new stack
– Executing [[email protected]:4] Set(“SIP/155-00000044”, “_NODEST=”) in new stack
– Executing [[email protected]:5] Macro(“SIP/155-00000044”, “record-enable,155,OUT,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/155-00000044”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] ExecIf(“SIP/155-00000044”, “0?MacroExit()”) in new stack
– Executing [[email protected]:5] GotoIf(“SIP/155-00000044”, “0?Group:OUT”) in new stack
– Goto (macro-record-enable,s,15)
– Executing [[email protected]:15] GotoIf(“SIP/155-00000044”, “0?IN”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/155-00000044”, “1?MacroExit()”) in new stack
– Executing [[email protected]:6] Macro(“SIP/155-00000044”, “dialout-trunk,2,”) in new stack
– Executing [[email protected]:1] Set(“SIP/155-00000044”, “DIAL_TRUNK=2”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/155-00000044”, “0?sub-pincheck,s,1”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/155-00000044”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/155-00000044”, “DIAL_NUMBER=”) in new stack
– Executing [[email protected]:5] Set(“SIP/155-00000044”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [[email protected]:6] Set(“SIP/155-00000044”, “OUTBOUND_GROUP=OUT_2”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/155-00000044”, “0?nomax”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/155-00000044”, “0?chanfull”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/155-00000044”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/155-00000044”, “DIAL_TRUNK_OPTIONS=wW”) in new stack
– Executing [[email protected]:11] Macro(“SIP/155-00000044”, “outbound-callerid,2”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/155-00000044”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/155-00000044”, “0?Set(REALCALLERIDNUM=155)”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/155-00000044”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [[email protected]:6] Set(“SIP/155-00000044”, “USEROUTCID=”) in new stack
– Executing [[email protected]:7] Set(“SIP/155-00000044”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/155-00000044”, “TRUNKOUTCID=914-937-1880”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/155-00000044”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [[email protected]:12] ExecIf(“SIP/155-00000044”, “1?Set(CALLERID(all)=914-937-1880)”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/155-00000044”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/155-00000044”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/155-00000044”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [[email protected]:12] GosubIf(“SIP/155-00000044”, “0?sub-flp-2,s,1”) in new stack
– Executing [[email protected]:13] Set(“SIP/155-00000044”, “OUTNUM=”) in new stack
– Executing [[email protected]:14] Set(“SIP/155-00000044”, “custom=DAHDI/8”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/155-00000044”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)wW)”) in new stack
– Executing [[email protected]:16] Macro(“SIP/155-00000044”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“SIP/155-00000044”, “”) in new stack
– Executing [[email protected]:17] GotoIf(“SIP/155-00000044”, “0?bypass,1”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/155-00000044”, “0?customtrunk”) in new stack
– Executing [[email protected]:19] Dial(“SIP/155-00000044”, “DAHDI/8/,300,wW”) in new stack
– Called DAHDI/8/
– DAHDI/8-1 answered SIP/155-00000044
pbxCLI>
pbx
CLI>
pbxCLI>
pbx
CLI> Note After 6s (touch tones don’t work on GXP2200) the PBX hangs up the call as follows:
– Executing [[email protected]:1] Macro(“SIP/155-00000044”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/155-00000044”, “1?endmixmoncheck”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] NoOp(“SIP/155-00000044”, “End of MIXMON check”) in new stack
– Executing [[email protected]:10] GotoIf(“SIP/155-00000044”, “1?nomeetmemon”) in new stack
– Goto (macro-hangupcall,s,28)
– Executing [[email protected]:28] NoOp(“SIP/155-00000044”, “End of MEETME check”) in new stack
– Executing [[email protected]:29] GotoIf(“SIP/155-00000044”, “1?noautomon”) in new stack
– Goto (macro-hangupcall,s,34)
– Executing [[email protected]:34] NoOp(“SIP/155-00000044”, “TOUCH_MONITOR_OUTPUT=”) in new stack
– Executing [[email protected]:35] GotoIf(“SIP/155-00000044”, “1?noautomon2”) in new stack
– Goto (macro-hangupcall,s,41)
– Executing [[email protected]:41] NoOp(“SIP/155-00000044”, “MONITOR_FILENAME=”) in new stack
– Executing [[email protected]:42] GotoIf(“SIP/155-00000044”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,45)
– Executing [[email protected]:45] GotoIf(“SIP/155-00000044”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,48)
– Executing [[email protected]:48] GotoIf(“SIP/155-00000044”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,50)
– Executing [[email protected]:50] AGI(“SIP/155-00000044”, “hangup.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
– <SIP/155-00000044>AGI Script hangup.agi completed, returning 0
– Executing [[email protected]:51] Hangup(“SIP/155-00000044”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 51) exited non-zero on ‘SIP/155-00000044’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/155-00000044’
– Hanging up on ‘DAHDI/8-1’
– Hungup ‘DAHDI/8-1’
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on ‘SIP/155-00000044’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 999, 6) exited non-zero on 'SIP/155-00000044’
pbx*CLI>

Fixed it out. Just to close the loop on this thread. The issue was externip in the FreePBX was pointing to my test lab external IP and not the client’s IP where I had recently moved the system to. Essentially a RTP audio issue. Thus, the DTMF digits weren’t getting through the firewall. Tried to be efficient by testing remotely and caused more headaches / time spend for myself!

But all’s well that end’s well.

Thanks for the help!