[asterisk-dev] Originated Calls and Progress Detection

Dmitry Andrianov dimas at dataart.com
Mon Dec 10 07:46:03 CST 2007


> So the question seems to be where the best place is to attach a dsp process
> to determine what's going on during the call launch.. unless there is
> something else to try that I've missed.

First of all, I'm NOT sure that you really need to do anything with DSP. If I were you I would really focused on determining how to obtain status of the failed call and why it is not available (if it should be available according to the docs).

But if you really want to mess with DSP - take a look at sip_rtp_read of the chan_sip.c. At the end of this function you will see how each voice frame is passed through DSP in order to detect fax (and possibly DTMF). The DSP can do lots more detections (busy detection and call progress detection) but you will need to request these features from DSP when you are constructing it - look for ast_dsp_new references.

And of course chan_zap.c is the place where you can see how to use DSP for all these tricks.

Regards,
Dmitry Andrianov

-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Whit Thiele
Sent: Monday, December 10, 2007 3:04 AM
To: 'Asterisk Developers Mailing List'
Subject: Re: [asterisk-dev] Originated Calls and Progress Detection


Richard,

Thanks for the suggestion. The OriginateResponse event is generated
automatically.

I've also used the failed extension and tried to look at both DIALSTATUS and
HANGUPCAUSE variables, but they don't appear to get set properly either.
There was a similar thread on this strategy back in February, 2007 which had
a couple other dialplan suggestions (like looking at DIALSTATUS using the
'h' extension) None of these suggestions yielded any solutions.

On my test system, HANGUPCAUSE is always set to 16 and the OriginateResponse
reason is 0 for both a real No Answer and a Disconnected Number. Even the
CDR records show NO ANSWER for both calls.

This is why I'm trying to look into changing the code itself (hence the
posting on this list) for a solution.

So the question seems to be where the best place is to attach a dsp process
to determine what's going on during the call launch.. unless there is
something else to try that I've missed.







-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Richard Lyman
Sent: Sunday, December 09, 2007 10:18 PM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Originated Calls and Progress Detection

Whit Thiele wrote:
>
> I've seen callprogress in zapata.conf , but it seems to be
> used/applicable with analog Zap channels. What I am hoping to do is
> accomplish the same kind of feature on PRI and SIP lines where there
> the channel is never "Connected". The originated call fails but I'm
> trying to figure out how to determine why. For instance, how do you
> determine what was a No Answer (the call rings until it times out)
> versus a Disconnected Number (the other side plays a "Number not in
> service" message)
>
> The OriginateResponse Event is not giving the correct 'reason' code
> (Reason is always 0 )
>
> From what I see, it looks like dsp could be implemented somewhere in
> the __ast_request_and_dial method, but I'm not sure if this is the
> best place. Ideas anyone?
>
*snipped

using Async: true in your originate, you can do have a

exten => failed,1,Hangup

in the context for your originate.

it will then generate an

Event: OriginateResponse

that will contain a reason code (not pri causes, just base channel causes).

hope this helps.



_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list