Extension to Nowhere

harrymrh
Posts: 18
Member Since:
2007-06-02

I am trying to use trixbox to monitor caller ids to prove that my staff have visited different locations at different times. I need to receive call without answering them, i then pick up the caller ids from the mysql logs.
My first attempt at an extension to nowhere is to use a custom extension that refers back to its self. A few of these in a ring group that hangs up after 10 seconds works fine and avoids pstn clashing. It strikes me as an ugly and somewhat stupid way of achieving the goal.

Custom extension 333: local/333

this creates a loop, which is exited when the ring group times out to hangup after 10 seconds.
Does anyone know of a better way to not answer multple incoming calls. I am aiming for a solution that has no theoretical limit to the number of calls it recieves.
The goal is to not answer the call, but let it ring unanswered (the calling party must not be charged, so the call can't be answered, but ringing must be heard) then hang up on the calling party after 10 seconds or so.
As a remote outside, can dtmf be caputred from unanswered calls? I have always assumed not, but best to check.



SkykingOH
Posts: 2522
Member Since:
2007-12-17
Custom Context

The best way to do this is not to answer the trunk, wait and then hangup. This little bit of code will take care of that.

[wait-hangup]
exten => s,1,Wait(10)
exten => s,n,Hangup()

If you place this at the end of extensions_custom.conf this creates a custom context called wait-hangup

What I am not sure about is if you want to use custom destination or custom context to be able to point to this properly within FreePBX.

If you don't know how I am sure somebody else will know.

Scott

--

Scott

aka "Skyking"



harrymrh
Posts: 18
Member Since:
2007-06-02
Update

Thank you skyking. I am afraid that I have tried that code already. It waits ten second then hangs up, but no ringing is generated. app-blackhole tackles this by answering then playing the sound of ringing. Not suitable for my needs. With a bit of browsing I found the Ringing() command.

[wait-hangup]
exten => s,1,Ringing()
exten => s,n,Wait(10)
exten => s,n,Hangup()

This seems to create ringing for the caller. I don't believe that it is entering a record in the mysql database cdr log. I am trying using this as the destination for all incoming calls from a did number. Using it as an extension in a ring group does not improves matters.
I am bringing the code in as a custom destination in free pbx.
How might the code be modified to put a log entry in the cdr database?



harrymrh
Posts: 18
Member Since:
2007-06-02
Only extensions are cdr logged

http://www.voip-info.org/wiki/view/Asterisk+billing says:

A CDR record will not be created if you use a .call file that calls an application instead of an extension. Workaround: Use an extension that then starts the desired application. See also: Bug report 240


I am now trying to create a custom extension that starts the code. Any help would be appreciated.

Harry



harrymrh
Posts: 18
Member Since:
2007-06-02
Application to custom extension

Using FreePBX
I set the code as a custom destination using code wait-hangup,s,1
I set the custom destination as a Misc Application with featurecode NNNNN
I then set a custom extension using the dial string Local/NNNNN@from-internal

Call waiting allows more than one cdr log to be generated per extension, but I don't know how many calls can wait for an extension at once. More than one custom extension can be created using the same dial string.
The wait in the code needs to be longer than the timeout for the extension or the ringing will timeout to an error tone (the playing of which may generate a call cost).

What is the best approach? One extension with call waiting? How many concurrent calls can call waiting handle? Or are many of these extensions in a ring group a better way to tackle the problem?



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.