Packages

abstract class FSConnection extends StrictLogging

Self Type
FSConnection
Linear Supertypes
StrictLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FSConnection
  2. StrictLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FSConnection()

Abstract Value Members

  1. implicit abstract val adapter: MarkerLoggingAdapter
    Attributes
    protected
  2. abstract def enableDebugLogs: Boolean
  3. implicit abstract val materializer: Materializer
    Attributes
    protected
  4. implicit abstract val system: ActorSystem
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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]

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. 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]

  7. 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]

  8. 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]

  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  10. 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]

  11. 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]

  12. implicit lazy val ec: ExecutionContextExecutor
    Attributes
    protected
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def exit(config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]

    Close the socket connection.

    Close the socket connection.

    config

    : ApplicationCommandConfig

  16. 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]

  17. 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]

  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def getConnectionId: String
  20. def getOriginatedCallIds: Set[String]
  21. 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

  22. 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]

  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. 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]

  25. 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]

  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def kill: Unit
  28. 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

  29. def logMarker: LogMarker
  30. val logger: Logger
    Attributes
    protected
    Definition Classes
    StrictLogging
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. def onSendCommand(partialFunction: PartialFunction[FSCommandPublication, Unit]): Unit
  35. 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]

  36. def play(fileName: String, config: ApplicationCommandConfig = ApplicationCommandConfig()): Future[CommandResponse]

    This will publish the play command to FS

    This will publish the play command to FS

    fileName

    : String name of the play file

    config

    : ApplicationCommandConfig

    returns

    Future[CommandResponse]

  37. 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]

  38. 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 connect or auth command

    command

    : FSCommand

    returns

    Future[QueueOfferResult]

    Attributes
    protected
  39. lazy val queue: SourceQueueWithComplete[FSCommand]
    Attributes
    protected[this]
  40. 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]

  41. 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]

  42. 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]

  43. 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]

  44. 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]

  45. 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]

  46. def setConnectionId(connId: String): Unit
  47. def setOriginatedCallIds(uuid: String): Unit
  48. 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]

  49. 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]

  50. lazy val source: Publisher[FSCommand]
    Attributes
    protected[this]
  51. 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]

  52. 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

  53. def subscribeMyEvents(uuid: String = ""): Future[CommandResponse]

    Subscribe for myevents with uuid The 'myevents' subscription allows your inbound socket connection to behave like an outbound socket connect.

    Subscribe for myevents with uuid The '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

  54. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  55. def toString(): String
    Definition Classes
    AnyRef → Any
  56. 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]

  57. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  59. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. 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.

Inherited from StrictLogging

Inherited from AnyRef

Inherited from Any

Ungrouped