Re: [asterisk-users] Setting a threshold for asterisk to take ZAP line off hook ?
On 7/18/06, Mojo with Horan Company, LLC [EMAIL PROTECTED] wrote: I think when a PSTN line says 'Ring' it's simply for aesthetics... The line is 'answered' the instant * connects to it for two-way audio... (well not that instant but somewhere in the connection process. When you are hearing ringing from the PSTN through a zap card, the rings are coming from the phone company and are just sound. * doesn't decode that and act on it yet.) Maxim Vexler wrote: On 7/16/06, Martin Joseph [EMAIL PROTECTED] wrote: On Jul 16, 2006, at 11:36 AM, Maxim Vexler wrote: Hello list I'm trying to setup asterisk as an answering machine. How can I set asterisk to Answer() incoming call ONLY after specified count of ring cycles ? In the current situation I have the PBX connected to a home line, where POTS device are also connected on the same circuit. What I'm trying to do is allow a grace period where a POTS device could be picked up and those stop the ring indication on the line by this causing asterisk to not answer the call. In present situation even if the incoming phone call is taken off hook by a POST device asterisk still starts playing its incoming call IVR after the specified(where?) number of seconds. I don't think you can do that, since asterisk has no way to know when the shared PSTN line is answered by your analog phones... I don't think asterisk counts the rings, as much as it waits for answered status, which it is never going to see in your current configuration. I am a relative newb though, so maybe someone else here has a brilliant idea for you? ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users You have a point but no way am I going to accept that as an answer. Here's the log off such case : Jul 16 21:59:20 DEBUG[4387] chan_zap.c: Monitor doohicky got event Ring Begin on channel 1 Jul 16 21:59:21 DEBUG[4387] chan_zap.c: Monitor doohicky got event Ring/Answered on channel 1 Jul 16 21:59:21 DEBUG[4387] dsp.c: dsp busy pattern set to 0,0 Jul 16 21:59:21 VERBOSE[4411] logger.c: -- Starting simple switch on 'Zap/1-1' Jul 16 21:59:21 DEBUG[4373] devicestate.c: Changing state for Zap/1 - state 2 (In use) Jul 16 21:59:21 DEBUG[4412] app_queue.c: Device 'Zap/1' changed to state '2' (In use) Jul 16 21:59:29 WARNING[4411] chan_zap.c: CallerID returned with error on channel 'Zap/1-1' Jul 16 21:59:29 DEBUG[4411] pbx.c: Launching 'Answer' Jul 16 21:59:29 VERBOSE[4411] logger.c: -- Executing Answer(Zap/1-1, ) in new stack Jul 16 21:59:29 DEBUG[4411] chan_zap.c: Took Zap/1-1 off hook Jul 16 21:59:29 DEBUG[4411] chan_zap.c: Enabled echo cancellation on channel 1 Jul 16 21:59:29 DEBUG[4411] chan_zap.c: No echo training requested Jul 16 21:59:29 DEBUG[4411] pbx.c: Launching 'Set' As you can see, the first two events are event Ring and event Ring/Answered. What I need is the driver of chan_zap.c counting 5 event Ring before starting Ring/Answered. It can't be that hard (I think). Thank you for your answer. -- Mojo [EMAIL PROTECTED] Office Manger, Horan Company, LLC (907) 747- x112 ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users Well, I did managed to get it to work some how with the attached patch. My problems with this code are : a. It will destroy all active calls because I'm using zap_restart(). I really need to find a better way to destroy only the active channel instead of the whole zaptel stock. b. I don't know how this might be related, but since I've started to use this patch some calls simply won't get disconnected by asterisk after remote party hangup. Note that I'm using busydetect on this channel (It's x100p.com clone). Please note that when asterisk does not disconnect the call with busy detect, I'm seeing this in the full log (attached) the following : Jul 19 12:39:39 DEBUG[24397] channel.c: Scheduling timer at 160 sample intervals where as with normal calls this does not appear. This only occurs if I let asterisk Answer the call and instantly hangup my cell phone (which I'm using to test this). If on the other hand I listen to the IVR for a few seconds and then hangup my cell phone asterisk will take the channel On Hook using busydetect as expected. Meaning that I am able to reproduce this behaviour (bug?) by letting chan_zap take the call off hook followed by instant remote party (cell phone) hangup. diff -Naur asterisk-1.2.7.1.dfsg/channels/chan_zap.c asterisk-1.2.7.1.dfsg-anspatch/channels/chan_zap.c --- asterisk-1.2.7.1.dfsg/channels/chan_zap.c 2006-04-04 21:28:14.0 +0300 +++ asterisk-1.2.7.1.dfsg-anspatch/channels/chan_zap.c 2006-07-19
Re: [asterisk-users] Setting a threshold for asterisk to take ZAP line off hook ?
On Wed, Jul 19, 2006 at 12:55:56PM +0300, Maxim Vexler wrote: Well, I did managed to get it to work some how with the attached patch. My problems with this code are : Interesting... a. It will destroy all active calls because I'm using zap_restart(). The patch from http://bugs.digium.com/view.php?id=7256 add the function zap_destroy_channel_bynum from the implementation of 'zap destroy channel'. I really need to find a better way to destroy only the active channel instead of the whole zaptel stock. BTW: I also figure that two items from asterisk/include/reply_to_patch_writers.h are: * Please file new patches at the mantis. * New features have better chance at being observed when against trunk * http://www.digium.com/bugguidelines.html I'll look into the problem below later on... -- Tzafrir Cohen sip:[EMAIL PROTECTED] icq#16849755 iax:[EMAIL PROTECTED] +972-50-7952406 jabber:[EMAIL PROTECTED] [EMAIL PROTECTED] http://www.xorcom.com ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Setting a threshold for asterisk to take ZAP line off hook ?
On 7/19/06, Maxim Vexler [EMAIL PROTECTED] wrote: On 7/18/06, Mojo with Horan Company, LLC [EMAIL PROTECTED] wrote: I think when a PSTN line says 'Ring' it's simply for aesthetics... The line is 'answered' the instant * connects to it for two-way audio... (well not that instant but somewhere in the connection process. When you are hearing ringing from the PSTN through a zap card, the rings are coming from the phone company and are just sound. * doesn't decode that and act on it yet.) [snip] Well, I did managed to get it to work some how with the attached patch. My problems with this code are : [snip] Hmmm, I was obviously not aware of the true usage of the Wait() application in the dial plan. Setting Wait(X) before Answer() allowed provides the requested operation with out chan_zap restart. :) Thank you. -- Cheers, Maxim Vexler Free as in Freedom - Do u GNU ? ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Setting a threshold for asterisk to take ZAP line off hook ?
On Wed, Jul 19, 2006 at 07:21:20PM +0300, Maxim Vexler wrote: On 7/19/06, Maxim Vexler [EMAIL PROTECTED] wrote: On 7/18/06, Mojo with Horan Company, LLC [EMAIL PROTECTED] wrote: I think when a PSTN line says 'Ring' it's simply for aesthetics... The line is 'answered' the instant * connects to it for two-way audio... (well not that instant but somewhere in the connection process. When you are hearing ringing from the PSTN through a zap card, the rings are coming from the phone company and are just sound. * doesn't decode that and act on it yet.) [snip] Well, I did managed to get it to work some how with the attached patch. My problems with this code are : [snip] Hmmm, I was obviously not aware of the true usage of the Wait() application in the dial plan. Setting Wait(X) before Answer() allowed provides the requested operation with out chan_zap restart. Still, I wonder if it would be possible to make it possible to answer an analog line after a specific number of rings rather than a specified time. Easier o think that way. A WaitRings() application? -- Tzafrir Cohen sip:[EMAIL PROTECTED] icq#16849755 iax:[EMAIL PROTECTED] +972-50-7952406 jabber:[EMAIL PROTECTED] [EMAIL PROTECTED] http://www.xorcom.com ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Setting a threshold for asterisk to take ZAP line off hook ?
I think when a PSTN line says 'Ring' it's simply for aesthetics... The line is 'answered' the instant * connects to it for two-way audio... (well not that instant but somewhere in the connection process. When you are hearing ringing from the PSTN through a zap card, the rings are coming from the phone company and are just sound. * doesn't decode that and act on it yet.) Maxim Vexler wrote: On 7/16/06, Martin Joseph [EMAIL PROTECTED] wrote: On Jul 16, 2006, at 11:36 AM, Maxim Vexler wrote: Hello list I'm trying to setup asterisk as an answering machine. How can I set asterisk to Answer() incoming call ONLY after specified count of ring cycles ? In the current situation I have the PBX connected to a home line, where POTS device are also connected on the same circuit. What I'm trying to do is allow a grace period where a POTS device could be picked up and those stop the ring indication on the line by this causing asterisk to not answer the call. In present situation even if the incoming phone call is taken off hook by a POST device asterisk still starts playing its incoming call IVR after the specified(where?) number of seconds. I don't think you can do that, since asterisk has no way to know when the shared PSTN line is answered by your analog phones... I don't think asterisk counts the rings, as much as it waits for answered status, which it is never going to see in your current configuration. I am a relative newb though, so maybe someone else here has a brilliant idea for you? ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users You have a point but no way am I going to accept that as an answer. Here's the log off such case : Jul 16 21:59:20 DEBUG[4387] chan_zap.c: Monitor doohicky got event Ring Begin on channel 1 Jul 16 21:59:21 DEBUG[4387] chan_zap.c: Monitor doohicky got event Ring/Answered on channel 1 Jul 16 21:59:21 DEBUG[4387] dsp.c: dsp busy pattern set to 0,0 Jul 16 21:59:21 VERBOSE[4411] logger.c: -- Starting simple switch on 'Zap/1-1' Jul 16 21:59:21 DEBUG[4373] devicestate.c: Changing state for Zap/1 - state 2 (In use) Jul 16 21:59:21 DEBUG[4412] app_queue.c: Device 'Zap/1' changed to state '2' (In use) Jul 16 21:59:29 WARNING[4411] chan_zap.c: CallerID returned with error on channel 'Zap/1-1' Jul 16 21:59:29 DEBUG[4411] pbx.c: Launching 'Answer' Jul 16 21:59:29 VERBOSE[4411] logger.c: -- Executing Answer(Zap/1-1, ) in new stack Jul 16 21:59:29 DEBUG[4411] chan_zap.c: Took Zap/1-1 off hook Jul 16 21:59:29 DEBUG[4411] chan_zap.c: Enabled echo cancellation on channel 1 Jul 16 21:59:29 DEBUG[4411] chan_zap.c: No echo training requested Jul 16 21:59:29 DEBUG[4411] pbx.c: Launching 'Set' As you can see, the first two events are event Ring and event Ring/Answered. What I need is the driver of chan_zap.c counting 5 event Ring before starting Ring/Answered. It can't be that hard (I think). Thank you for your answer. -- Mojo [EMAIL PROTECTED] Office Manger, Horan Company, LLC (907) 747- x112 ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Setting a threshold for asterisk to take ZAP line off hook ?
Hello list I'm trying to setup asterisk as an answering machine. How can I set asterisk to Answer() incoming call ONLY after specified count of ring cycles ? In the current situation I have the PBX connected to a home line, where POTS device are also connected on the same circuit. What I'm trying to do is allow a grace period where a POTS device could be picked up and those stop the ring indication on the line by this causing asterisk to not answer the call. In present situation even if the incoming phone call is taken off hook by a POST device asterisk still starts playing its incoming call IVR after the specified(where?) number of seconds. Thank you. -- Cheers, Maxim Vexler Free as in Freedom - Do u GNU ? ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Setting a threshold for asterisk to take ZAP line off hook ?
On Jul 16, 2006, at 11:36 AM, Maxim Vexler wrote: Hello list I'm trying to setup asterisk as an answering machine. How can I set asterisk to Answer() incoming call ONLY after specified count of ring cycles ? In the current situation I have the PBX connected to a home line, where POTS device are also connected on the same circuit. What I'm trying to do is allow a grace period where a POTS device could be picked up and those stop the ring indication on the line by this causing asterisk to not answer the call. In present situation even if the incoming phone call is taken off hook by a POST device asterisk still starts playing its incoming call IVR after the specified(where?) number of seconds. I don't think you can do that, since asterisk has no way to know when the shared PSTN line is answered by your analog phones... I don't think asterisk counts the rings, as much as it waits for answered status, which it is never going to see in your current configuration. I am a relative newb though, so maybe someone else here has a brilliant idea for you? ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Setting a threshold for asterisk to take ZAP line off hook ?
On 7/16/06, Martin Joseph [EMAIL PROTECTED] wrote: On Jul 16, 2006, at 11:36 AM, Maxim Vexler wrote: Hello list I'm trying to setup asterisk as an answering machine. How can I set asterisk to Answer() incoming call ONLY after specified count of ring cycles ? In the current situation I have the PBX connected to a home line, where POTS device are also connected on the same circuit. What I'm trying to do is allow a grace period where a POTS device could be picked up and those stop the ring indication on the line by this causing asterisk to not answer the call. In present situation even if the incoming phone call is taken off hook by a POST device asterisk still starts playing its incoming call IVR after the specified(where?) number of seconds. I don't think you can do that, since asterisk has no way to know when the shared PSTN line is answered by your analog phones... I don't think asterisk counts the rings, as much as it waits for answered status, which it is never going to see in your current configuration. I am a relative newb though, so maybe someone else here has a brilliant idea for you? ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users You have a point but no way am I going to accept that as an answer. Here's the log off such case : Jul 16 21:59:20 DEBUG[4387] chan_zap.c: Monitor doohicky got event Ring Begin on channel 1 Jul 16 21:59:21 DEBUG[4387] chan_zap.c: Monitor doohicky got event Ring/Answered on channel 1 Jul 16 21:59:21 DEBUG[4387] dsp.c: dsp busy pattern set to 0,0 Jul 16 21:59:21 VERBOSE[4411] logger.c: -- Starting simple switch on 'Zap/1-1' Jul 16 21:59:21 DEBUG[4373] devicestate.c: Changing state for Zap/1 - state 2 (In use) Jul 16 21:59:21 DEBUG[4412] app_queue.c: Device 'Zap/1' changed to state '2' (In use) Jul 16 21:59:29 WARNING[4411] chan_zap.c: CallerID returned with error on channel 'Zap/1-1' Jul 16 21:59:29 DEBUG[4411] pbx.c: Launching 'Answer' Jul 16 21:59:29 VERBOSE[4411] logger.c: -- Executing Answer(Zap/1-1, ) in new stack Jul 16 21:59:29 DEBUG[4411] chan_zap.c: Took Zap/1-1 off hook Jul 16 21:59:29 DEBUG[4411] chan_zap.c: Enabled echo cancellation on channel 1 Jul 16 21:59:29 DEBUG[4411] chan_zap.c: No echo training requested Jul 16 21:59:29 DEBUG[4411] pbx.c: Launching 'Set' As you can see, the first two events are event Ring and event Ring/Answered. What I need is the driver of chan_zap.c counting 5 event Ring before starting Ring/Answered. It can't be that hard (I think). Thank you for your answer. -- Cheers, Maxim Vexler Free as in Freedom - Do u GNU ? ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users