I believe that IAXVAR in Asterisk 1.6 will do what you want. I have a backport of this for Asterisk 1.2.14 or so floating around somewhere but it hasn't been maintained or used for months, may not be compatible with the 1.6 implementation and I offer it with no support whatsoever.
Craig -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vieri Sent: Thursday, 6 March 2008 2:57 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Passing variables between two DUNDi/IAX2 peers --- Richard Lyman <[EMAIL PROTECTED]> 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 _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users