Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[asterisk-users] Forwarding call if extension busy


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





PostPosted: Mon Jan 04, 2016 9:56 am    Post subject: [asterisk-users] Forwarding call if extension busy Reply with quote

Hi and happy new year!

My question:

- two extensions: 1111 and 2222
- an active call on 1111
- incoming calls to 1111 should be forwarded to 1111 (call advice!) and 2222

I know how can I forward an incoming call to more than an extension,
but I have no idea how can I get the information, that 1111 has
already an active call...

I think, I need something like:

exten => _2222,1,Verbose(2,Incoming call for 2222 - [${CALLERID(num)}])
exten => _2222,n,GotoIf( <what here?> ?busy)
exten => _2222,n,Dial(SIP/2222,19,RcxX)
exten => _2222,n,VoiceMail(2222,us)
exten => _2222,n,Hangup
exten => _2222(busy),n,Dial(SIP/2222&SIP/1111,19,RcxX)
exten => _2222,n,VoiceMail(2222,us)
exten => _2222,n,Hangup

Well, the problem is the second line, of course...

Of course the extension 2222 is NOT "really busy", since the phone can
support more active channels, but I hope I explained my problem...

Any suggestion?

Thanks
Luca Bertoncello
(lucabert@lucabert.de)


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
kevin.larsen at pionee...
Guest





PostPosted: Mon Jan 04, 2016 10:23 am    Post subject: [asterisk-users] Forwarding call if extension busy Reply with quote

asterisk-users-bounces@lists.digium.com wrote on 01/04/2016 08:55:40 AM:

Quote:
My question:

- two extensions: 1111 and 2222
- an active call on 1111
- incoming calls to 1111 should be forwarded to 1111 (call advice!) and 2222

I know how can I forward an incoming call to more than an extension,
but I have no idea how can I get the information, that 1111 has
already an active call...


I am not sure if I completely understand what you are trying to do, but it sounds like you want to query the DEVICE_STATE function.

For instance, my customer service department has this thing against ever having their phone ring a call while they are already on a call, so for these special little snowflakes, I have the following line:

same => n(voice),GotoIf($["${DEVICE_STATE(sip/${EXTEN})}" != "NOT_INUSE"]?voicebusy)

Basically, this little line looks at the extension and if it shows anything other than free (NOT_INUSE), it jumps to the voicebusy line in the dialplan. The voicebusy line just hits voicemail directly.

You can use this same idea to branch your logic and handle a variety of situations. In my case, I only want to actually perform the dial if the phone is currently not in use, so my logic was fairly simple.

See here for reference:
https://wiki.asterisk.org/wiki/display/AST/Device+State ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________
Back to top
webaccounts173 at jgoe...
Guest





PostPosted: Mon Jan 04, 2016 10:25 am    Post subject: [asterisk-users] Forwarding call if extension busy Reply with quote

Quote:
Hi and happy new year!

My question:

- two extensions: 1111 and 2222
- an active call on 1111
- incoming calls to 1111 should be forwarded to 1111 (call advice!) and 2222

I know how can I forward an incoming call to more than an extension, but I have no idea how
can I get the information, that 1111 has already an active call...

I think, I need something like:

exten => _2222,1,Verbose(2,Incoming call for 2222 - [${CALLERID(num)}])
exten => _2222,n,GotoIf( <what here?> ?busy)
exten => _2222,n,Dial(SIP/2222,19,RcxX)
exten => _2222,n,VoiceMail(2222,us)
exten => _2222,n,Hangup
exten => _2222(busy),n,Dial(SIP/2222&SIP/1111,19,RcxX)
exten => _2222,n,VoiceMail(2222,us)
exten => _2222,n,Hangup

Well, the problem is the second line, of course...

Of course the extension 2222 is NOT "really busy", since the phone can support more active
channels, but I hope I explained my problem...

Any suggestion?

Thanks
Luca Bertoncello
(lucabert@lucabert.de)


There may not be a general solution as the end points can accept more than a single call
themselves as described by yourself, i.e. the phone may not be in a busy state unless the max.
number of calls has been reached or a call has been actively rejected. In that case you might
put another Dial just after the first Dial application. If there is still no answer, VoiceMail
gets called.

You need to configure your phone to accept only a single call. Another approach would be to
check from within Asterisk whether a particular endpoint has already active calls and Dial() as
required, i.e. one would delete the phones with active calls from a given list. Since there is
no real "busy" condition, this seems to be a cleaner approach.

At first you should be able to describe exactly which behavior you want.

jg

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
lucabert at lucabert.de
Guest





PostPosted: Mon Jan 04, 2016 10:28 am    Post subject: [asterisk-users] Forwarding call if extension busy Reply with quote

Zitat von Kevin Larsen <kevin.larsen@pioneerballoon.com>:

Hi Kevin

Quote:
For instance, my customer service department has this thing against ever
having their phone ring a call while they are already on a call, so for
these special little snowflakes, I have the following line:

same => n(voice),GotoIf($["${DEVICE_STATE(sip/${EXTEN})}" !=
"NOT_INUSE"]?voicebusy)

I think, this is EXACTLY what I'm looking for...

I'll try this evening!

Thanks
Luca Bertoncello
(lucabert@lucabert.de)


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
lucabert at lucabert.de
Guest





PostPosted: Mon Jan 04, 2016 1:10 pm    Post subject: [asterisk-users] Forwarding call if extension busy Reply with quote

Kevin Larsen <kevin.larsen@pioneerballoon.com> schrieb:

Quote:
I am not sure if I completely understand what you are trying to do, but it
sounds like you want to query the DEVICE_STATE function.

IT WORKS!!!!

Thank you very much!

Luca Bertoncello
(lucabert@lucabert.de)

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
kevin.larsen at pionee...
Guest





PostPosted: Mon Jan 04, 2016 1:14 pm    Post subject: [asterisk-users] Forwarding call if extension busy Reply with quote

Quote:
Kevin Larsen <kevin.larsen@pioneerballoon.com> schrieb:

Quote:
I am not sure if I completely understand what you are trying to do, but it
sounds like you want to query the DEVICE_STATE function.

IT WORKS!!!!

Thank you very much!


Glad I was able to help. You are most welcome. ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________
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