Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

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


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
rentorbuy at yahoo.com
Guest





PostPosted: Wed Mar 05, 2008 8:33 am    Post subject: [asterisk-users] Passing variables between two DUNDi/IAX2 pe Reply with quote

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
Back to top
rentorbuy at yahoo.com
Guest





PostPosted: Wed Mar 05, 2008 9:15 am    Post subject: [asterisk-users] Passing variables between two DUNDi/IAX2 pe Reply with quote

--- Vieri <rentorbuy at yahoo.com> wrote:

Quote:
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
Back to top
pchammer at dynx.net
Guest





PostPosted: Wed Mar 05, 2008 9:37 am    Post subject: [asterisk-users] Passing variables between two DUNDi/IAX2 pe Reply with quote

Vieri wrote:
Quote:
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).
Back to top
rentorbuy at yahoo.com
Guest





PostPosted: Wed Mar 05, 2008 12:57 pm    Post subject: [asterisk-users] Passing variables between two DUNDi/IAX2 pe Reply with quote

--- Richard Lyman <pchammer at dynx.net> wrote:

Quote:
Vieri wrote:
Quote:
Hi.

I am trying to pass a variable from one Asterisk
PBX
Quote:
to another.

I'm using DUNDi with IAX2. Is there a way to do
it?
Quote:

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.)
Quote:
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}
Quote:
and DUNDi variable ${DUNDIVAR})
exten =>
_X.,n,Goto(local-extensions,${EXTTODIAL},1)
Quote:

If I try a test call then nothing ever reaches
peer2.
Quote:
However, if I remove #TEST from DUNDIVAR in
dundi-outgoing and
Goto(local-extensions,${EXTEN},1)
Quote:
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
Back to top
craig.a.guy at gmail.com
Guest





PostPosted: Wed Mar 05, 2008 10:22 pm    Post subject: [asterisk-users] Passing variables between two DUNDi/IAX2 pe Reply with quote

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: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] 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 <pchammer at dynx.net> wrote:

Quote:
Vieri wrote:
Quote:
Hi.

I am trying to pass a variable from one Asterisk
PBX
Quote:
to another.

I'm using DUNDi with IAX2. Is there a way to do
it?
Quote:

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.)
Quote:
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}
Quote:
and DUNDi variable ${DUNDIVAR})
exten =>
_X.,n,Goto(local-extensions,${EXTTODIAL},1)
Quote:

If I try a test call then nothing ever reaches
peer2.
Quote:
However, if I remove #TEST from DUNDIVAR in
dundi-outgoing and
Goto(local-extensions,${EXTEN},1)
Quote:
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
Back to top
rentorbuy at yahoo.com
Guest





PostPosted: Thu Mar 06, 2008 12:44 pm    Post subject: [asterisk-users] Passing variables between two DUNDi/IAX2 pe Reply with quote

--- Craig Guy <craig.a.guy at gmail.com> wrote:

Quote:
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.

I'd like to give it a try if you can tell me where to
download it.

I noticed that overloading the EXTEN variable does
actually work but not if I use SIP's regcontext
feature and DUNDi's nopartial option.

I want to take advantage of regcontext but I also need
to pass a variable. Basically, I need to send the
UNIQUEID var to the remote peer for logging purposes
(and maybe other values).

If I use regcontext/nopartial and place a call to
4065^${UNIQUEID}, the asterisk log reports:

Mar 6 18:30:06 DEBUG[10457] pbx_dundi.c: Got
canonical message 13 (0), 96 bytes data
Mar 6 18:30:06 DEBUG[10457] pbx_dundi.c: Got
canonical message 1 (0), 42 bytes data
Mar 6 18:30:06 DEBUG[10457] pbx_dundi.c: Answering
query for '4065^1204824606.83 at priv'!
Mar 6 18:30:06 DEBUG[26691] pbx_dundi.c: Whee,
looking up '4065^1204824606.83 at priv' for
'00:1d:60:39:e9:1b'
Mar 6 18:30:06 DEBUG[26691] pbx_dundi.c: Registering
request for '4065^1204824606.83 at priv' on behalf of
'00:1d:60:39:e9:1b' crc '00000000'
Mar 6 18:30:06 DEBUG[26691] db.c: Unable to find key
'001D6039E91B/4065^1204824606.83/priv/e00000000' in
family 'dundi/cache'
Mar 6 18:30:06 DEBUG[26691] db.c: Unable to find key
'001D6039E91B/4065^1204824606.83/priv/e00000000' in
family 'dundi/cache'
Mar 6 18:30:06 DEBUG[26691] db.c: Unable to find key
'001D6039E91B/4065^1204824606.83/priv/r001D6039E91B'
in family 'dundi/cache'
Mar 6 18:30:06 DEBUG[26691] db.c: Unable to find key
'hint/001D6039E91B/4/priv/e00000000' in family
'dundi/cache'

(...cut to save space...)

Mar 6 18:30:06 DEBUG[26691] db.c: Unable to find key
'hint/001D6039E91B/4065^1204824606.83/priv/e00000000'
in family 'dundi/cache'
Mar 6 18:30:06 DEBUG[26691] db.c: Unable to find key
'hint/001D6039E91B/4065^1204824606.83/priv/e00000000'
in family 'dundi/cache'
Mar 6 18:30:06 DEBUG[26691] db.c: Unable to find key
'hint/001D6039E91B/4065^1204824606.83/priv/r001D6039E91B'
in family 'dundi/cache'
Mar 6 18:30:06 DEBUG[26691] pbx_dundi.c: Avoiding
'00:1d:60:39:e9:1b' in transaction

and it obviously fails because dundi is looking up
4065^1204824606.83 in "regcontext" but it doesn't
exist (4065 is the registered SIP extension).

So unless someone suggests a better solution, I'd be
happy to try out the 1.2 backport of IAXVAR (if you
can find it somewhere).

Thanks!

Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] 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 <pchammer at dynx.net> wrote:

Quote:
Vieri wrote:
Quote:
Hi.

I am trying to pass a variable from one Asterisk
PBX
Quote:
to another.

I'm using DUNDi with IAX2. Is there a way to do
it?
Quote:

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.)
Quote:
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}
Quote:
and DUNDi variable ${DUNDIVAR})
exten =>
_X.,n,Goto(local-extensions,${EXTTODIAL},1)
Quote:

If I try a test call then nothing ever reaches
peer2.
Quote:
However, if I remove #TEST from DUNDIVAR in
dundi-outgoing and
Goto(local-extensions,${EXTEN},1)
Quote:
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
Quote:
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services