Re: [asterisk-users] automatic call bridging when destination is available feature

2009-03-15 Thread Olivier
2009/3/14 Vieri rentor...@yahoo.com



 --- On Sat, 3/14/09, Olivier oza-4...@myamail.com wrote:

   If I understand correctly, you're suggesting to
  implement the h priority
   instructions (or a hangup macro) to:
  
   1) run a deadagi or a system() script to see if
  someone has left a request
   (eg. in astdb) to call-back-when-avail
  
   2) create a call file with, say:
   Channel: SIP/102
   and
   Context: internal
   Extension: 101
   Priority: 1
  
   Is that what you would do, more or less?
 
 
  yes, that's exactly what I meant.
  As I'm not too fluent in AEL scripting, I'm afraid
  I can't easily be more
  helpful but you eactly got what I suggested.
 
  What would think of that ?
  Would it fit for you ?

 Thanks for the feedback but there are some things that would not work
 right:

 1) when 102 hangs up, the call file would try to reach 101

yes but it can be done the other way if think 102 is very likely to be busy
...

but if 101 is busy, it may retry later (MaxRetries in call file)

You can also set MaxRetries to 0 and strictly rely on the fact that
extension 102 hangups  ...


 and finally reach it and send 101 to the context where it would then
 Dial(SIP/102). However, inthe meantime, 102 could have received or made
 another call and be busy again (and that would irritate the 101 user).


So ?
When Telcos implement this service they limit retries in a 30mn time frame
so that you're not called back at 2am, for intance.



 2) 102 may not necessarily be on the phone when 101 first tries to
 contact. The 102 extension could simply be
 off-line/Unavailable/unregistered, so the 102 user would never hang up
 (thus the hangup macro would never be executed).

 Anyway, I was hoping Asterisk already had a trick up its sleeve for this
 ;-) but I guess I'll have to implement a custom event listener and try to
 bridge extensions.

 Thanks,

 Vieri





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

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

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

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

[asterisk-users] automatic call bridging when destination is available feature

2009-03-14 Thread Vieri

Hi,

I'd like to implement the following:

Extension 101 calls 102 but 102 is busy and has no voicemail so 101 is sent to 
a custom IVR that says something like extension $EXTEN is $DIALSTATUS. Please 
try again later or dial $CODE now to notify you as soon as $EXTN is available..

So the notification part is what I'm trying to figure out.

The extensions are SIP (but not all have displays) and I would like to do more 
than just  a sendtext() when the hint of SIP/102 changes. Besides, the SIP 
protocol doesn't seem to allow me to query the real availability of an 
extension unless I invite it and ring it (OPTIONS doesn't tell me if DND is set 
on the client's side - especially on softphones).

So what I would prefer to do is a two-step call bridging of 102 (dst) with 101 
(src):

1) periodically check via events (until globally-set timeout) via 
hints/ExtensionState that both dst and src are available/not in use.

2) when 1) is true then originate two simultaneous calls to both dst and src 
(or maybe just one call to dst). Upon answered, the originated calls should say 
something like Automatic call bridging service: please wait while we connect 
$SRC to $DST. At this point extensions src and dst should be able to talk.

I was thinking of making a call file just for extension dst and send it to a 
context which Dial()'s extension src. It could happen that extension src 
suddenly switches to uanvailable or DND on the client's side or busy 
right when the context the dst extension is sent to (via call file) tries to 
Dial(SIP/src). In that case, if DIALSTATUS is anything but ANSWERED then the 
Automatic call bridging service would have to say to extension dst something 
like Sorry, failed to connect. Will try again later.

Anyway, instead of starting to implement my custom solution, I would like to 
know if such a service already exists or if someone could share their 
thoughts. I know that some legacy PBX already have this but I don't know how 
they call it. Usually, when a caller finds a busy destination, they can dial *6 
and the PBX will take care of bridging the two extensions as soon as both are 
free.

Can Asterisk already do this? Or is there a simple way of implementing it?

Thanks,

Vieri



  

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

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


Re: [asterisk-users] automatic call bridging when destination is available feature

2009-03-14 Thread Olivier
2009/3/14 Vieri rentor...@yahoo.com


 Hi,

 I'd like to implement the following:

 Extension 101 calls 102 but 102 is busy and has no voicemail so 101 is sent
 to a custom IVR that says something like extension $EXTEN is $DIALSTATUS.
 Please try again later or dial $CODE now to notify you as soon as $EXTN is
 available..

 So the notification part is what I'm trying to figure out.

 The extensions are SIP (but not all have displays) and I would like to do
 more than just  a sendtext() when the hint of SIP/102 changes. Besides, the
 SIP protocol doesn't seem to allow me to query the real availability of an
 extension


this is not always true as some SIP hardphones can be set to centralize DND
status on a server (with so-called Starcodes features) and in this case you
don't have to call the hardphone to query it's status,

you also can make use of SIPPEER(curcalls)




 unless I invite it and ring it (OPTIONS doesn't tell me if DND is set on
 the client's side - especially on softphones).


I don't know if DND is widely implemented in softphones as users might be
tempted to simply turn softphone off



 So what I would prefer to do is a two-step call bridging of 102 (dst) with
 101 (src):

 1) periodically check via events (until globally-set timeout) via
 hints/ExtensionState that both dst and src are available/not in use.


What would you say if before hanging up, extension 102 would just check if a
call-back-later request have been left (by extension 101 trough IVR) and
use call files to generate requested calls ?
This would avoid events handling.





 2) when 1) is true then originate two simultaneous calls to both dst and
 src (or maybe just one call to dst). Upon answered, the originated calls
 should say something like Automatic call bridging service: please wait
 while we connect $SRC to $DST. At this point extensions src and dst should
 be able to talk.

 I was thinking of making a call file just for extension dst and send it to
 a context which Dial()'s extension src. It could happen that extension src
 suddenly switches to uanvailable or DND on the client's side or busy
 right when the context the dst extension is sent to (via call file) tries to
 Dial(SIP/src). In that case, if DIALSTATUS is anything but ANSWERED then the
 Automatic call bridging service would have to say to extension dst
 something like Sorry, failed to connect. Will try again later.

 Anyway, instead of starting to implement my custom solution, I would like
 to know if such a service already exists or if someone could share their
 thoughts. I know that some legacy PBX already have this but I don't know how
 they call it. Usually, when a caller finds a busy destination, they can dial
 *6 and the PBX will take care of bridging the two extensions as soon as both
 are free.

 Can Asterisk already do this? Or is there a simple way of implementing it?


just a thought :

-



 Thanks,

 Vieri





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

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

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

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

Re: [asterisk-users] automatic call bridging when destination is available feature

2009-03-14 Thread Vieri


--- On Sat, 3/14/09, Olivier oza-4...@myamail.com wrote:

 you also can make use of SIPPEER(curcalls)

Thanks. Will come in handy.

 I don't know if DND is widely implemented in softphones
 as users might be
 tempted to simply turn softphone off

If my softphone users turned their software off it would be better because I 
would then detect that they are unavailable. However, most users find it a 
lot easier to just press the DND button on their softphone. There's no way I 
can easily detect that (the phone isn't open-source and I can't force them to 
use star codes to set DND in astdb).

 What would you say if before hanging up, extension 102
 would just check if a
 call-back-later request have been left (by
 extension 101 trough IVR) and
 use call files to generate requested calls ?
 This would avoid events handling.

If I understand correctly, you're suggesting to implement the h priority 
instructions (or a hangup macro) to:

1) run a deadagi or a system() script to see if someone has left a request (eg. 
in astdb) to call-back-when-avail

2) create a call file with, say:
Channel: SIP/102
and
Context: internal
Extension: 101
Priority: 1

Is that what you would do, more or less?

Thanks,

Vieri



  

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

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


Re: [asterisk-users] automatic call bridging when destination is available feature

2009-03-14 Thread Olivier
2009/3/14 Vieri rentor...@yahoo.com



 --- On Sat, 3/14/09, Olivier oza-4...@myamail.com wrote:

  you also can make use of SIPPEER(curcalls)

 Thanks. Will come in handy.

  I don't know if DND is widely implemented in softphones
  as users might be
  tempted to simply turn softphone off

 If my softphone users turned their software off it would be better
 because I would then detect that they are unavailable. However, most users
 find it a lot easier to just press the DND button on their softphone.
 There's no way I can easily detect that (the phone isn't open-source and I
 can't force them to use star codes to set DND in astdb).

  What would you say if before hanging up, extension 102
  would just check if a
  call-back-later request have been left (by
  extension 101 trough IVR) and
  use call files to generate requested calls ?
  This would avoid events handling.

 If I understand correctly, you're suggesting to implement the h priority
 instructions (or a hangup macro) to:

 1) run a deadagi or a system() script to see if someone has left a request
 (eg. in astdb) to call-back-when-avail

 2) create a call file with, say:
 Channel: SIP/102
 and
 Context: internal
 Extension: 101
 Priority: 1

 Is that what you would do, more or less?


yes, that's exactly what I meant.
As I'm not too fluent in AEL scripting, I'm afraid I can't easily be more
helpful but you eactly got what I suggested.

What would think of that ?
Would it fit for you ?




 Thanks,

 Vieri





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

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

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

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

Re: [asterisk-users] automatic call bridging when destination is available feature

2009-03-14 Thread Vieri


--- On Sat, 3/14/09, Olivier oza-4...@myamail.com wrote:

  If I understand correctly, you're suggesting to
 implement the h priority
  instructions (or a hangup macro) to:
 
  1) run a deadagi or a system() script to see if
 someone has left a request
  (eg. in astdb) to call-back-when-avail
 
  2) create a call file with, say:
  Channel: SIP/102
  and
  Context: internal
  Extension: 101
  Priority: 1
 
  Is that what you would do, more or less?
 
 
 yes, that's exactly what I meant.
 As I'm not too fluent in AEL scripting, I'm afraid
 I can't easily be more
 helpful but you eactly got what I suggested.
 
 What would think of that ?
 Would it fit for you ?

Thanks for the feedback but there are some things that would not work right:

1) when 102 hangs up, the call file would try to reach 101 but if 101 is busy, 
it may retry later (MaxRetries in call file) and finally reach it and send 101 
to the context where it would then Dial(SIP/102). However, inthe meantime, 102 
could have received or made another call and be busy again (and that would 
irritate the 101 user).

2) 102 may not necessarily be on the phone when 101 first tries to contact. 
The 102 extension could simply be off-line/Unavailable/unregistered, so the 102 
user would never hang up (thus the hangup macro would never be executed).

Anyway, I was hoping Asterisk already had a trick up its sleeve for this ;-) 
but I guess I'll have to implement a custom event listener and try to bridge 
extensions.

Thanks,

Vieri



  

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

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


Re: [asterisk-users] automatic call bridging when destination is available feature

2009-03-14 Thread Paul Hales

  I can't force them to use star codes to set DND in astdb).

   


Once again, someone who underestimates the power of physical violence.

PaulH


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

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