[Asterisk-Users] iax2 setvars help needed

Steve Edwards asterisk.org at sedwards.com
Mon Mar 7 10:41:20 MST 2005


I'm trying to pass a variable between servers using "setvar" in iax.conf.

I have a box (ts2) with a t100p in it. It answers the call and dials 
another box (ast0) via IAX. I want to pass a variable along with the call 
from ts2 to ast0.

I'm running CVS-HEAD-03/07/05 on ts2 and ast0.

ts2's iax.conf:
[general]
         disallow                        = all
         allow                           = ulaw
[ast0]
         host                            = ast0
         setvar=foo=bar
         type                            = friend

ts2's extensions.conf:
[ani-block]
         exten = _.,1,                   noop(${CONTEXT}:${EXTEN}:${PRIORITY})
         exten = _.,n,                   answer
         exten = _.,n,                   resetcdr(w)
         exten = _.,n(ani-block),        agi(ani-block)
         exten = _.,n,                   dial(iax2/ts2:xxxxxx at ast0/${EXTEN})
         exten = _.,n,                   hangup
         exten = _.,ani-block+101,       background(vm-sorry)
         exten = _.,n,                   hangup
         exten = h,1,                    hangup
         exten = i,1,                    hangup
         exten = t,1,                    hangup

ast0's iax.conf:
[ts2]
         auth                            = plaintext
         context                         = main
         host                            = ts2
         secret                          = xxxxxx
         type                            = friend
         username                        = ts2

ast0's extensions.conf:
[main]
         exten = h,1,                    hangup
         exten = i,1,                    goto(${CONTEXT},${DNIS},1)
         exten = t,1,                    hangup
         exten = _.,1,                   noop(${CONTEXT}:${EXTEN}:${PRIORITY})
         exten = _.,n,                   answer
         exten = _.,n,                   noop(${FOO})
         exten = _.,n,                   noop(${foo})
         exten = _.,n,                   setvar(DNIS=${EXTEN})
         exten = _.,n,                   resetcdr(w)
         exten = _.,n,                   goto(enter-card-number,s,1)
         exten = _.,n,                   hangup

The variable "foo" is not visible in ast0.

Any clues will be greatly appreciated :)

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline           pagesteve at sedwards.com            Fax: +1-760-731-3000



More information about the asterisk-users mailing list