0x19 / goesl

Freeswitch Event Socket Library wrapper for Go
https://godoc.org/github.com/0x19/goesl
MIT License
125 stars 124 forks source link

add sendevent #8

Closed eschmidbauer closed 7 years ago

eschmidbauer commented 7 years ago

noticed it was impossible to send an event via this lib so I added a new function i've tested this patch and it works well, here is example usage:

    var event []string
    event = append(event, "SWITCH_EVENT_MESSAGE_QUERY")
    event = append(event, fmt.Sprintf("VM-sub-call-id: %s", n.CallID))
    event = append(event, fmt.Sprintf("message-account: %s", n.Mailbox))

    err := c.SendEvent(event)