Vieri
2008-Mar-05 13:33 UTC
[asterisk-users] Passing variables between two DUNDi/IAX2 peers
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
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Vieri
2008-Mar-05 14:15 UTC
[asterisk-users] Passing variables between two DUNDi/IAX2 peers
--- Vieri <rentorbuy at yahoo.com> wrote:> 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)I also tried with _. but it still fails. ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Richard Lyman
2008-Mar-05 14:37 UTC
[asterisk-users] Passing variables between two DUNDi/IAX2 peers
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).
Maybe Matching Threads
- dundi lookup
- 0-client_t: null client [Invalid argument] & high CPU usage (Gluster 3.12)
- asterisk sip peer/user matching methodsforauthentication backwards?
- 0-client_t: null client [Invalid argument] & high CPU usage (Gluster 3.12)
- 0-client_t: null client [Invalid argument] & high CPU usage (Gluster 3.12)