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/1011@mydomain.com")
SwitchApi("originate", "sofia/external/17181112222@mydomain.com")
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()")
meni
  • 53
  • 1
  • 5

1 Answers1

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:

Stanislav Sinyagin
  • 1,973
  • 10
  • 10
  • thanks a million! that was exactly it. im adding the solution to the question (for posterity...) – meni Jun 24 '15 at 09:10