[asterisk-users] Passing variables between two DUNDi/IAX2 peers
Vieri
rentorbuy at yahoo.com
Wed Mar 5 11:57:13 CST 2008
--- Richard Lyman <pchammer at dynx.net> wrote:
> Vieri wrote:
> > Hi.
> >
> > I am trying to pass a variable from one Asterisk
> PBX
> > to another.
> >
> > I'm using DUNDi with IAX2. Is there a way to do
> it?
> >
> > I tried the following but it fails.
> >
> > On peer1:
> >
> > [dundi-outgoing]
> > switch => DUNDI/priv
> > exten => s,1,Set(CDR(userfield)=test)
> > exten => s,2,Set(DUNDIVAR=${ARG1}#TEST)
> > exten => s,3,NoOp(Passing ${DUNDIVAR} to DUNDi
> peer.)
> > exten => s,4,Goto(${DUNDIVAR},1)
> >
> > On peer2:
> >
> > [dundi-incoming]
> > exten => _X.,1,NoOp(Received EXTEN ${EXTEN}.)
> > exten => _X.,n,Set(EXTTODIAL=${CUT(EXTEN|#|1)})
> > exten => _X.,n,Set(DUNDIVAR=${CUT(EXTEN|#|2)})
> > exten => _X.,1,NoOp(Extracted extension
> ${EXTTODIAL}
> > and DUNDi variable ${DUNDIVAR})
> > exten =>
> _X.,n,Goto(local-extensions,${EXTTODIAL},1)
> >
> > If I try a test call then nothing ever reaches
> peer2.
> > However, if I remove #TEST from DUNDIVAR in
> > dundi-outgoing and
> Goto(local-extensions,${EXTEN},1)
> > in dundi-incoming then the call is established
> > correctly.
> >
> > I guess the _X. pattern match is wrong?
> >
> > How can I match an alphanumeric string?
> >
> > Thanks,
> >
> > Vieri
> >
> >
>
> you would have to use type 'friend' as user/peer do
> not pass channel
> variables (unless it has been changed in
> 1.4/1.6/trunk).
In iax.conf I have (on both peers):
[priv]
type=friend
dbsecret=dundi/secret
context=dundi-incoming
and I am running Asterisk 1.2.21.1 on peer1 and
1.2.26.2 on peer2.
Any ideas as to why it's not "working"?
Or could anyone please suggest an alternative method?
Thanks!
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
More information about the asterisk-users
mailing list