[asterisk-users] Passing variables between two DUNDi/IAX2 peers

Vieri rentorbuy at yahoo.com
Wed Mar 5 07:33:39 CST 2008


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 




More information about the asterisk-users mailing list