[Asterisk-Users] RFC Follow Me Find Me script

Jason Adams jadams at sumosystems.net
Tue Mar 14 10:09:25 MST 2006


Andrew,

Don't know if this helps your or not, but it seems like you have one too
many {} in your set statement...
You have: Set($ { DB( forward/${CALLERIDNUM} ) = ${FORWARD} } )
Try: Set(DB(forward/${CALLERIDNUM}=${FORWARD}))

 - Jason
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Andrew
Kirch
Sent: Tuesday, March 14, 2006 11:21 AM
To: trelane at trelane.net; Asterisk Users Mailing List - Non-Commercial
Discussion
Subject: RE: [Asterisk-Users] RFC Follow Me Find Me script

Just poking this topic as it seems to have been ignored.  I still am not
clear as to how/where this script is broken.


If I read this correctly the syntax in column two is the current best
practice for AstDB.  It, unless I've missed something below is what I
have used in my script.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Andrew D
Kirch
Sent: Friday, March 10, 2006 11:19 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] RFC Follow Me Find Me script

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(top posting to follow previous/keep thread sane)

* The applications DBGet and DBPut have been deprecated in favor of
  functions.  Here is a table of their replacements:

  DBGet(foo=family/key)        Set(foo=${DB(family/key)})
  DBPut(family/key=${foo})     Set(DB(family/key)=${foo})

Johann wrote:
> That looks like the dialplan for Asterisk 1.0.x,  The AstDB and other 
> commands have changed in Asterisk 1.2.x(and CVS HEAD).  Check the 
> UPGRADE.txt in the source code directory of Asterisk to get the
details
> on all the changes...
> 
> --johann
> 
> Andrew D Kirch wrote:
> 
>> This is a follow/find me script that I can't quite get to work, 
>> asterisk wont save forward/${calleridnum} to AstDB... any comments or

>> thoughts on how to make this work or change it to work differently
are
>> appreciated.  The voice prompts to go with all playback/background 
>> extensions are commented appropriately.  I hope this code is of use
to
>> some of you and any help with a perfected version is of course 
>> appreciated.
>> [Forward]
>>        exten => s,1,Playback(forward/extension-forwarding)
>>   ;Extension Forwarding
>>        exten => s,2,GotoIf($[${CALLERIDNUM}<300]?s,5)
>>   ;since 1xx is the pattern match for internal extensions anything 
>> less than 300 has to be internal so we already know that that is the 
>> extension they are wanting to forward
>>        exten => s,3,Read(CALLERIDNUM,foward/please-ent-exten,3)
>>    ;if it's not have the user enter their 3 digit enternal extension
>>    ;please enter the extension you want to forward
>>        exten => s,4,SayNumber(${CALLERIDNUM})
>>        exten => s,5,Background(forward/extension-fwd-menu)
>> ;to hear your current extension forward options press 1, to forward 
>> your phone press 2, to cancel your forwarding press 3
>>
>>
>>        exten => 1,1,Set(FORWARD=${DB(forward/${CALLERIDNUM})})
>>        exten => 1,2,NoOp(FORWARD is ${FORWARD})
>>        exten => 1,3,GotoIf($[${FORWARD}>0]?100,3)
>>        exten => 1,4,Playback(forward/your-ext-not-forward)
>>    ;your extension is not currently forwarded
>>        exten => 1,5,Goto(Forward,s,5)
>>    ;back to main menu
>>        exten => 100,1,Playback(forward/your-ext-forward)
>>        exten => 100,2,SayDigits(${FORWARD})
>>    ;your extension is currently forwarded to <extension>
>>        exten => 100,3,Goto(Forward,s,5)
>>   ;back to main menu
>>
>>        exten => 2,1,Read(FORWARD,forward/please-ent-exten)
>>        exten => 2,2,NoOp(FORWARD is ${FORWARD})
>>        exten => 2,3,Set($ { DB( forward/${CALLERIDNUM} ) = ${FORWARD}
} )
>>        exten => 2,4,NoOp(forward/${CALLERIDNUM} is ${ 
>> DB(forward/${CALLERIDNUM} ) } )
>>        exten => 2,5,Playback(forward/your-ext-forward-saved)
>>    ;your extension forward has been saved
>>        exten => 2,6,Goto(Forward,s,5)
>>
>>        exten => 3,1,DBdel(forward/${CALLERIDNUM})
>>        exten => 3,2,PlayBack(forward/exten-forward-cancel)
>>    ; your extension forward has been deleted.
>>        exten => 3,3,Goto(Forward,s,1)
>>
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> Asterisk-Users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users


- --
Andrew D Kirch  |       Abusive Hosts Blocking List      | www.ahbl.org
Security Admin  |  Summit Open Source Development Group  | www.sosdg.org
Key fingerprint = 4106 3338 1F17 1E6F 8FB2  8DFA 1331 7E25 C406 C8D2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEEk+YEzF+JcQGyNIRAg9aAKCS3JcXpuWSVNT/Z25FU2Um3o4TVQCgor0u
48W1AzyAkRr3TCgdHwFxIY8=
=FKb0
-----END PGP SIGNATURE-----
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list