[asterisk-users] Problem: features (from features.conf) not available if call was originated by manager API or call file
Volker Sauer
volker at volker-sauer.de
Wed Oct 17 15:37:02 CDT 2007
On Mi, 17 Okt 2007, Atis Lezdins <atis at iq-labs.net> wrote:
>
> If it's a global variable, and it works one way, but not another - then you
> should post a bug.
Yes, maybe it's a bug. But I'm not sure. I still think I'm missing a
detail....
> You can also try using in your call file:
> Set: DYNAMIC_FEATURES=automon#...
Let's focus on the manager API because this is my primary "building
site" and the call files are not that important.
I tried the following:
vsauer at arthur: ~ > telnet localhost 5038
Action: Login
UserName: webdial
Secret: XXXXX
Response: Success
Message: Authentication accepted
Action: Getvar
Variable: DYNAMIC_FEATURES
Response: Success
Variable: DYNAMIC_FEATURES
Value: automon#blindxfer#atxfer#parkcall#disconnect
Well, that means that the global variable is known in this context (as
it should be). But if I run:
Action: Originate
Channel: SIP/cisco1
Exten: 201
Context: doLocalCalls
MaxRetries: 1
RetryTime: 15
WaitTime: 60
Priority: 1
SetLanguage: de
The called party can listen to DTMF instead of asterisk triggering
atxfer or so.
That's what the CLI says:
== Parsing '/opt/asterisk/etc/asterisk/manager.conf': Found
== Manager 'webdial' logged on from 127.0.0.1
> Channel SIP/cisco1-08247f88 was answered.
-- Executing [201 at doLocalCalls:1] Goto("SIP/cisco1-08247f88", "doRemoteCalls|201|1") in new stack
-- Goto (doRemoteCalls,201,1)
-- Executing [201 at doRemoteCalls:1] Goto("SIP/cisco1-08247f88", "Dial-Default|XXXXXXXXXXX|1") in new stack
-- Goto (Dial-Default,06151154260,1)
-- Executing [06151154260 at Dial-Default:1] Macro("SIP/cisco1-08247f88", "Dial-Tol|XXXXXXXXXXX") in new stack
-- Executing [s at macro-Dial-Tol:1] Set("SIP/cisco1-08247f88", "CALLERID(name)=XXXXXXXXXXXX") in new stack
-- Executing [s at macro-Dial-Tol:2] ExecIf("SIP/cisco1-08247f88", "0|SIPAddHeader|Privacy: header") in new stack
-- Executing [s at macro-Dial-Tol:3] Set("SIP/cisco1-08247f88", "CDR(accountcode)=t-online") in new stack
-- Executing [s at macro-Dial-Tol:4] Dial("SIP/cisco1-08247f88", "SIP/tol/XXXXXXXXXXX||KTW") in new stack
-- Called tol/XXXXXXXXXX
-- SIP/tol-08240f78 is making progress passing it to SIP/cisco1-08247f88
-- SIP/tol-08240f78 is ringing
-- SIP/tol-08240f78 is making progress passing it to SIP/cisco1-08247f88
-- SIP/tol-08240f78 answered SIP/cisco1-08247f88
You see I run Dial with the KTW options.
*Maybe* in this case, my phone is not the "caller" but the "called"
because it get's called by the manager API (I don't know how one has
to see that). To check, I dialed with "ktwKTW" - same result. If I
dial with the normal phone, #2 for atxfer works. If I dial with the
manager API, it doesn't.
I even tried to set the variable in the manager API. The CLI says:
== Setting global variable 'DYNAMIC_FEATURES' to
'automon#blindxfer#atxfer#parkcall#disconnect'
but the result is the same. No features like #2.
> If this doesn't help either, you can dial to Local channel, and there execute
> a Dial(), and set variables if necessary.
I tried both, but neither worked.
First I tought chan_local would solve it because I can explicitly set
Dial-parameters. But:
== Manager 'webdial' logged on from 127.0.0.1
-- Executing [12 at doLocalCalls:1] Macro("Local/12 at doLocalCalls-94a1,2", "intDial|SIP/cisco2") in new stack
-- Executing [s at macro-intDial:1] Dial("Local/12 at doLocalCalls-94a1,2", "SIP/cisco2||kKwWtTj") in new stack
-- Called cisco2
-- SIP/cisco2-08247f88 is ringing
-- SIP/cisco2-08247f88 answered Local/12 at doLocalCalls-94a1,2
> Channel Local/12 at doLocalCalls-94a1,1 was answered.
== Manager 'webdial' logged off from 127.0.0.1
-- Executing [201 at doLocalCalls:1] Goto("Local/12 at doLocalCalls-94a1,1", "doRemoteCalls|201|1") in new stack
-- Goto (doRemoteCalls,201,1)
-- Executing [201 at doRemoteCalls:1] Goto("Local/12 at doLocalCalls-94a1,1", "Dial-Default|XXXXXXXXXXX|1") in new stack
-- Goto (Dial-Default,06151154260,1)
-- Executing [06151154260 at Dial-Default:1] Macro("Local/12 at doLocalCalls-94a1,1", "Dial-Tol|XXXXXXXXXXX") in new stack
-- Executing [s at macro-Dial-Tol:1] Set("Local/12 at doLocalCalls-94a1,1", "CALLERID(name)=XXXXXXXXXXXX") in new stack
-- Executing [s at macro-Dial-Tol:2] ExecIf("Local/12 at doLocalCalls-94a1,1", "0|SIPAddHeader|Privacy: header") in new stack
-- Executing [s at macro-Dial-Tol:3] Set("Local/12 at doLocalCalls-94a1,1", "CDR(accountcode)=t-online") in new stack
-- Executing [s at macro-Dial-Tol:4] Dial("Local/12 at doLocalCalls-94a1,1", "SIP/tol/XXXXXXXXXXX||ktwKTW") in new stack
-- Called tol/06151154260
== Spawn extension (macro-intDial, s, 1) exited non-zero on 'Local/12 at doLocalCalls-94a1,2' in macro 'intDial'
== Spawn extension (macro-intDial, s, 1) exited non-zero on 'Local/12 at doLocalCalls-94a1,2'
-- SIP/tol-08240f78 is making progress passing it to SIP/cisco2-08247f88
-- SIP/tol-08240f78 is ringing
-- SIP/tol-08240f78 is making progress passing it to SIP/cisco2-08247f88
-- SIP/tol-08240f78 answered SIP/cisco2-08247f88
Now, the phone and the remote party are called with Dial with ktwKTW.
This should do it. But: nothing!
I declare this a bug, now!
Regards
Volker
>
> Regards,
> Atis
>
>
> --
> Atis Lezdins
> VoIP Developer,
> IQ Labs Inc.
> atis at iq-labs.net
> Skype: atis.lezdins
> Cell Phone: +371 28806004
> Work phone: +1 800 7502835
>
--
Volker Sauer * Poststrasse 1/601 * 64293 Darmstadt * Germany
E-Mail/Jabber: volker(at)volker-sauer.de * http://www.volker-sauer.de
PGPKey-Fingerprint: DB26 11C7 B12E 0B27 3999 2E4F 7E35 4E4D 5DD5 D0E0
http://wwwkeys.de.pgp.net/pks/lookup?op=get&search=0x7E354E4D5DD5D0E0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20071017/a2688856/attachment.pgp
More information about the asterisk-users
mailing list