[asterisk-users] dial out with channel variable; sub-string usage

thufir hawat.thufir at gmail.com
Wed Apr 8 18:10:30 CDT 2015


I want to do something like:


exten => _NXXXNxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _Nxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _1NXXNxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _011.,1,Dial(Dial({TOLL}/${EXTEN})
exten => _9NXXXNxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _9Nxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _91NXXNxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _9011.,1,Dial(Dial({TOLL}/${EXTEN})

(adapted from the book)


but don't know where to put those lines.  I have BABY defined as channel 
variable:

BABY = SIP/babytel_out

but that seems circular, somehow.


inbound calls work fine:

[inbound-calls]
  exten => 16046289850,1,Dial(SIP/200)

[local_200]
exten => _9x.,1,Set(CALLERID(all)="Ali Baba" <123456789>)
exten => _9x.,1,Dial(SIP/${EXTEN:1}@babytel_out)
exten => 201,1,Dial(SIP/201)

[local_201]
exten => 200,1,Dial(SIP/200)


in local_200, that just seems suspect.  Yes, dial out, but shouldn't it 
be using BABY?  I don't understand why it's using sub-string with the 1.



thanks,

Thufir



More information about the asterisk-users mailing list