Hi. I'm a new user of Asterisk. My question is: I want to log outbound calls in a database ( postgres ). Everything is OK except that asterisk always marks calls to my FXO iface ( Zap/4 ) as answered as soon as it accepts to dial the specified number and the purpose of logging calls is to know the actual number of connections made ( those are the ones telco bills me ). I want a method or trick to make asterisk to behave in regard to a FXO like a modem would do, i.e. reporting line conditions ( BUSY, ANSWER, etc ) as its status. Currently, the relevant part of my dialplan is: exten => _99.,1,Dial(Zap/4/${EXTEN:2},20) In a related issue, my Zap/4 iface delays answering about 4 secs. When I first installed asterins, answering would be instantaneous, but after some change ( kernel? compile options? not sure ) it won't answer until after 4 or 5 secs. Could it be related to the main problem? Thanks in advance
I think that delay in answering is due to caller ID detection. I have no idea about rest of your question :) regards, Umair On 11/18/05, grr@alastor.com.mx <grr@alastor.com.mx> wrote:> > Hi. I'm a new user of Asterisk. My question is: > I want to log outbound calls in a database ( postgres ). Everything is OK > except that asterisk always marks calls to my FXO iface ( Zap/4 ) as > answered as soon as it accepts to dial the specified number and the > purpose of logging calls is to know the actual number of connections made > ( those are the ones telco bills me ). I want a method or trick to make > asterisk to behave in regard to a FXO like a modem would do, i.e. > reporting line conditions ( BUSY, ANSWER, etc ) as its status. Currently, > the relevant part of my dialplan is: > > exten => _99.,1,Dial(Zap/4/${EXTEN:2},20) > > In a related issue, my Zap/4 iface delays answering about 4 secs. When I > first installed asterins, answering would be instantaneous, but after some > change ( kernel? compile options? not sure ) it won't answer until after 4 > or 5 secs. Could it be related to the main problem? > > Thanks in advance > > > > > _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com <http://Easynews.com>-- > > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051119/fdd85ce2/attachment.htm
On Sat, 2005-11-19 at 00:07 -0600, grr@alastor.com.mx wrote:> Hi. I'm a new user of Asterisk. My question is: > I want to log outbound calls in a database ( postgres ). Everything is OK > except that asterisk always marks calls to my FXO iface ( Zap/4 ) as > answered as soon as it accepts to dial the specified number and the > purpose of logging calls is to know the actual number of connections made > ( those are the ones telco bills me ). I want a method or trick to make > asterisk to behave in regard to a FXO like a modem would do, i.e. > reporting line conditions ( BUSY, ANSWER, etc ) as its status. Currently, > the relevant part of my dialplan is: > > exten => _99.,1,Dial(Zap/4/${EXTEN:2},20)see the zapata.conf for callprogress=yes However, this is unreliable, and could provide incorrect results. For accurate information you will need to get a BRI or PRI and related interface card. These provide the information Out Of Band, and as such are accurate.> In a related issue, my Zap/4 iface delays answering about 4 secs. When I > first installed asterins, answering would be instantaneous, but after some > change ( kernel? compile options? not sure ) it won't answer until after 4 > or 5 secs. Could it be related to the main problem?callerid=no will solve that, but then you won't get callerid :) Possibly, your line doesn't supply callerid anyway, or you don't care, so then that is a good solution. Regards, Adam
Adam Goryachev wrote:> see the zapata.conf for callprogress=yes > However, this is unreliable, and could provide incorrect results. For > accurate information you will need to get a BRI or PRI and related > interface card. These provide the information Out Of Band, and as such > are accurate.I've already tried it and the results were awful. Every call was terminated in the middle of it. My big question is how a modem can detect such states with 100% accuracy and asterisk can't. Is there a basic problem or difference that cannot be solved?> callerid=no will solve that, but then you won't get callerid :) > Possibly, your line doesn't supply callerid anyway, or you don't care, > so then that is a good solution.I wasn't clear enough. It seems that if you something like exten => _99.,n,Dial(Zap/4/${EXTEN:2}) Asterisk considers that Zap/4 ( an FXO device ) is answering Dial() first and then dialling the outside number. That first answering is what I mean. I realize now that there is CID transfer between the calling extension and Zap/4 but why does it takes so long? And yes, I do need CID. As I said, asterisk 1.0.7 ( I think it was that version I tried first ) with Linux 2.4.2x didn't have such behavior: dialling the FXO iface would get an immedate dialtone or the outside number dialed right away. My greatest surprise is there seems to be a very small amount of people connecting telco lines to internal extensions via Asterisk. The whole point of trying to get accurate info about call state is to be able to do thing like outside call accounting and billing distribution on simple PSTN lines via common Digium TDM400 cards. Any work on this or trick to do the job? Thanks in advance