Use setvar=variablename=value Eg: under [client1] setvar=dialplan=NZ
Then just reference ${dialplan} in your extensions.conf Cheers Andy -->> -----Original Message----- -->> From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- -->> boun...@lists.digium.com] On Behalf Of Michael -->> Sent: 15 December 2008 04:36 -->> To: asterisk-users@lists.digium.com -->> Subject: [asterisk-users] Variables for dial plan -->> -->> I want to have a arbitary named variable within the client's user -->> details in -->> sip.conf -->> -->> [client1] -->> dialplan=NZ -->> .......... -->> -->> In extensions.conf (Logic expressed using PHP style) -->> -->> if ($dialplan == NZ) { -->> $NAT = 0; -->> $INT = 00; -->> }; -->> -->> and in the [outgoing] section -->> -->> ; Australia -->> exten => _${INT}61[278]NXXXXXX.,1,Set(CDR(UserField)=AUSTRALIA) -->> exten => _${INT}61[278]NXXXXXX.,n,Dial(SIP/SIP_PROVIDER/0${EXTEN:4:9}) -->> -->> How can I implement this in Asterisk style? -->> -->> Thanks, -->> -->> Michael -->> -->> _______________________________________________ -->> -- 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