Per-Henrik Lundblom
2010-Jun-17 16:59 UTC
[asterisk-users] applicationmap and ChannelRedirect
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 [201 at home:1] Gosub("SCCP/203-0000000c", "internal-defaults,1") in new stack -- Executing [internal-defaults at home:1] NoOp("SCCP/203-0000000c", ""Lekrummet" <203>") in new stack -- Executing [internal-defaults at home:2] AGI("SCCP/203-0000000c", "cid_lookup.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/cid_lookup.agi -- SEP001121d89b97: Accessory 'Speaker' is 'OffHook' (0) -- <SCCP/203-0000000c>AGI Script cid_lookup.agi completed, returning 0 -- Executing [internal-defaults at home:3] Set("SCCP/203-0000000c", "__DYNAMIC_FEATURES=internal-move") in new stack -- Executing [internal-defaults at home:4] Return("SCCP/203-0000000c", "") in new stack -- Executing [201 at home:2] Dial("SCCP/203-0000000c", "SIP/201,,t") in new stack == Using SIP RTP CoS mark 5 -- Called 201 -- SIP/201-0000000b is ringing -- SIP/201-0000000b answered SCCP/203-0000000c -- SCCP: Outgoing call has been answered SCCP/203-0000000c on 203 at SEP001121d89b97-0000000c == Using SCCP RTP TOS bits 184 == Using SCCP RTP CoS mark 5 -- Feature Found: internal-move exten: internal-move -- Executing [s at macro-internal-move:1] ChannelRedirect("SIP/201-0000000b", "SCCP/203-0000000c,internal-move-conference,blafs,1") in new stack -- Executing [s at macro-internal-move:2] NoOp("SIP/201-0000000b", ""Sent caller to dynamic conference"") in new stack -- Executing [s at macro-internal-move:3] NoOp("SIP/201-0000000b", ""----- hung up"") in new stack == Spawn extension (internal-move-conference, blafs, 1) exited non-zero on 'SCCP/203-0000000c' -- Executing [blafs at internal-move-conference:1] Answer("SCCP/203-0000000c", "") in new stack -- Executing [blafs at internal-move-conference:2] Set("SCCP/203-0000000c", "TIMEOUT(absolute)=10") in new stack Channel will hangup at 2010-06-17 12:10:02.995 CEST. -- Executing [blafs at internal-move-conference:3] MeetMe("SCCP/203-0000000c", "424242,d1MFqAx") in new stack -- Created MeetMe conference 1023 for conference '424242' -- Started music on hold, class 'default', on SCCP/203-0000000c -- 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 [201 at home:1] Gosub("SCCP/203-00000007", "internal-defaults,1") in new stack -- Executing [internal-defaults at home:1] NoOp("SCCP/203-00000007", ""Lekrummet" <203>") in new stack -- Executing [internal-defaults at home:2] AGI("SCCP/203-00000007", "cid_lookup.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/cid_lookup.agi -- SEP001121d89b97: Accessory 'Speaker' is 'OffHook' (0) -- <SCCP/203-00000007>AGI Script cid_lookup.agi completed, returning 0 -- Executing [internal-defaults at home:3] Set("SCCP/203-00000007", "__DYNAMIC_FEATURES=internal-move") in new stack -- Executing [internal-defaults at home:4] Return("SCCP/203-00000007", "") in new stack -- Executing [201 at home:2] Dial("SCCP/203-00000007", "SIP/201,,t") in new stack == Using SIP RTP CoS mark 5 -- Called 201 -- SIP/201-00000006 is ringing -- SIP/201-00000006 answered SCCP/203-00000007 -- SCCP: Outgoing call has been answered SCCP/203-00000007 on 203 at SEP001121d89b97-00000007 == Using SCCP RTP TOS bits 184 == Using SCCP RTP CoS mark 5 -- Feature Found: internal-move exten: internal-move -- Executing [s at macro-internal-move:1] ChannelRedirect("SIP/201-00000006", "SCCP/203-00000007,internal-move-conference,blafs,1") in new stack -- Executing [s at macro-internal-move:2] NoOp("SIP/201-00000006", ""Sent caller to dynamic conference"") in new stack -- Executing [s at macro-internal-move:3] NoOp("SIP/201-00000006", ""----- hung up"") in new stack == Spawn extension (internal-move-conference, blafs, 1) exited non-zero on 'SCCP/203-00000007' -- Executing [blafs at internal-move-conference:1] Answer("SCCP/203-00000007", "") in new stack -- Executing [blafs at internal-move-conference:2] Set("SCCP/203-00000007", "TIMEOUT(absolute)=10") in new stack Channel will hangup at 2010-06-17 12:09:03.167 CEST. -- Executing [blafs at internal-move-conference:3] MeetMe("SCCP/203-00000007", "424242,d1MFqAx") in new stack -- Created MeetMe conference 1023 for conference '424242' -- Started music on hold, class 'default', on SCCP/203-00000007 -- Stopped music on hold on SCCP/203-00000007 -- Hungup 'DAHDI/pseudo-913977795' == Spawn extension (internal-move-conference, blafs, 3) exited non-zero on 'SCCP/203-00000007' -- SCCP: Asterisk request to hangup channel SCCP/203-00000007 -- SCCP: Request to schedule delete for channel '7' in 10 seconds -- SEP001121d89b97: Accessory 'Speaker' is 'OnHook' (0) -- SEP001121d89b97: Statistics from 201 callid: 7 Packets sent: 93 rcvd: 88 lost: 1 jitter: 0 latency: 0 /PH -- Per-Henrik Lundblom epost: ph at whatever.nu telefon: 0733-20 71 26 hemsida: www.whatever.nu
Per-Henrik Lundblom
2010-Jun-20 13:26 UTC
[asterisk-users] applicationmap and ChannelRedirect
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: ph at whatever.nu telefon: 0733-20 71 26 hemsida: www.whatever.nu