Re: [asterisk-users] applicationmap and ChannelRedirect

2010-06-20 Thread Per-Henrik Lundblom
* Zeeshan Zakaria  [100620 16:14]:
 
> But I can tell you that I have implemented a couple of times somewhat
> similar dialplan functionality, recent of which was about 6 months ago. I
> used the n-way calling example as a reference and first made a working n-way
> feature, which itself was tricky, and then modified it for fit my
> requirement, which again, took quite a bit of debugging to make it work. So
> yes, I think it is somewhere in your dial plan that you should look. Have
> you tried to implement the n-way calling feature? That helped me a lot to
> understand how to successfully bridge in-progress calls to other channels,
> and make dynamic feature codes to work with it.

Thanks for your answer. I haven't tried the n-way example, just looked
at the dialplan and I think I have understood how it works. Will try the
n-way example to see if I have missed something. Still the bug 17117
rings in the back of my head because it matches my problem...

/PH

--
Per-Henrik Lundblom   epost: p...@whatever.nu
telefon: 0733-20 71 26hemsida: www.whatever.nu


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


Re: [asterisk-users] applicationmap and ChannelRedirect

2010-06-20 Thread Zeeshan Zakaria
Hi,

It is hard to just look at your code and figure out why it is not working,
and personally I don't have time to test it on an asterisk system and
suggest you something.

But I can tell you that I have implemented a couple of times somewhat
similar dialplan functionality, recent of which was about 6 months ago. I
used the n-way calling example as a reference and first made a working n-way
feature, which itself was tricky, and then modified it for fit my
requirement, which again, took quite a bit of debugging to make it work. So
yes, I think it is somewhere in your dial plan that you should look. Have
you tried to implement the n-way calling feature? That helped me a lot to
understand how to successfully bridge in-progress calls to other channels,
and make dynamic feature codes to work with it.

Zeeshan A Zakaria

--
www.ilovetovoip.com

On 2010-06-20 9:31 AM, "Per-Henrik Lundblom"  wrote:

Hi,

Does the lack of answers prove that the problem described in bug 17117
isn't a problem in reality and everything is caused by my setup?


/PH

--
Per-Henrik Lundblom epost: p...@whatever.nu
telefon: 0733-20 71 26 hemsida: ...
-- 
_
-- 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

Re: [asterisk-users] applicationmap and ChannelRedirect

2010-06-20 Thread Per-Henrik Lundblom
Hi,

Does the lack of answers prove that the problem described in bug 17117
isn't a problem in reality and everything is caused by my setup?

/PH

--
Per-Henrik Lundblom   epost: p...@whatever.nu
telefon: 0733-20 71 26hemsida: www.whatever.nu


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


[asterisk-users] applicationmap and ChannelRedirect

2010-06-17 Thread Per-Henrik Lundblom
Hi,

I'm struggling with a feature in my home phone setup. I have several
phones using both SIP and SCCP. What I try to do is to create a dynamic
feature that works similar to the blindxfer feature built into Asterisk.
What I want is the possibility for the called part to push a number
sequence (for example *#) to redirect the callee to a fixed extension or
(for example *123#) to redirect the callee to extension 123. I'm under
the impression this must be done with dynamic feature (applicationmap)
and ChannelRedirect() because of the SCCP protocol.

The result is that my test code, which is far from finished, only works
occasionally. What happens when it fails is that the callee is hung up
instead of put into the dynamic conference. There doesn't seem to be a
reason for it to fail when it fails. 

I have tried to just send the callee to a fixed SIP extension with the
same result so it shouldn't be related to MeetMe.

I found the bug ID 17117 which more or less exactly matches my problem.
The conclusion there is that what I wan't to do shouldn't really work.
BUT this is exactly the same scenario used in the ASterisk n-way call
HOWTO which is refered to at a lot of places. Shouldn't that one work on
all systems at all times?

I really can't be the first wanting to use ChannelRedirect to tranfer
calls during an ongoing call?

This is my test code:

features.conf:

[applicationmap]
internal-move => *,self/callee,Macro,internal-move

extensions.conf:

[internal-move-conference]
exten => blafs,1,Answer()
exten => blafs,n,MeetMe(424242,d1MFqAx)
exten => blafs,n,Hangup()

[internal-move-callback]
exten => blafs,1,Answer()
;exten =>
exten => blafs,n,Hangup()

[macro-internal-move]
exten => s,1,ChannelRedirect(${BRIDGEPEER},internal-move-conference,blafs,1)
exten => s,n,NoOp("Sent caller to dynamic conference")
exten => s,n,NoOp("- hung up")

Output from Asterisk when it works:

*CLI> -- SEP001121d89b97: (sccp_pbx_softswitch) New call on line 203
-- Executing [...@home:1] Gosub("SCCP/203-000c",
"internal-defaults,1") in new stack
-- Executing [internal-defau...@home:1] NoOp("SCCP/203-000c",
""Lekrummet" <203>") in new stack
-- Executing [internal-defau...@home:2] AGI("SCCP/203-000c",
"cid_lookup.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/cid_lookup.agi
-- SEP001121d89b97: Accessory 'Speaker' is 'OffHook' (0)
-- AGI Script cid_lookup.agi completed, returning
0
-- Executing [internal-defau...@home:3] Set("SCCP/203-000c",
"__DYNAMIC_FEATURES=internal-move") in new stack
-- Executing [internal-defau...@home:4] Return("SCCP/203-000c",
"") in new stack
-- Executing [...@home:2] Dial("SCCP/203-000c", "SIP/201,,t") in
new stack
  == Using SIP RTP CoS mark 5
-- Called 201
-- SIP/201-000b is ringing
-- SIP/201-000b answered SCCP/203-000c
-- SCCP: Outgoing call has been answered SCCP/203-000c on
2...@sep001121d89b97-000c
  == Using SCCP RTP TOS bits 184
  == Using SCCP RTP CoS mark 5
--  Feature Found: internal-move exten: internal-move
-- Executing [...@macro-internal-move:1]
ChannelRedirect("SIP/201-000b",
"SCCP/203-000c,internal-move-conference,blafs,1") in new stack
-- Executing [...@macro-internal-move:2] NoOp("SIP/201-000b",
""Sent caller to dynamic conference"") in new stack
-- Executing [...@macro-internal-move:3] NoOp("SIP/201-000b",
""- hung up"") in new stack
  == Spawn extension (internal-move-conference, blafs, 1) exited
non-zero on 'SCCP/203-000c'
-- Executing [bl...@internal-move-conference:1]
Answer("SCCP/203-000c", "") in new stack
-- Executing [bl...@internal-move-conference:2]
Set("SCCP/203-000c", "TIMEOUT(absolute)=10") in new stack
Channel will hangup at 2010-06-17 12:10:02.995 CEST.
-- Executing [bl...@internal-move-conference:3]
MeetMe("SCCP/203-000c", "424242,d1MFqAx") in new stack
-- Created MeetMe conference 1023 for conference '424242'
-- Started music on hold, class 'default', on SCCP/203-000c
-- SCCP: Channel '11' freed by schedule.


Output from Asterisk when it doesn't work:

*CLI> -- SEP001121d89b97: (sccp_pbx_softswitch) New call on line 203
-- Executing [...@home:1] Gosub("SCCP/203-0007",
"internal-defaults,1") in new stack
-- Executing [internal-defau...@home:1] NoOp("SCCP/203-0007",
""Lekrummet" <203>") in new stack
-- Executing [internal-defau...@home:2] AGI("SCCP/203-0007",
"cid_lookup.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/cid_lookup.agi
-- SEP001121d89b97: Accessory 'Speaker' is 'OffHook' (0)
-- AGI Script cid_lookup.agi completed, returning
0
-- Executing [internal-defau...@home:3] Set("SCCP/203-0007",
"__DYNAMIC_FEATURES=internal-move") in new stack
-- Executing [internal-defau...@home:4] Return("SCCP/203-0007",
"") in new stack
-- Executing [...@home:2] Dial("SCCP/203-0007", "SIP/201,,t")