Link to home
Start Free TrialLog in
Avatar of aquasw
aquasw

asked on

Multi extension call barge feature - Asterisk

Hi All,
I want to develop the Call Barge Feature for Asterisk.
The meaning of the barge that I need is :
When there is a call exist , let's say between the local extension and some other point ... I know the number of one of the extensions and I want to enter into the conversation. So from my extension I'll press the feature key and the extension number, then some kind of conference will be created , and the conversation will be between three extensions then ...
Good example for it : Child ,  talking to friend too long ... I want to call him for the launch , I'm entering to the call and telling to both of the sides to talk later... Or I'm telling to the child to go for launch , he is disconnecting , but I'm stay on the line with his friend.

Thanks .
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

You will need to be running asterisk version 1.4 to use this feature. Have a look at the extenspy command :-
http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ExtenSpy

For example if the person you wish to barge in on has extension 100 then you could have :-

exten=>200,1,ExtenSpy(100,w)

Dialing 200 will then allow you to barge in on that call.
Avatar of aquasw
aquasw

ASKER

How can I configure the key tone for barging in ? And if there is a way to know that some extension is talking right now ?
What do you mean by key tone?

To know if some extension is talking you can use the 'show channels' command or if your phone support busy lamps (grandstream gxp-2000 for example) then you can define 'hints' in asterisk and the light on the phone against the particular extension will flash when it is ringing or be on when a call is in progress.
Avatar of aquasw

ASKER

Thanks for the answer ...
I mean that , when I'm calling to ext. 200, I will not always want to barge in. Let's say the user that want to barge haven't way to see that ext. 200 is on the call right now (I have simple LinkSys SPA921 phones).  
So when I want to barge , I'll dial  *33 for example , the extension number (200) .
Hope I explained it now :)

To where I need to add the "exten=>200,1,ExtenSpy(100,w)" , to extensions.conf , in the ext. 100 section ?
You need to add the line in the same context (i.e same section)as where extension 100 is defined.

So you want to be able to dial *33. Then you get the extension to barge in on. Then you are told if there is an active call and if there is given the option to barge in?
Avatar of aquasw

ASKER

Right. On the second thought , it doesn't have to be a dial key ... Just when I'm calling to extension and only if there is an active call , I need to have an option to barge in .
I would recommend that you do have a dial key. Having you able to barge in if the person you are calling is on the phone can have a number of issues as you would need to integrate the feature into the voicemail system which causes problems if call waiting is enabled on the phone. Also anyone dialing that extension (including external calls) would be able to barge in.

I'll write something which should do as a starting point for you and will probably work. I am still running asterisk 1.2 myself so I cannot test it.
I saw in your other question that you are running asterisk 1.2. You will have to upgrade to asterisk 1.4 otherwise when you barge in you can only hear the other person and wont be able to talk to them.

As you are running trixbox you will need to follow their upgrade procedure. I am not that familar with trixbox myself so I cannot say how easy or difficult this is.
ASKER CERTIFIED SOLUTION
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aquasw

ASKER

Where do I need to put the line "exten => *33,Macro(bargein)" ?
extesions.conf too ?
Yes that will also go in extensions.conf in the same section where your normal extensions are configured.

Note it uses a command which was added in asterisk 1.4 so you will need to upgrade otherwise it wont work at all.
Avatar of aquasw

ASKER

I've read about upgradin Asterisk 1.2 branch to 1.4 , from what I've understood , it it not recommended at all upgrading the branch 1.2 to 1.4 on TrixBox . Instead of it , it is recommended to upgrade to the latest build of 1.2 branch. It is interesting if the barge in supported in the latest builds of 1.2 ?
No sorry according to the documentation the additional option to talk to the person when you have barged in was introduced as a new feature in the 1.4 release.
Avatar of aquasw

ASKER

May be this issue could be solved using conference rooms somehow ? Fro example , I'm using *33 and extension number , waiting for 5 seconds if there is a cell on this extension , then creating new conf. room and moving all three (me, called to extension and the person to whom he talked ) participants of the session to that room ?
Yes in theory you could use a conference but you would have to move a channel to a new conference and the only way to do this would be to use the channelredirect command which is in asterisk 1.4.

The only thing you could do would be to have all calls use a conference by default.
When an incoming call was detected the dial plan would have to run a script to make a new call between the destination number and a new conference. If the call suceeded then put the callng person into the same conference. There would be all sorts of complications like having to check the conference was empty first and handling all the call hangups properly.
Avatar of aquasw

ASKER

Well , this solution really little complicated ...
I have code with n-way implemented on asterisk 1.2 , may be this guy implemented the ChannelRedirect by his own , I'll try to investigate his code ... But my feeling is that right direction is upgrading to 1.4 and using the barge , hope the upgrade will not cause me a lot of problems ...
Avatar of aquasw

ASKER

Hi grblades,
At last I found time for installing the 1.4 version of Asterisk.
- I've inserted the macro you gave to extension-custom.conf
- Also under [from-internal-custom] macro , I've inserted the exten => *33,Macro(bargein)

Now when trying to dial from one of the extensions I got an error message : "That feature is not available on this line" .
  -- Executing [*33@from-internal:1] ResetCDR("SIP/177-095860b0", "") in new stack
    -- Executing [*33@from-internal:2] NoCDR("SIP/177-095860b0", "") in new stack
    -- Executing [*33@from-internal:3] Wait("SIP/177-095860b0", "1") in new stack
    -- Executing [*33@from-internal:4] Playback("SIP/177-095860b0", "silence/1&feature-not-avail-line&silence/1&cannot-complete-as-dialed&check-number-dial-again|noanswer") in new stack
    -- <SIP/177-095860b0> Playing 'silence/1' (language 'en')
    -- <SIP/177-095860b0> Playing 'feature-not-avail-line' (language 'en')
  == Spawn extension (from-internal, *33, 4) exited non-zero on 'SIP/177-095860b0'
    -- Executing [h@from-internal:1] Macro("SIP/177-095860b0", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] ResetCDR("SIP/177-095860b0", "w") in new stack
    -- Executing [s@macro-hangupcall:2] NoCDR("SIP/177-095860b0", "") in new stack
    -- Executing [s@macro-hangupcall:3] GotoIf("SIP/177-095860b0", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s@macro-hangupcall:6] GotoIf("SIP/177-095860b0", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] GotoIf("SIP/177-095860b0", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s@macro-hangupcall:11] Hangup("SIP/177-095860b0", "") in new stack
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/177-095860b0' in macro 'hangupcall'
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/177-095860b0'


 
It doesnt look like you are using standard asterisk. Are you using something like trixbox?

It looks to me like it is not recognising *33 as being a valid extension.
I dont know why this is but it will be to do with the way the trixbox dialplan works.

Your best approach might be to post in the trixbox forums to ask how to implement the macro.
Avatar of aquasw

ASKER

to grblades:
Hi,
You right, I'm using trixbox with asterisk 1.4 ...
I've solved the problem with the dialplan , now when dialing *33 , I'm receiving the "Extension" message , then , the call falling up with message - "That feature is not available on this line".

This is the trace :

-- Executing [*33@from-internal:4] Playback("SIP/299-0895b7e8", "silence/1&feature-not-avail-line&silence/1&cannot-complete-as-dialed&check-number-dial-again|noanswer") in new stack
    -- <SIP/299-0895b7e8> Playing 'silence/1' (language 'en')
    -- Executing [*33@from-internal:4] Playback("SIP/299-0895b7e8", "silence/1&feature-not-avail-line&silence/1&cannot-complete-as-dialed&check-number-dial-again|noanswer") in new stack
    -- <SIP/299-0895b7e8> Playing 'silence/1' (language 'en')
trixbox1*CLI>     -- <SIP/299-0895b7e8> Playing 'feature-not-avail-line' (language 'en')
    -- <SIP/299-0895b7e8> Playing 'feature-not-avail-line' (language 'en')
trixbox1*CLI>     -- <SIP/299-0895b7e8> Playing 'silence/1' (language 'en')
    -- <SIP/299-0895b7e8> Playing 'silence/1' (language 'en')
trixbox1*CLI>     -- <SIP/299-0895b7e8> Playing 'cannot-complete-as-dialed' (language 'en')
    -- <SIP/299-0895b7e8> Playing 'cannot-complete-as-dialed' (language 'en')
trixbox1*CLI>   == Spawn extension (from-internal, *33, 4) exited non-zero on 'SIP/299-0895b7e8'
  == Spawn extension (from-internal, *33, 4) exited non-zero on 'SIP/299-0895b7e8'
trixbox1*CLI>     -- Executing [h@from-internal:1] Macro("SIP/299-0895b7e8", "hangupcall") in new stack
    -- Executing [h@from-internal:1] Macro("SIP/299-0895b7e8", "hangupcall") in new stack
trixbox1*CLI>     -- Executing [s@macro-hangupcall:1] ResetCDR("SIP/299-0895b7e8", "w") in new stack
    -- Executing [s@macro-hangupcall:1] ResetCDR("SIP/299-0895b7e8", "w") in new stack
trixbox1*CLI>     -- Executing [s@macro-hangupcall:2] NoCDR("SIP/299-0895b7e8", "") in new stack
    -- Executing [s@macro-hangupcall:2] NoCDR("SIP/299-0895b7e8", "") in new stack
trixbox1*CLI>     -- Executing [s@macro-hangupcall:3] GotoIf("SIP/299-0895b7e8", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s@macro-hangupcall:3] GotoIf("SIP/299-0895b7e8", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
trixbox1*CLI>     -- Executing [s@macro-hangupcall:6] GotoIf("SIP/299-0895b7e8", "1?skipblkvm") in new stack
    -- Executing [s@macro-hangupcall:6] GotoIf("SIP/299-0895b7e8", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Goto (macro-hangupcall,s,9)
trixbox1*CLI>     -- Executing [s@macro-hangupcall:9] GotoIf("SIP/299-0895b7e8", "1?theend") in new stack
    -- Executing [s@macro-hangupcall:9] GotoIf("SIP/299-0895b7e8", "1?theend") in new stack
trixbox1*CLI>     -- Goto (macro-hangupcall,s,11)
    -- Goto (macro-hangupcall,s,11)
trixbox1*CLI>     -- Executing [s@macro-hangupcall:11] Hangup("SIP/299-0895b7e8", "") in new stack
    -- Executing [s@macro-hangupcall:11] Hangup("SIP/299-0895b7e8", "") in new stack
trixbox1*CLI>   == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/299-0895b7e8' in macro 'hangupcall'
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/299-0895b7e8'
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/299-0895b7e8' in macro 'hangupcall'
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/299-0895b7e8'
Avatar of aquasw

ASKER

Another question : in your macro , where is the "Digits reading" executing ?
In my macro once it reches 'exten => s,n(menu),Background(vm-extension)' then it waits for digits to be entered until either a match is found or the timeout is reached.

I think what is happening is that trixbox has a default rule which matches anything dialed starting with a * and if the number does not match one of its own features then it plays back that message.
Normally if you dont have an extension defined when you try to dial it asterisk just gives an error code to the dialing phone.

Have you only posted the last part of the logs?
I really need to see everything from when you dialed the *33 number so I can see it calling the macro. Without that I cant see if the correct part of the dialplan is being called.