On Mi, 17 Okt 2007, Atis Lezdins [EMAIL PROTECTED] 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:
[EMAIL PROTECTED]: ~ telnet localhost 5038
Action: Login
UserName: webdial
Secret: X
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 [EMAIL PROTECTED]:1] Goto(SIP/cisco1-08247f88,
doRemoteCalls|201|1) in new stack
-- Goto (doRemoteCalls,201,1)
-- Executing [EMAIL PROTECTED]:1] Goto(SIP/cisco1-08247f88,
Dial-Default|XXX|1) in new stack
-- Goto (Dial-Default,06151154260,1)
-- Executing [EMAIL PROTECTED]:1] Macro(SIP/cisco1-08247f88,
Dial-Tol|XXX) in new stack
-- Executing [EMAIL PROTECTED]:1] Set(SIP/cisco1-08247f88,
CALLERID(name)=) in new stack
-- Executing [EMAIL PROTECTED]:2] ExecIf(SIP/cisco1-08247f88,
0|SIPAddHeader|Privacy: header) in new stack
-- Executing [EMAIL PROTECTED]:3] Set(SIP/cisco1-08247f88,
CDR(accountcode)=t-online) in new stack
-- Executing [EMAIL PROTECTED]:4] Dial(SIP/cisco1-08247f88,
SIP/tol/XXX||KTW) in new stack
-- Called tol/XX
-- 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 [EMAIL PROTECTED]:1] Macro(Local/[EMAIL PROTECTED],2,
intDial|SIP/cisco2) in new stack
-- Executing [EMAIL PROTECTED]:1] Dial(Local/[EMAIL PROTECTED],2,
SIP/cisco2||kKwWtTj) in new stack
-- Called cisco2
-- SIP/cisco2-08247f88 is ringing
-- SIP/cisco2-08247f88 answered Local/[EMAIL PROTECTED],2
Channel Local/[EMAIL PROTECTED],1 was answered.
== Manager 'webdial' logged off from 127.0.0.1
-- Executing [EMAIL PROTECTED]:1] Goto(Local/[EMAIL PROTECTED],1,
doRemoteCalls|201|1) in new stack
-- Goto (doRemoteCalls,201,1)
-- Executing [EMAIL PROTECTED]:1] Goto(Local/[EMAIL PROTECTED],1,
Dial-Default|XXX|1) in new stack
-- Goto (Dial-Default,06151154260,1)
-- Executing [EMAIL PROTECTED]:1] Macro(Local/[EMAIL PROTECTED],1,
Dial-Tol|XXX) in new stack
-- Executing [EMAIL PROTECTED]:1] Set(Local/[EMAIL PROTECTED],1,
CALLERID(name)=) in new stack
-- Executing [EMAIL PROTECTED]:2] ExecIf(Local/[EMAIL PROTECTED],1,
0|SIPAddHeader|Privacy: header) in new stack
-- Executing [EMAIL PROTECTED]:3] Set(Local/[EMAIL PROTECTED],1,
CDR(accountcode)=t-online) in new stack
-- Executing [EMAIL PROTECTED]:4] Dial(Local/[EMAIL PROTECTED],1,
SIP/tol/XXX||ktwKTW) in new stack
-- Called tol/06151154260
== Spawn extension (macro-intDial, s, 1) exited non-zero on 'Local/[EMAIL
PROTECTED],2' in macro 'intDial'
== Spawn extension (macro-intDial, s, 1) exited non-zero on 'Local/[EMAIL
PROTECTED],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