Answer the question
In order to leave comments, you need to log in
Asterisk outbound syntax, how to add 2 or more peers?
Greetings, Comrades!
Help to understand with syntax in extensions.conf. For example, there are 4 numbers, how to add a number search for an outgoing call?
Now everything is done cumbersome and clumsy, i.e. the plan looks like this:
;
; extensions.conf - the Asterisk dial plan
;
[general]
static=yes
writeprotect=no
[globals]
[default]
[phones]
include => local
include => outgoing
[local]
exten => 900,1,Answer()
exten => 900,n,ConfBridge(1,confer)
exten => 900,n,Hangup()
exten => _XXX,1,Dial(SIP/${EXTEN})
exten => _XXX,n,Hangup()
[outgoing]
exten => _XXX.,1,Dial(SIP/${EXTEN}@213137,45,t)
exten => _XXX.,n,Dial(SIP/${EXTEN}@213153,45,t)
exten => _XXX.,n,Dial(SIP/${EXTEN}@213157,45,t)
exten => _XXX.,n,Dial(SIP/${EXTEN}@213158,45,t)
exten => _XXX.,n,Hangup()
Answer the question
In order to leave comments, you need to log in
I suppose this enumeration needs to be done in the form of a macro.
For less clumsiness, request channel status before dialing. If the channel is free, only then call Dial.
Try this, for example:
[outcall]
exten => s,1,NoOp(Selecting channel)
same => 2,ChanIsAvail(SIP/213137&SIP/213153&SIP/213157&SIP/213158,sj)
same => 3,Dial(${AVAILCHAN }/${ARG1},45,t)
same => 4,Hangup
same => 103,Playback(all-circuits-busy-now)
same => n,Hangup
[outgoing]
exten => _XXX.,1,Gosub (outcall,s,1(${EXTEN}))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question