4

im trying to do the simplest outgoing call to a simple phone number with esl. but nothing seems to work

i get incoming events and i can issue different commands (answer,conference) etc. but originate simply doesnt do a thing

most online info has loads of different options that are at the moment unimportant for me. for now i just need to get the call out. i guess i can always add additional options later.

heres the stripped down code (im trying different versions)

SwitchApi("originate", "sofia/external/[email protected]")
SwitchApi("originate", "sofia/external/[email protected]")
SwitchApi("originate", "sofia/external/17181112222")

Function SwitchApi(Command As String, Arg As String) As ESLevent
    Dim esl = FreeSwitch.Api(Command, Arg)
    Return esl
End Function

ive also tried freeswitch.api and freeswitch.bgapi if it makes any difference

all these calls and some others ive tried return something like

-USAGE: <'call url> <'exten>|&<'application_name>(<'app_args>) [<'dialplan>] [<'context>] [<'cid_name>] [<'cid_num>] [<'timeout_sec>]

also they dont even show up in the freeswitch log

any help is greatly appreciated

thanks!

SOLUTION

this is the line that works

SwitchApi("originate", "sofia/gateway/mygateway/1718111222 &park()")

1 Answer 1

2

well, the error message is completely correct: the originate API needs an application to execute on the outbound call. This could be &playback() or &park() or something else.

See some working examples in my scripts on github:

1
  • thanks a million! that was exactly it. im adding the solution to the question (for posterity...)
    – meni
    Jun 24, 2015 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.