What exactly do you want do to my friend. Does not make sense this [quote]exten=>h,1,Hangup()[/quote].
The h extension
The h is the standard “hang-up” extension. The h extension, if it is configured, is called when a caller hangs up the phone. Note that as soon as this happens, the content of ${EXTEN} changes to h.
Example
Say we want the global variable CONNECTIONS to reflect the number of currently active conversations at any given time. This means we need the value of CONNECTIONS to increase by one every time a connection is initiated and decrease by one every time someone hangs up. The following dialplan illustrates the basic idea:
If you call from you IP phone the extension h is executed. Right, perfect.
But when you use my example, calling from PSTN via FXO to my example, the file is recorded but the dialplan never execute the extension h after a hangup.
I’d agree with Ian. Of course, it is possible that your service provider doesn’t offer that facility.
Asterisk can detect calling party clearing on an analogue line either because the network temporarily removes the battery voltage, or, as a less preferred option, the network puts a tone on the line. If they do neither, or you don’t configure for the correct one, there is no way that Asterisk can tell the call has been cleared.
If they put a tone on the line, you should be able to hear this on the recording. I’m not sure what sorts of tone Asterisk can detect.
BT in the UK can use one or more of three methods, two as above, and one which Asterisk can’t detect, which is simply to make the line silent, See section 7.2 of sinet.bt.com/351v4p5.pdf