Outbound ESL (Event Socket Library) related question

Victor

New Member
Nov 15, 2024
1
0
1
35
Hi everyone, I am trying to create this flow:
external number calls to my exposed SIP trunk number -> this triggers event on 8084 -> in my code I see incoming call and start another call to arbitrary external number that I take from my database. The flow with internal number works, here is fragment from my Golang code:
conn.OriginateCall(ctx, false, eslgo.Leg{CallURL: "user/1000@mydomain.com"}, eslgo.Leg{CallURL: "&playback(ivr/ivr-to_hear_screaming_monkeys.wav)"}, map[string]string{})

BUT it doesn't work for external number, let say I want to call to +12345678, I already have outbound route for calls bridged to gateway, I have no Idea how to call through this route, I tried this:
conn.OriginateCall(ctx, false, eslgo.Leg{CallURL: "sofia/external/+12345678@mydomain.com"}, eslgo.Leg{CallURL: "&playback(ivr/ivr-to_hear_screaming_monkeys.wav)"}, map[string]string{})

And I tried many more different guests but still without success