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")