[asterisk-users] Variables for dial plan

Michael michael at networkstuff.co.nz
Sun Dec 14 22:36:02 CST 2008


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



More information about the asterisk-users mailing list