case class InboundFSConnection(enableDebugLogs: Boolean)(implicit actorSystem: ActorSystem, actorMaterializer: Materializer, adapterIn: MarkerLoggingAdapter) extends FSConnection with Product with Serializable
- Alphabetic
- By Inheritance
- InboundFSConnection
- Serializable
- Serializable
- Product
- Equals
- FSConnection
- StrictLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new InboundFSConnection(enableDebugLogs: Boolean)(implicit actorSystem: ActorSystem, actorMaterializer: Materializer, adapterIn: MarkerLoggingAdapter)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
implicit
val
adapter: MarkerLoggingAdapter
- Definition Classes
- InboundFSConnection → FSConnection
-
def
answer(config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Answer the call for a channel.This sets up duplex audio between the calling A leg and the FreeSwitch server.
Answer the call for a channel.This sets up duplex audio between the calling A leg and the FreeSwitch server. It is not about other endpoints. The server might need to 'answer' a call to play an audio file or to receive DTMF from the call. Once answered, calls can still be bridged to other extensions. Because a bridge after an answer is actually a transfer, the ringback tones sent to the caller will be defined by transfer_ringback.
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
attXfer(destination: String, conferenceKey: Char = '0', hangupKey: Char = '*', cancelKey: Char = '#', config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
att_xfer <channel_url> Bridge a third party specified by channel_url onto the call, speak privately, then bridge original caller to target channel_url of att_xfer.
att_xfer <channel_url> Bridge a third party specified by channel_url onto the call, speak privately, then bridge original caller to target channel_url of att_xfer.
- destination
: String target channel_url of att_xfer
- conferenceKey
: Char "attxfer_conf_key" - can be used to initiate a three way transfer (deafault '0')
- hangupKey
: Char "attxfer_hangup_key" - can be used to hangup the call after user wants to end his or her call (deafault '*')
- cancelKey
: Char "attxfer_cancel_key" - can be used to cancel a tranfer just like origination_cancel_key, but straight from the att_xfer code (deafault '#')
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
break(config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Cancel an application currently running on the channel.Dialplan execution proceeds to the next application.
Cancel an application currently running on the channel.Dialplan execution proceeds to the next application. Optionally clears all unprocessed events (queued applications) on the channel.
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
bridge(targets: List[String], dialType: DialType, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
To dial multiple contacts all at once: <action application="bridge" data="sofia/internal/1010@sip.yourprovider.com,sofia/sip/1011@sip.yourprovider.com"/> To dial multiple contacts one at a time: <action application="bridge" data="sofia/internal/1010@sip.yourprovider.com|sofia/sip/1011@sip.yourprovider.com"/>
To dial multiple contacts all at once: <action application="bridge" data="sofia/internal/1010@sip.yourprovider.com,sofia/sip/1011@sip.yourprovider.com"/> To dial multiple contacts one at a time: <action application="bridge" data="sofia/internal/1010@sip.yourprovider.com|sofia/sip/1011@sip.yourprovider.com"/>
- targets
:List[String] list of an external SIP address or termination provider
- dialType
: DialType To dial multiple contacts all at once then separate targets by comma(,) or To dial multiple contacts one at a time then separate targets by pipe(|)
- config
:ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
deleteFilter(events: Map[EventName, String], config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
filter delete Specify the events which you want to revoke the filter.
filter delete Specify the events which you want to revoke the filter. filter delete can be used when some filters are applied wrongly or when there is no use of the filter. Usage: filter delete <EventHeader> <ValueToFilter>
- events
:Map[EventName, String] mapping of events and their value
- config
:ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
deleteUUIdFilter(uuid: String, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
filterUUId delete Specify channel UUId to revoke the filter.
filterUUId delete Specify channel UUId to revoke the filter. filter delete can be used when some filters are applied wrongly or when there is no use of the filter. Usage: filter delete <Unique-ID> <uuid>
- uuid
: Channel uuid to filter out
- config
:ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
implicit
lazy val
ec: ExecutionContextExecutor
- Attributes
- protected
- Definition Classes
- FSConnection
-
val
enableDebugLogs: Boolean
- Definition Classes
- InboundFSConnection → FSConnection
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
exit(config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Close the socket connection.
-
def
filter(events: Map[EventName, String], config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
filter Specify event types to listen for.
filter Specify event types to listen for. Note, this is not a filter out but rather a "filter in, " that is, when a filter is applied only the filtered values are received. Multiple filters on a socket connection are allowed. Usage: filter <EventHeader> <ValueToFilter>
- events
: Map[EventName, String] mapping of events and their value
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
filterUUId(uuid: String, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
filterUUId Specify events of specific channel UUId to listen for.
filterUUId Specify events of specific channel UUId to listen for. Note, this is not a filter out but rather a "filter in," that is, when a filter is applied only the filtered values are received. Multiple filters on a socket connection are allowed. Usage: filter <Unique-ID> <uuid>
- uuid
: Channel uuid to filter in
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getConnectionId: String
- Definition Classes
- FSConnection
-
def
getOriginatedCallIds: Set[String]
- Definition Classes
- FSConnection
-
def
handler(): (Future[Done], Source[FSCommand, NotUsed], BidiFlow[ByteString, FSData, FSCommand, ByteString, NotUsed])
handler() function will create pipeline for source and flow
handler() function will create pipeline for source and flow
- returns
(Future[Done], Source[FSCommand, NotUsed], BidiFlow[ByteString, List[FSMessage], FSCommand, ByteString, NotUsed]) triplet of upstream queue completion future, source and flow
- Definition Classes
- FSConnection
-
def
hangup(cause: Option[HangupCause] = Option.empty, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Hangs up a channel, with an optional cause code supplied.
Hangs up a channel, with an optional cause code supplied. Usage: <action application="hangup" data="USER_BUSY"/>
- cause
: HangupCause
- config
:ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
init[FS <: FSConnection, Mat](fsConnectionPromise: Promise[FSSocket[FS]], fsConnection: FS, fun: (Future[FSSocket[FS]]) ⇒ Sink[FSData, Mat], timeout: FiniteDuration, needToLinger: Boolean): Sink[FSData, Future[Mat]]
This function will complete a given promise with Inbound/Outbound FS connection when it receive first command reply from freeswitch else it will timeout after given timeout
This function will complete a given promise with Inbound/Outbound FS connection when it receive first command reply from freeswitch else it will timeout after given timeout
- FS
type of FS connection. it must be type of FSConnection
- fsConnectionPromise
: Promise[FS] promise of FS connection, it will get complete when first success command reply received
- fsConnection
FS type of freeswitch connection
- fun
inject given sink by passing FS connection
- timeout
: FiniteDuration
- returns
Sink[List[T], NotUsed]
- Definition Classes
- FSConnection
-
def
intercept(uuid: String, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Allows one channel to bridge itself to the a or b leg of another call.
Allows one channel to bridge itself to the a or b leg of another call. The remaining leg of the original call gets hungup Usage: intercept [-bleg] <uuid>
- uuid
: String
- config
:ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
kill: Unit
- Definition Classes
- FSConnection
-
def
log(logLevel: String, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Enable log output.
Enable log output. Levels same as the console.conf values
- logLevel
: String
- config
: ApplicationCommandConfig
- Definition Classes
- FSConnection
-
def
logMarker: LogMarker
- Definition Classes
- FSConnection
-
val
logger: Logger
- Attributes
- protected
- Definition Classes
- StrictLogging
-
implicit
val
materializer: Materializer
- Definition Classes
- InboundFSConnection → FSConnection
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
onSendCommand(partialFunction: PartialFunction[FSCommandPublication, Unit]): Unit
- Definition Classes
- FSConnection
-
def
park(config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Places a channel "on hold" in the switch, instead of in the phone.
Places a channel "on hold" in the switch, instead of in the phone. Allows for a number of different options, including: Set caller in a place where the channel won't be hungup on, while waiting for someone to talk to. Generic "hold" mechanism, where you transfer a caller to it. Please note that to retrieve a call that has been "parked", you'll have to bridge to them or transfer the call to a valid location. Also, remember that parking a call does NOT supply music on hold or any other media. Park is quite literally a way to put a call in limbo until you you bridge/uuid_bridge or transfer/uuid_transfer it. Note that the park application takes no arguments, so the data attribute can be omitted in the definition.
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
play(fileName: String, config: ApplicationCommandConfig): Future[CommandResponse]
This will publish the
playcommand to FSThis will publish the
playcommand to FS- fileName
: String name of the play file
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- InboundFSConnection → FSConnection
-
def
preAnswer(config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
pre_answer establishes media (early media) but does not answer.
pre_answer establishes media (early media) but does not answer.
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
publishNonMappingCommand(command: FSCommand): Future[QueueOfferResult]
This function will push a command to source queue and doesn't have any mapping with this command.
This function will push a command to source queue and doesn't have any mapping with this command. It is used to sending
connectorauthcommand- command
: FSCommand
- returns
Future[QueueOfferResult]
- Attributes
- protected
- Definition Classes
- FSConnection
-
lazy val
queue: SourceQueueWithComplete[FSCommand]
- Attributes
- protected[this]
- Definition Classes
- FSConnection
-
def
read(min: Int, max: Int)(soundFile: String, variableName: String, timeout: Duration, terminators: List[Char] = List('#'), config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Read DTMF (touch-tone) digits.
Read DTMF (touch-tone) digits. Usage read <min> <max> <sound file> <variable name> <timeout> <terminators>
- min
Minimum number of digits to fetch.
- max
Maximum number of digits to fetch.
- soundFile
Sound file to play before digits are fetched.
- variableName
Channel variable that digits should be placed in.
- timeout
Number of milliseconds to wait on each digit
- terminators
Digits used to end input if less than <min> digits have been pressed. (Typically '#')
- config
ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
record(filePath: String, timeLimitSecs: Duration, silenceThresh: Duration, silenceHits: Option[Duration] = Option.empty, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Record to a file from the channel's input media stream Record is used to record voice messages, such as in a voicemail system.
Record to a file from the channel's input media stream Record is used to record voice messages, such as in a voicemail system. This application will record to a file specified by <path>. After recording stops the record app sets the following read-only variables:
record_ms — duration of most recently recorded file in milliseconds record_samples — number of recorded samples playback_terminator_used — TouchTone digit used to terminate recording
- filePath
: String An application will record to a file specified by file path.
- timeLimitSecs
: Duration it is the maximum duration of the recording in seconds
- silenceThresh
: Duration it is an energy level below which is considered silence.
- silenceHits
: Duration it is how many seconds of audio below silence_thresh will be tolerated before the recording stops. When omitted, the default value is 3 seconds
- config
:ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
recordSession(filePathWithFormat: String, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Records an entire phone call or session.
Records an entire phone call or session. Multiple media bugs can be placed on the same channel.
- filePathWithFormat
: String file path with format like test.gsm,test.mp3,test.wav,test.ogg etc
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
sendCommand(command: String, eventUuid: String): Future[CommandResponse]
This will publish the string version of FS command to FS
This will publish the string version of FS command to FS
- command
:String
- eventUuid
String
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
sendCommand(command: FSCommand): Future[CommandResponse]
This will publish the FS command(play,transfer,break etc) to FS
This will publish the FS command(play,transfer,break etc) to FS
- command
: FSCommand
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
sendDtmf(dtmfDigits: String, toneDuration: Option[Duration] = Option.empty, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Send DTMF digits from the session using the method(s) configured on the endpoint in use If no duration is specified the default DTMF length of 2000ms will be used.
Send DTMF digits from the session using the method(s) configured on the endpoint in use If no duration is specified the default DTMF length of 2000ms will be used.
- dtmfDigits
: String DTMF digits
- toneDuration
: Option[Duration] default is empty
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
setConnectionId(connId: String): Unit
- Definition Classes
- FSConnection
-
def
setOriginatedCallIds(uuid: String): Unit
- Definition Classes
- FSConnection
-
def
setVar(varName: String, varValue: String, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Set a channel variable for the channel calling the application.
Set a channel variable for the channel calling the application. Usage set <channel_variable>=<value>
- varName
: String variable name
- varValue
: String variable value
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
sleep(numberOfMillis: Duration, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Pause the channel for a given number of milliseconds, consuming the audio for that period of time.
Pause the channel for a given number of milliseconds, consuming the audio for that period of time. Calling sleep also will consume any outstanding RTP on the operating system's input queue, which can be very useful in situations where audio becomes backlogged. To consume DTMFs, use the sleep_eat_digits variable. Usage: <action application="sleep" data=<milliseconds>/>
- numberOfMillis
: Duration duration must be in milliseconds
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
lazy val
source: Publisher[FSCommand]
- Attributes
- protected[this]
- Definition Classes
- FSConnection
-
def
stopRecordSession(filePath: String, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Stop record session.
Stop record session. Usage: <action application="stop_record_session" data="path"/>
- filePath
: String file name
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
def
subscribeEvents(events: EventName*): Future[CommandResponse]
Enable or disable events by class or all (plain or xml or json output format).
Enable or disable events by class or all (plain or xml or json output format). Currently we are supporting plain events
- events
: EventName* specify any number of events
- returns
Future[CommandReply
- Definition Classes
- FSConnection
-
def
subscribeMyEvents(uuid: String = ""): Future[CommandResponse]
Subscribe for
myeventswithuuidThe 'myevents' subscription allows your inbound socket connection to behave like an outbound socket connect.Subscribe for
myeventswithuuidThe 'myevents' subscription allows your inbound socket connection to behave like an outbound socket connect. It will "lock on" to the events for a particular uuid and will ignore all other events, closing the socket when the channel goes away or closing the channel when the socket disconnects and all applications have finished executing. For outbound, no need to send UUID. FS already knows the uuid of call so it automatically uses that- uuid
: String
- returns
Future[CommandReply
- Definition Classes
- FSConnection
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
implicit
val
system: ActorSystem
- Definition Classes
- InboundFSConnection → FSConnection
-
def
transfer(extension: String, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]
Immediately transfer the calling channel to a new context.
Immediately transfer the calling channel to a new context. If there happens to be an xml extension named <destination_number> then control is "warped" directly to that extension. Otherwise it goes through the entire context checking for a match.
- extension
: String extension name
- config
: ApplicationCommandConfig
- returns
Future[CommandResponse]
- Definition Classes
- FSConnection
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.