Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Ring back when free?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
tony at softins.clara....
Guest





PostPosted: Fri Apr 04, 2008 5:35 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

Has anyone here implemented "Ring back when free" in Asterisk?

The way it works in the UK is as follows:

1. A calls B. B is engaged (busy).
2. A hears "The number you called is busy. To use ringback, press 5"
3. A presses 5, and hears "Your ringback request has been accepted".
4. A hangs up.
5. Later, B hangs up. The system then calls A (if A is now busy, it
waits until A is clear again).
6. If/when A answers, the system calls B on A's behalf and A hears ringing.

Any implementation has to cater for the fact that when B is busy, he
could be either the calling or the called party on his current call.
If he is the calling party, he will execute 'h' when he clears, but
if he is the called party, he won't be in the dialplan to execute 'h',
so we need some other way to invoke the ringback (step 5).

Thoughts?

Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
Back to top
faraz.khan at emergen.biz
Guest





PostPosted: Fri Apr 04, 2008 5:57 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

Thinking out loud: write a asterisk call file (when the calling user
presses 5) which keeps on trying to connect the two.
On Fri, 2008-04-04 at 10:35 +0000, Tony Mountifield wrote:
Quote:
Has anyone here implemented "Ring back when free" in Asterisk?

The way it works in the UK is as follows:

1. A calls B. B is engaged (busy).
2. A hears "The number you called is busy. To use ringback, press 5"
3. A presses 5, and hears "Your ringback request has been accepted".
4. A hangs up.
5. Later, B hangs up. The system then calls A (if A is now busy, it
waits until A is clear again).
6. If/when A answers, the system calls B on A's behalf and A hears ringing.

Any implementation has to cater for the fact that when B is busy, he
could be either the calling or the called party on his current call.
If he is the calling party, he will execute 'h' when he clears, but
if he is the called party, he won't be in the dialplan to execute 'h',
so we need some other way to invoke the ringback (step 5).

Thoughts?

Cheers
Tony
--
Faraz R Khan
Chief Architect
Emergen Consulting Pvt Ltd
+92.21.111.111.320 x200
www.emergen.biz
Back to top
michiel at vanbaak.info
Guest





PostPosted: Fri Apr 04, 2008 6:07 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

On 10:35, Fri 04 Apr 08, Tony Mountifield wrote:
Quote:
Has anyone here implemented "Ring back when free" in Asterisk?

The way it works in the UK is as follows:

1. A calls B. B is engaged (busy).
2. A hears "The number you called is busy. To use ringback, press 5"
3. A presses 5, and hears "Your ringback request has been accepted".
4. A hangs up.
5. Later, B hangs up. The system then calls A (if A is now busy, it
waits until A is clear again).
6. If/when A answers, the system calls B on A's behalf and A hears ringing.

Any implementation has to cater for the fact that when B is busy, he
could be either the calling or the called party on his current call.
If he is the calling party, he will execute 'h' when he clears, but
if he is the called party, he won't be in the dialplan to execute 'h',
so we need some other way to invoke the ringback (step 5).

Thoughts?

Have a look at this:
http://bugs.digium.com/view.php?id=10689

--

Michiel van Baak
michiel at vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD

"Why is it drug addicts and computer aficionados are both called users?"
Back to top
Dean at cognation.net
Guest





PostPosted: Fri Apr 04, 2008 6:30 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

Hey Tony, in the pbx space that feature is called "camp on"

I have no idea why - just thought I'd let you know.



Regards,

Dean Collins
Cognation Pty Ltd
dean at cognation.net
+1-212-203-4357
+61-2-9016-5642 (Sydney in-dial).

Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
bounces at lists.digium.com] On Behalf Of Tony Mountifield
Sent: Friday, 4 April 2008 6:35 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] Ring back when free?

Has anyone here implemented "Ring back when free" in Asterisk?

The way it works in the UK is as follows:

1. A calls B. B is engaged (busy).
2. A hears "The number you called is busy. To use ringback, press 5"
3. A presses 5, and hears "Your ringback request has been accepted".
4. A hangs up.
5. Later, B hangs up. The system then calls A (if A is now busy, it
waits until A is clear again).
6. If/when A answers, the system calls B on A's behalf and A hears
ringing.
Quote:

Any implementation has to cater for the fact that when B is busy, he
could be either the calling or the called party on his current call.
If he is the calling party, he will execute 'h' when he clears, but
if he is the called party, he won't be in the dialplan to execute 'h',
so we need some other way to invoke the ringback (step 5).

Thoughts?

Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org

_______________________________________________
-- 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
Back to top
eric at fnords.org
Guest





PostPosted: Fri Apr 04, 2008 8:01 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

"core show application retrydial"

You need to do a "core show applications" and look at what apps are
included with Asterisk.

Tony Mountifield wrote:
Quote:
Has anyone here implemented "Ring back when free" in Asterisk?

The way it works in the UK is as follows:

1. A calls B. B is engaged (busy).
2. A hears "The number you called is busy. To use ringback, press 5"
3. A presses 5, and hears "Your ringback request has been accepted".
4. A hangs up.
5. Later, B hangs up. The system then calls A (if A is now busy, it
waits until A is clear again).
6. If/when A answers, the system calls B on A's behalf and A hears ringing.

Any implementation has to cater for the fact that when B is busy, he
could be either the calling or the called party on his current call.
If he is the calling party, he will execute 'h' when he clears, but
if he is the called party, he won't be in the dialplan to execute 'h',
so we need some other way to invoke the ringback (step 5).

Thoughts?

Cheers
Tony

--
Consulting for Asterisk, Polycom, Sangoma, Digium, Cisco, LAN, WAN, QoS,
T-1, PRI, Frame Relay, Linux, and network design. Based near
Birmingham, AL. Now accepting clients worldwide.
Back to top
tony at softins.clara....
Guest





PostPosted: Fri Apr 04, 2008 8:03 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

In article <1207306647.18787.24.camel at faraz-desktop>,
Faraz R. Khan <faraz.khan at emergen.biz> wrote:
Quote:
Thinking out loud: write a asterisk call file (when the calling user
presses 5) which keeps on trying to connect the two.

I thought about that, but the trouble is, it's not event-driven. It just
keeps on trying until it runs out of retries.

Cheers
Tony

Quote:
On Fri, 2008-04-04 at 10:35 +0000, Tony Mountifield wrote:
Quote:
Has anyone here implemented "Ring back when free" in Asterisk?

The way it works in the UK is as follows:

1. A calls B. B is engaged (busy).
2. A hears "The number you called is busy. To use ringback, press 5"
3. A presses 5, and hears "Your ringback request has been accepted".
4. A hangs up.
5. Later, B hangs up. The system then calls A (if A is now busy, it
waits until A is clear again).
6. If/when A answers, the system calls B on A's behalf and A hears ringing.

Any implementation has to cater for the fact that when B is busy, he
could be either the calling or the called party on his current call.
If he is the calling party, he will execute 'h' when he clears, but
if he is the called party, he won't be in the dialplan to execute 'h',
so we need some other way to invoke the ringback (step 5).

Thoughts?

Cheers
Tony
--
Faraz R Khan
Chief Architect
Emergen Consulting Pvt Ltd
+92.21.111.111.320 x200
www.emergen.biz


_______________________________________________
-- 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

--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
Back to top
tony at softins.clara....
Guest





PostPosted: Fri Apr 04, 2008 8:04 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

In article <20080404110737.GB20322 at vanbaak.info>,
Michiel van Baak <michiel at vanbaak.info> wrote:
Quote:
On 10:35, Fri 04 Apr 08, Tony Mountifield wrote:
Quote:
Has anyone here implemented "Ring back when free" in Asterisk?

The way it works in the UK is as follows:

1. A calls B. B is engaged (busy).
2. A hears "The number you called is busy. To use ringback, press 5"
3. A presses 5, and hears "Your ringback request has been accepted".
4. A hangs up.
5. Later, B hangs up. The system then calls A (if A is now busy, it
waits until A is clear again).
6. If/when A answers, the system calls B on A's behalf and A hears ringing.

Any implementation has to cater for the fact that when B is busy, he
could be either the calling or the called party on his current call.
If he is the calling party, he will execute 'h' when he clears, but
if he is the called party, he won't be in the dialplan to execute 'h',
so we need some other way to invoke the ringback (step 5).

Thoughts?

Have a look at this:
http://bugs.digium.com/view.php?id=10689

Thanks - looks interesting. However, I will need to implement this on
version 1.4 for now.

Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
Back to top
tony at softins.clara....
Guest





PostPosted: Fri Apr 04, 2008 8:08 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

In article <3685A8FD247FA94C957C4304AB386A04073E6C at cognationsvr1.Cognation.local>,
Dean Collins <Dean at cognation.net> wrote:
Quote:
Hey Tony, in the pbx space that feature is called "camp on"

I have no idea why - just thought I'd let you know.

Thanks Dean - I've heard the term "camp on", but it's seldom used in the UK,
and I thought it meant something more like Call Waiting than Ringback When Free.

Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
Back to top
tony at softins.clara....
Guest





PostPosted: Fri Apr 04, 2008 8:13 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

In article <47F626BF.7090706 at fnords.org>, Eric Wieling <eric at fnords.org> wrote:
Quote:
"core show application retrydial"

But that doesn't allow the caller to hang up and get called back. It just
retries while he waits on the line.

Quote:
You need to do a "core show applications" and look at what apps are
included with Asterisk.

I do, frequently!

Cheers
Tony

Quote:
Tony Mountifield wrote:
Quote:
Has anyone here implemented "Ring back when free" in Asterisk?

The way it works in the UK is as follows:

1. A calls B. B is engaged (busy).
2. A hears "The number you called is busy. To use ringback, press 5"
3. A presses 5, and hears "Your ringback request has been accepted".
4. A hangs up.
5. Later, B hangs up. The system then calls A (if A is now busy, it
waits until A is clear again).
6. If/when A answers, the system calls B on A's behalf and A hears ringing.

Any implementation has to cater for the fact that when B is busy, he
could be either the calling or the called party on his current call.
If he is the calling party, he will execute 'h' when he clears, but
if he is the called party, he won't be in the dialplan to execute 'h',
so we need some other way to invoke the ringback (step 5).

Thoughts?

Cheers
Tony

--
Consulting for Asterisk, Polycom, Sangoma, Digium, Cisco, LAN, WAN, QoS,
T-1, PRI, Frame Relay, Linux, and network design. Based near
Birmingham, AL. Now accepting clients worldwide.

_______________________________________________
-- 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

--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
Back to top
faraz.khan at emergen.biz
Guest





PostPosted: Fri Apr 04, 2008 8:38 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

Trouble with making it event driven (through the 'h' extension) is as
follows:
Imagine the user simply has his phone OFF hook (analog phone or an ip
phone like the grandstream which would report BUSY if cradle is
lifted).

Placing this cradle back generates NO sip events, the phone simply
becomes 'free'. Other than this scenario using the 'h' extension to read
off a DB (which gets populated on pressing 5) should work just fine.


On Fri, 2008-04-04 at 13:03 +0000, Tony Mountifield wrote:
Quote:
In article <1207306647.18787.24.camel at faraz-desktop>,
Faraz R. Khan <faraz.khan at emergen.biz> wrote:
Quote:
Thinking out loud: write a asterisk call file (when the calling user
presses 5) which keeps on trying to connect the two.

I thought about that, but the trouble is, it's not event-driven. It just
keeps on trying until it runs out of retries.

Cheers
Tony

Quote:
On Fri, 2008-04-04 at 10:35 +0000, Tony Mountifield wrote:
Quote:
Has anyone here implemented "Ring back when free" in Asterisk?

The way it works in the UK is as follows:

1. A calls B. B is engaged (busy).
2. A hears "The number you called is busy. To use ringback, press 5"
3. A presses 5, and hears "Your ringback request has been accepted".
4. A hangs up.
5. Later, B hangs up. The system then calls A (if A is now busy, it
waits until A is clear again).
6. If/when A answers, the system calls B on A's behalf and A hears ringing.

Any implementation has to cater for the fact that when B is busy, he
could be either the calling or the called party on his current call.
If he is the calling party, he will execute 'h' when he clears, but
if he is the called party, he won't be in the dialplan to execute 'h',
so we need some other way to invoke the ringback (step 5).

Thoughts?

Cheers
Tony
--
Faraz R Khan
Chief Architect
Emergen Consulting Pvt Ltd
+92.21.111.111.320 x200
www.emergen.biz


_______________________________________________
-- 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



--
Faraz R Khan
Chief Architect
Emergen Consulting Pvt Ltd
+92.21.111.111.320 x200
www.emergen.biz
Back to top
kwem at gmx.de
Guest





PostPosted: Sat Apr 05, 2008 12:14 pm    Post subject: [asterisk-users] Ring back when free? Reply with quote

Hi,

Am Freitag, den 04.04.2008, 13:03 +0000 schrieb Tony Mountifield:
Quote:
In article <1207306647.18787.24.camel at faraz-desktop>,
Faraz R. Khan <faraz.khan at emergen.biz> wrote:
Quote:
Thinking out loud: write a asterisk call file (when the calling user
presses 5) which keeps on trying to connect the two.

I thought about that, but the trouble is, it's not event-driven. It just
keeps on trying until it runs out of retries.

We realized someting like that with a call file.
If a caller presses 5 store this as an open callback in a database.
Place a script in the h-extension and call it with the
DeadAGI-Application. This script looks up any pending callbacks for both
parties of the closed connection and generates the call files.

Regards,
Karsten
Back to top
YEHAVI at VMS.HUJI.AC.IL
Guest





PostPosted: Sun Apr 06, 2008 2:02 am    Post subject: [asterisk-users] Ring back when free? Reply with quote

Quote:
Has anyone here implemented "Ring back when free" in Asterisk?

Here is what I do; the dialplan enclosed is in AEL2 format, but you can get the
idea.

When a call is originated I save the called and callee numbers in a database.
If the user gets busy he/she hangs up and dial *41. I then retreive the last
number they dialled and place a flag in the database that someone is camping on
it. The H extension checks this flag and if found generates a .call file.

First, I have a macro to save the for each extension who is the last they
called and the last who called them:

// Save the calling and called numbers in To and From and in the database so
// they can be used by *41 and *42. This way the h extension can acecss this
// database for all destinations.
macro Save_From_to ( ) {
// To and From are used in the dialplan, since we might change ${EXTEN}
Set(_To=${MACRO_EXTEN});
Set(_From=${CALLERID(num)});
NoOp("===== ${From} -> ${To});
// Save them in database for later use.
// Save the caller number at the called extension for *42 usage.
Set(DB(${To}/LastCaller)=${From});
// Where we called for *41
Set(DB(${From}/LastCalled)=${To});
};
This macro is called at the beginning of the "normal" dialplan.

Now, the *41 which registers the "camp-on" using the data saved above:
// *41: Camp on the last extension dialled
*41 => {
Set(tmp=${DB(${CALLERID(num)}/LastCalled)});
// Save it so when the other side hangs it will see it and dial us.
Set(DB(${tmp}/CallBack)=${CALLERID(num)});
// Say the number to caller so he can verify...
SayDigits(${tmp});
Hangup();
};

And now the H extension for handling it:

// The Hangup extension which is called when the call is hanged. See whether
// we have some waiting callback waiting on this extension.
h => {
ResetCDR(w); // To make the CDR correct.
NoOp(${From});

// We have to check the two sides of the call: Those who camp on the calling
and
// those who camp on the called.
Set(tmp=${DB(${From}/CallBack)}); // The calling.
if("${tmp}" != "") { // Something is there.
DBdel(${From}/CallBack); // And delete it...
// Create the callfile and then move it to the spool directory to make the
call.
System(echo Channel: SIP/${tmp} >
/tmp/test.tmp${From})
;
System(echo WaitTime: 20 >> /tmp/test.tmp${From});
System(echo Extension: ${From} >>
/tmp/test.tmp${From});
System(echo CallerID: Callback \\\<${tmp}\\\> >>
/tmp/te
st.tmp${From});
System(mv /tmp/test.tmp${From}
/var/spool/asterisk/outgo
ing/);
};

Set(tmp=${DB(${To}/CallBack)}); // The called
if("${tmp}" != "") { // Something is there
DBdel(${To}/CallBack); // And delete it...
// Create the callfile and then move it to the spool directory to make the
call.
System(echo Channel: SIP/${tmp} > /tmp/test.tmp${To});
System(echo WaitTime: 20 >> /tmp/test.tmp${To});
System(echo Extension: ${To} >> /tmp/test.tmp${To});
System(echo CallerID: Callback \\\<${tmp}\\\> >>
/tmp/te
st.tmp${To});
System(mv /tmp/test.tmp${To}
/var/spool/asterisk/outgoin
g/);
};
};


Good luck! __Yehavi:
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services