answer via .net esl is getting ignored
Hello everyone This is my first posting via the mailing list I'm trying my hand at freeswitch esl with .net I've managed to get a hold of all incoming events, but can't seem to "pick up the phone" my first goal is to pick up the phone and read out some text via tts I've scoured the web, tried everything I can find or think of but no luck here's my code Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo) FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass") Dim eslEvent = FreeSwitch.SendRecv("event plain ALL") FreeSwitch.SendRecv("event plain DTMF") If eslEvent IsNot Nothing Then AddEvent(eslEvent) While FreeSwitch.Connected eslEvent = FreeSwitch.RecvEvent AddEvent(eslEvent) End While End If End Sub)) End Sub Private Sub AddEvent(e As ESLevent) Dim dd = TextCollection(e.Serialize(""), ": ", vbLf) Dim eventname = dd("event-name") 'Dim uid = dd("Unique-ID") Dim uid = dd("Channel-Call-UUID") If dd("Caller-Network-Addr") <> "" Then Dim dcx = DBEntities() Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid) Dim ChannelState = dd("Channel-State") Dim ChannelCallState = dd("Channel-Call-State").ToLower Select Case eventname Case "CHANNEL_STATE" If ses Is Nothing Then ses = New Session dcx.Sessions.AddObject(ses) End If ses.CallerHost = dd("Caller-Network-Addr") ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name")) ses.CallerPhone = dd("Caller-Caller-ID-Number") ses.CallerUser = dd("Caller-Username") ses.CalleeUser = dd("Caller-Destination-Number") ses.ServerCode = uid If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now Case "CHANNEL_CALLSTATE" If ChannelCallState = "ringing" Then Dim evn = FreeSwitch.Execute("answer", String.Empty, uid) Dim res = evn.Serialize("") End If Case "CHANNEL_DESTROY" If ses IsNot Nothing Then ses.HungUpOn = Now End Select dcx.SaveChanges() End If End Sub the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing please note that I'm unsure which is the correct uuid, but trying both of them gave me identical results As per advise from Nuwan Wijerathne, I put the "answer" action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands. It picks up, and immediately hangs up because it has finished the whole dialplan I'd appreciate your help. I'm pretty new to freeswitch and esl Please advise Sincerely, ymo
What are you seeing in the logs? Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com<mailto:support@nysolutions.com> Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified [cid:image001.jpg@01C72F94.9EE45D60]<http://www.nysolutions.com/> Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Yisroel M. Olewski Sent: Tuesday, December 24, 2013 4:23 AM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] answer via .net esl is getting ignored Hello everyone This is my first posting via the mailing list I'm trying my hand at freeswitch esl with .net I've managed to get a hold of all incoming events, but can't seem to "pick up the phone" my first goal is to pick up the phone and read out some text via tts I've scoured the web, tried everything I can find or think of but no luck here's my code Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo) FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass") Dim eslEvent = FreeSwitch.SendRecv("event plain ALL") FreeSwitch.SendRecv("event plain DTMF") If eslEvent IsNot Nothing Then AddEvent(eslEvent) While FreeSwitch.Connected eslEvent = FreeSwitch.RecvEvent AddEvent(eslEvent) End While End If End Sub)) End Sub Private Sub AddEvent(e As ESLevent) Dim dd = TextCollection(e.Serialize(""), ": ", vbLf) Dim eventname = dd("event-name") 'Dim uid = dd("Unique-ID") Dim uid = dd("Channel-Call-UUID") If dd("Caller-Network-Addr") <> "" Then Dim dcx = DBEntities() Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid) Dim ChannelState = dd("Channel-State") Dim ChannelCallState = dd("Channel-Call-State").ToLower Select Case eventname Case "CHANNEL_STATE" If ses Is Nothing Then ses = New Session dcx.Sessions.AddObject(ses) End If ses.CallerHost = dd("Caller-Network-Addr") ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name")) ses.CallerPhone = dd("Caller-Caller-ID-Number") ses.CallerUser = dd("Caller-Username") ses.CalleeUser = dd("Caller-Destination-Number") ses.ServerCode = uid If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now Case "CHANNEL_CALLSTATE" If ChannelCallState = "ringing" Then Dim evn = FreeSwitch.Execute("answer", String.Empty, uid) Dim res = evn.Serialize("") End If Case "CHANNEL_DESTROY" If ses IsNot Nothing Then ses.HungUpOn = Now End Select dcx.SaveChanges() End If End Sub the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing please note that I'm unsure which is the correct uuid, but trying both of them gave me identical results As per advise from Nuwan Wijerathne, I put the "answer" action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands. It picks up, and immediately hangs up because it has finished the whole dialplan I'd appreciate your help. I'm pretty new to freeswitch and esl Please advise Sincerely, ymo
Try using ESL Outbound mode, I am not sure why it would make a difference, but I have recently used outbound mode and I was able to answer the call. See the mod_event_socket wiki page and the sample code in the managed_esl project for more information. Duvid Rottenberg On Tue, Dec 24, 2013 at 10:47 AM, Moishe Grunstein <max@nysolutions.com>wrote:
What are you seeing in the logs?
Thanks,
Moishe Grunstein
Tornado Computer Systems, Inc.
212.400.7650 888.IPPBX.US *Service Request Email: support@nysolutions.com <support@nysolutions.com> *
Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified
[image: cid:image001.jpg@01C72F94.9EE45D60] <http://www.nysolutions.com/>
Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Yisroel M. Olewski *Sent:* Tuesday, December 24, 2013 4:23 AM *To:* freeswitch-users@lists.freeswitch.org *Subject:* [Freeswitch-users] answer via .net esl is getting ignored
Hello everyone
This is my first posting via the mailing list
I’m trying my hand at freeswitch esl with .net
I’ve managed to get a hold of all incoming events, but can’t seem to "pick up the phone"
my first goal is to pick up the phone and read out some text via tts
I’ve scoured the web, tried everything I can find or think of but no luck
here’s my code
Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo)
FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass")
Dim eslEvent = FreeSwitch.SendRecv("event plain ALL")
FreeSwitch.SendRecv("event plain DTMF")
If eslEvent IsNot Nothing Then
AddEvent(eslEvent)
While FreeSwitch.Connected
eslEvent = FreeSwitch.RecvEvent
AddEvent(eslEvent)
End While
End If
End Sub))
End Sub
Private Sub AddEvent(e As ESLevent)
Dim dd = TextCollection(e.Serialize(""), ": ", vbLf)
Dim eventname = dd("event-name")
'Dim uid = dd("Unique-ID")
Dim uid = dd("Channel-Call-UUID")
If dd("Caller-Network-Addr") <> "" Then
Dim dcx = DBEntities()
Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid)
Dim ChannelState = dd("Channel-State")
Dim ChannelCallState = dd("Channel-Call-State").ToLower
Select Case eventname
Case "CHANNEL_STATE"
If ses Is Nothing Then
ses = New Session
dcx.Sessions.AddObject(ses)
End If
ses.CallerHost = dd("Caller-Network-Addr")
ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name"))
ses.CallerPhone = dd("Caller-Caller-ID-Number")
ses.CallerUser = dd("Caller-Username")
ses.CalleeUser = dd("Caller-Destination-Number")
ses.ServerCode = uid
If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now
Case "CHANNEL_CALLSTATE"
If ChannelCallState = "ringing" Then
Dim evn = FreeSwitch.Execute("answer", String.Empty, uid)
Dim res = evn.Serialize("")
End If
Case "CHANNEL_DESTROY"
If ses IsNot Nothing Then ses.HungUpOn = Now
End Select
dcx.SaveChanges()
End If
End Sub
the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing
please note that I’m unsure which is the correct uuid, but trying both of them gave me identical results
As per advise from Nuwan Wijerathne, I put the “answer” action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands.
It picks up, and immediately hangs up because it has finished the whole dialplan
I’d appreciate your help. I’m pretty new to freeswitch and esl
Please advise
*Sincerely,*
*ymo*
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Thanks fellows Sorry for the delay, we were a bit busy here lately I'm attaching the fs log. I don't even see a the word "answer" there. It seems fs is totally ignoring the incoming commands if there's a way to use inbound (which should be according to the docs) I'd rather not switch around the whole architecture just right now If there won't be any other choice, I guess I'll try that Thank again Sincerely, Yisroel M. Olewski CEO +1 (718) 514-2721 +972 (52) 764-9971 Websites . CRM . ERP . Telephony . Inventory . Content Management From: Duvid Rottenberg [mailto:adrottenberg@gmail.com] Sent: Tuesday, December 24, 2013 8:51 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] answer via .net esl is getting ignored Try using ESL Outbound mode, I am not sure why it would make a difference, but I have recently used outbound mode and I was able to answer the call. See the mod_event_socket wiki page and the sample code in the managed_esl project for more information. Duvid Rottenberg On Tue, Dec 24, 2013 at 10:47 AM, Moishe Grunstein <max@nysolutions.com> wrote: What are you seeing in the logs? Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified <http://www.nysolutions.com/> cid:image001.jpg@01C72F94.9EE45D60 Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Yisroel M. Olewski Sent: Tuesday, December 24, 2013 4:23 AM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] answer via .net esl is getting ignored Hello everyone This is my first posting via the mailing list I'm trying my hand at freeswitch esl with .net I've managed to get a hold of all incoming events, but can't seem to "pick up the phone" my first goal is to pick up the phone and read out some text via tts I've scoured the web, tried everything I can find or think of but no luck here's my code Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo) FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass") Dim eslEvent = FreeSwitch.SendRecv("event plain ALL") FreeSwitch.SendRecv("event plain DTMF") If eslEvent IsNot Nothing Then AddEvent(eslEvent) While FreeSwitch.Connected eslEvent = FreeSwitch.RecvEvent AddEvent(eslEvent) End While End If End Sub)) End Sub Private Sub AddEvent(e As ESLevent) Dim dd = TextCollection(e.Serialize(""), ": ", vbLf) Dim eventname = dd("event-name") 'Dim uid = dd("Unique-ID") Dim uid = dd("Channel-Call-UUID") If dd("Caller-Network-Addr") <> "" Then Dim dcx = DBEntities() Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid) Dim ChannelState = dd("Channel-State") Dim ChannelCallState = dd("Channel-Call-State").ToLower Select Case eventname Case "CHANNEL_STATE" If ses Is Nothing Then ses = New Session dcx.Sessions.AddObject(ses) End If ses.CallerHost = dd("Caller-Network-Addr") ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name")) ses.CallerPhone = dd("Caller-Caller-ID-Number") ses.CallerUser = dd("Caller-Username") ses.CalleeUser = dd("Caller-Destination-Number") ses.ServerCode = uid If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now Case "CHANNEL_CALLSTATE" If ChannelCallState = "ringing" Then Dim evn = FreeSwitch.Execute("answer", String.Empty, uid) Dim res = evn.Serialize("") End If Case "CHANNEL_DESTROY" If ses IsNot Nothing Then ses.HungUpOn = Now End Select dcx.SaveChanges() End If End Sub the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing please note that I'm unsure which is the correct uuid, but trying both of them gave me identical results As per advise from Nuwan Wijerathne, I put the "answer" action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands. It picks up, and immediately hangs up because it has finished the whole dialplan I'd appreciate your help. I'm pretty new to freeswitch and esl Please advise Sincerely, ymo _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
If you are trying to handle incoming calls you probably will have to use outbound socket, otherwise Freeswitch will finish running the dialplan and hangup before your ESL client has a chance to send it any commands. As you can see from the log there are no dialplan matches found so FS responds with a 480. When using outbound mode you put the socket app in the dialplan so that FS knows to hand over the call handling to your ESL client. On Thu, Dec 26, 2013 at 7:15 AM, Yisroel M. Olewski <yisroel@machshevet.com>wrote:
Hi
Thanks fellows
Sorry for the delay, we were a bit busy here lately
I’m attaching the fs log. I don’t even see a the word “answer” there.
It seems fs is totally ignoring the incoming commands
if there’s a way to use inbound (which should be according to the docs) I’d rather not switch around the whole architecture just right now
If there won’t be any other choice, I guess I’ll try that
Thank again
*Sincerely,*
*Yisroel M. Olewski *
*CEO*
+1 (718) 514-2721
+972 (52) 764-9971
*Websites **·** CRM **·** ERP **·** Telephony **·** Inventory **·** Content Management*
*From:* Duvid Rottenberg [mailto:adrottenberg@gmail.com] *Sent:* Tuesday, December 24, 2013 8:51 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] answer via .net esl is getting ignored
Try using ESL Outbound mode, I am not sure why it would make a difference, but I have recently used outbound mode and I was able to answer the call. See the mod_event_socket wiki page and the sample code in the managed_esl project for more information.
Duvid Rottenberg
On Tue, Dec 24, 2013 at 10:47 AM, Moishe Grunstein <max@nysolutions.com> wrote:
What are you seeing in the logs?
Thanks,
Moishe Grunstein
Tornado Computer Systems, Inc.
212.400.7650 888.IPPBX.US *Service Request Email: support@nysolutions.com <support@nysolutions.com> *
Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified
[image: cid:image001.jpg@01C72F94.9EE45D60] <http://www.nysolutions.com/>
Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Yisroel M. Olewski *Sent:* Tuesday, December 24, 2013 4:23 AM *To:* freeswitch-users@lists.freeswitch.org *Subject:* [Freeswitch-users] answer via .net esl is getting ignored
Hello everyone
This is my first posting via the mailing list
I’m trying my hand at freeswitch esl with .net
I’ve managed to get a hold of all incoming events, but can’t seem to "pick up the phone"
my first goal is to pick up the phone and read out some text via tts
I’ve scoured the web, tried everything I can find or think of but no luck
here’s my code
Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo)
FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass")
Dim eslEvent = FreeSwitch.SendRecv("event plain ALL")
FreeSwitch.SendRecv("event plain DTMF")
If eslEvent IsNot Nothing Then
AddEvent(eslEvent)
While FreeSwitch.Connected
eslEvent = FreeSwitch.RecvEvent
AddEvent(eslEvent)
End While
End If
End Sub))
End Sub
Private Sub AddEvent(e As ESLevent)
Dim dd = TextCollection(e.Serialize(""), ": ", vbLf)
Dim eventname = dd("event-name")
'Dim uid = dd("Unique-ID")
Dim uid = dd("Channel-Call-UUID")
If dd("Caller-Network-Addr") <> "" Then
Dim dcx = DBEntities()
Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid)
Dim ChannelState = dd("Channel-State")
Dim ChannelCallState = dd("Channel-Call-State").ToLower
Select Case eventname
Case "CHANNEL_STATE"
If ses Is Nothing Then
ses = New Session
dcx.Sessions.AddObject(ses)
End If
ses.CallerHost = dd("Caller-Network-Addr")
ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name"))
ses.CallerPhone = dd("Caller-Caller-ID-Number")
ses.CallerUser = dd("Caller-Username")
ses.CalleeUser = dd("Caller-Destination-Number")
ses.ServerCode = uid
If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now
Case "CHANNEL_CALLSTATE"
If ChannelCallState = "ringing" Then
Dim evn = FreeSwitch.Execute("answer", String.Empty, uid)
Dim res = evn.Serialize("")
End If
Case "CHANNEL_DESTROY"
If ses IsNot Nothing Then ses.HungUpOn = Now
End Select
dcx.SaveChanges()
End If
End Sub
the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing
please note that I’m unsure which is the correct uuid, but trying both of them gave me identical results
As per advise from Nuwan Wijerathne, I put the “answer” action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands.
It picks up, and immediately hangs up because it has finished the whole dialplan
I’d appreciate your help. I’m pretty new to freeswitch and esl
Please advise
*Sincerely,*
*ymo*
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
From http://lists.freeswitch.org/pipermail/freeswitch-users/2011-October/077209.h tml "if you want to control an incoming call (a call that hits an extension managed by freeswitch) you'll be better served by using a socket outbound connection. Off course this is from a design perspective, not because there are limitations when using an inbound connection." Is he wrong? Is there any documentation this way or the other? Changing to outbound is really a last resort, as this would disallow me to just connect to any arbitrary freeswitch instance at will But rather requires freeswitch having precise knowledge of my application While im considering outbound, I see that I have in my event_socket file: <configuration name="event_socket.conf" description="Socket Client"> <settings> <param name="nat-map" value="false"/> <param name="listen-ip" value="0.0.0.0"/> <param name="listen-port" value="8021"/> <param name="password" value="mypass"/> <!-- <param name="apply-inbound-acl" value="lan"/> --> </settings> </configuration> Could this be confusing freeswitch to think I'm using outbound? Thanks! Sincerely, Yisroel M. Olewski CEO +1 (718) 514-2721 +972 (52) 764-9971 Websites . CRM . ERP . Telephony . Inventory . Content Management From: Duvid Rottenberg [mailto:adrottenberg@gmail.com] Sent: Thursday, December 26, 2013 4:50 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] answer via .net esl is getting ignored If you are trying to handle incoming calls you probably will have to use outbound socket, otherwise Freeswitch will finish running the dialplan and hangup before your ESL client has a chance to send it any commands. As you can see from the log there are no dialplan matches found so FS responds with a 480. When using outbound mode you put the socket app in the dialplan so that FS knows to hand over the call handling to your ESL client. On Thu, Dec 26, 2013 at 7:15 AM, Yisroel M. Olewski <yisroel@machshevet.com> wrote: Hi Thanks fellows Sorry for the delay, we were a bit busy here lately I'm attaching the fs log. I don't even see a the word "answer" there. It seems fs is totally ignoring the incoming commands if there's a way to use inbound (which should be according to the docs) I'd rather not switch around the whole architecture just right now If there won't be any other choice, I guess I'll try that Thank again Sincerely, Yisroel M. Olewski CEO +1 (718) 514-2721 <tel:%2B1%20%28718%29%20514-2721> +972 (52) 764-9971 <tel:%2B972%20%2852%29%20764-9971> Websites . CRM . ERP . Telephony . Inventory . Content Management From: Duvid Rottenberg [mailto:adrottenberg@gmail.com] Sent: Tuesday, December 24, 2013 8:51 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] answer via .net esl is getting ignored Try using ESL Outbound mode, I am not sure why it would make a difference, but I have recently used outbound mode and I was able to answer the call. See the mod_event_socket wiki page and the sample code in the managed_esl project for more information. Duvid Rottenberg On Tue, Dec 24, 2013 at 10:47 AM, Moishe Grunstein <max@nysolutions.com> wrote: What are you seeing in the logs? Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified <http://www.nysolutions.com/> cid:image001.jpg@01C72F94.9EE45D60 Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Yisroel M. Olewski Sent: Tuesday, December 24, 2013 4:23 AM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] answer via .net esl is getting ignored Hello everyone This is my first posting via the mailing list I'm trying my hand at freeswitch esl with .net I've managed to get a hold of all incoming events, but can't seem to "pick up the phone" my first goal is to pick up the phone and read out some text via tts I've scoured the web, tried everything I can find or think of but no luck here's my code Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo) FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass") Dim eslEvent = FreeSwitch.SendRecv("event plain ALL") FreeSwitch.SendRecv("event plain DTMF") If eslEvent IsNot Nothing Then AddEvent(eslEvent) While FreeSwitch.Connected eslEvent = FreeSwitch.RecvEvent AddEvent(eslEvent) End While End If End Sub)) End Sub Private Sub AddEvent(e As ESLevent) Dim dd = TextCollection(e.Serialize(""), ": ", vbLf) Dim eventname = dd("event-name") 'Dim uid = dd("Unique-ID") Dim uid = dd("Channel-Call-UUID") If dd("Caller-Network-Addr") <> "" Then Dim dcx = DBEntities() Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid) Dim ChannelState = dd("Channel-State") Dim ChannelCallState = dd("Channel-Call-State").ToLower Select Case eventname Case "CHANNEL_STATE" If ses Is Nothing Then ses = New Session dcx.Sessions.AddObject(ses) End If ses.CallerHost = dd("Caller-Network-Addr") ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name")) ses.CallerPhone = dd("Caller-Caller-ID-Number") ses.CallerUser = dd("Caller-Username") ses.CalleeUser = dd("Caller-Destination-Number") ses.ServerCode = uid If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now Case "CHANNEL_CALLSTATE" If ChannelCallState = "ringing" Then Dim evn = FreeSwitch.Execute("answer", String.Empty, uid) Dim res = evn.Serialize("") End If Case "CHANNEL_DESTROY" If ses IsNot Nothing Then ses.HungUpOn = Now End Select dcx.SaveChanges() End If End Sub the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing please note that I'm unsure which is the correct uuid, but trying both of them gave me identical results As per advise from Nuwan Wijerathne, I put the "answer" action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands. It picks up, and immediately hangs up because it has finished the whole dialplan I'd appreciate your help. I'm pretty new to freeswitch and esl Please advise Sincerely, ymo _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Inbound works as well. But you need to add the park application in the dialplan, so it won't exit too early. The park applications just places the call inside a loop, to let you do whatever you want to from ESL. 2013/12/27 Yisroel M. Olewski <yisroel@machshevet.com>
From http://lists.freeswitch.org/pipermail/freeswitch-users/2011-October/077209.h...
“if you want to control an incoming call (a call that hits an extension managed by freeswitch) you'll be better served by using a socket outbound connection. Off course this is from a design perspective, not because there are limitations when using an inbound connection.”
Is he wrong?
Is there any documentation this way or the other?
Changing to outbound is really a last resort, as this would disallow me to just connect to any arbitrary freeswitch instance at will
But rather requires freeswitch having precise knowledge of my application
While im considering outbound, I see that I have in my event_socket file:
<configuration name="event_socket.conf" description="Socket Client">
<settings>
<param name="nat-map" value="false"/>
<param name="listen-ip" value="0.0.0.0"/>
<param name="listen-port" value="8021"/>
<param name="password" value="mypass"/>
<!-- <param name="apply-inbound-acl" value="lan"/> -->
</settings>
</configuration>
Could this be confusing freeswitch to think I’m using outbound?
Thanks!
*Sincerely,*
*Yisroel M. Olewski *
*CEO*
+1 (718) 514-2721
+972 (52) 764-9971
*Websites **·** CRM **·** ERP **·** Telephony **·** Inventory **·** Content Management*
*From:* Duvid Rottenberg [mailto:adrottenberg@gmail.com] *Sent:* Thursday, December 26, 2013 4:50 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] answer via .net esl is getting ignored
If you are trying to handle incoming calls you probably will have to use outbound socket, otherwise Freeswitch will finish running the dialplan and hangup before your ESL client has a chance to send it any commands. As you can see from the log there are no dialplan matches found so FS responds with a 480. When using outbound mode you put the socket app in the dialplan so that FS knows to hand over the call handling to your ESL client.
On Thu, Dec 26, 2013 at 7:15 AM, Yisroel M. Olewski < yisroel@machshevet.com> wrote:
Hi
Thanks fellows
Sorry for the delay, we were a bit busy here lately
I’m attaching the fs log. I don’t even see a the word “answer” there.
It seems fs is totally ignoring the incoming commands
if there’s a way to use inbound (which should be according to the docs) I’d rather not switch around the whole architecture just right now
If there won’t be any other choice, I guess I’ll try that
Thank again
*Sincerely,*
*Yisroel M. Olewski *
*CEO*
+1 (718) 514-2721
+972 (52) 764-9971
*Websites · CRM · ERP · Telephony · Inventory · Content Management*
*From:* Duvid Rottenberg [mailto:adrottenberg@gmail.com] *Sent:* Tuesday, December 24, 2013 8:51 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] answer via .net esl is getting ignored
Try using ESL Outbound mode, I am not sure why it would make a difference, but I have recently used outbound mode and I was able to answer the call. See the mod_event_socket wiki page and the sample code in the managed_esl project for more information.
Duvid Rottenberg
On Tue, Dec 24, 2013 at 10:47 AM, Moishe Grunstein <max@nysolutions.com> wrote:
What are you seeing in the logs?
Thanks,
Moishe Grunstein
Tornado Computer Systems, Inc.
212.400.7650 888.IPPBX.US *Service Request Email: support@nysolutions.com <support@nysolutions.com> *
Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified
[image: cid:image001.jpg@01C72F94.9EE45D60] <http://www.nysolutions.com/>
Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Yisroel M. Olewski *Sent:* Tuesday, December 24, 2013 4:23 AM *To:* freeswitch-users@lists.freeswitch.org *Subject:* [Freeswitch-users] answer via .net esl is getting ignored
Hello everyone
This is my first posting via the mailing list
I’m trying my hand at freeswitch esl with .net
I’ve managed to get a hold of all incoming events, but can’t seem to "pick up the phone"
my first goal is to pick up the phone and read out some text via tts
I’ve scoured the web, tried everything I can find or think of but no luck
here’s my code
Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo)
FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass")
Dim eslEvent = FreeSwitch.SendRecv("event plain ALL")
FreeSwitch.SendRecv("event plain DTMF")
If eslEvent IsNot Nothing Then
AddEvent(eslEvent)
While FreeSwitch.Connected
eslEvent = FreeSwitch.RecvEvent
AddEvent(eslEvent)
End While
End If
End Sub))
End Sub
Private Sub AddEvent(e As ESLevent)
Dim dd = TextCollection(e.Serialize(""), ": ", vbLf)
Dim eventname = dd("event-name")
'Dim uid = dd("Unique-ID")
Dim uid = dd("Channel-Call-UUID")
If dd("Caller-Network-Addr") <> "" Then
Dim dcx = DBEntities()
Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid)
Dim ChannelState = dd("Channel-State")
Dim ChannelCallState = dd("Channel-Call-State").ToLower
Select Case eventname
Case "CHANNEL_STATE"
If ses Is Nothing Then
ses = New Session
dcx.Sessions.AddObject(ses)
End If
ses.CallerHost = dd("Caller-Network-Addr")
ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name"))
ses.CallerPhone = dd("Caller-Caller-ID-Number")
ses.CallerUser = dd("Caller-Username")
ses.CalleeUser = dd("Caller-Destination-Number")
ses.ServerCode = uid
If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now
Case "CHANNEL_CALLSTATE"
If ChannelCallState = "ringing" Then
Dim evn = FreeSwitch.Execute("answer", String.Empty, uid)
Dim res = evn.Serialize("")
End If
Case "CHANNEL_DESTROY"
If ses IsNot Nothing Then ses.HungUpOn = Now
End Select
dcx.SaveChanges()
End If
End Sub
the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing
please note that I’m unsure which is the correct uuid, but trying both of them gave me identical results
As per advise from Nuwan Wijerathne, I put the “answer” action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands.
It picks up, and immediately hangs up because it has finished the whole dialplan
I’d appreciate your help. I’m pretty new to freeswitch and esl
Please advise
*Sincerely,*
*ymo*
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
You are right. I tried this now and it works. I believe the root of your problem is that the dialplan finished executing before your ESL client could respond. By parking the call you avoid that. On Fri, Dec 27, 2013 at 11:09 AM, Peter Olsson <peter@olssononline.se>wrote:
Inbound works as well. But you need to add the park application in the dialplan, so it won't exit too early.
The park applications just places the call inside a loop, to let you do whatever you want to from ESL.
2013/12/27 Yisroel M. Olewski <yisroel@machshevet.com>
From
http://lists.freeswitch.org/pipermail/freeswitch-users/2011-October/077209.h...
“if you want to control an incoming call (a call that hits an extension managed by freeswitch) you'll be better served by using a socket outbound connection. Off course this is from a design perspective, not because there are limitations when using an inbound connection.”
Is he wrong?
Is there any documentation this way or the other?
Changing to outbound is really a last resort, as this would disallow me to just connect to any arbitrary freeswitch instance at will
But rather requires freeswitch having precise knowledge of my application
While im considering outbound, I see that I have in my event_socket file:
<configuration name="event_socket.conf" description="Socket Client">
<settings>
<param name="nat-map" value="false"/>
<param name="listen-ip" value="0.0.0.0"/>
<param name="listen-port" value="8021"/>
<param name="password" value="mypass"/>
<!-- <param name="apply-inbound-acl" value="lan"/> -->
</settings>
</configuration>
Could this be confusing freeswitch to think I’m using outbound?
Thanks!
*Sincerely,*
*Yisroel M. Olewski *
*CEO*
+1 (718) 514-2721
+972 (52) 764-9971
*Websites **·** CRM **·** ERP **·** Telephony **·** Inventory **·** Content Management*
*From:* Duvid Rottenberg [mailto:adrottenberg@gmail.com] *Sent:* Thursday, December 26, 2013 4:50 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] answer via .net esl is getting ignored
If you are trying to handle incoming calls you probably will have to use outbound socket, otherwise Freeswitch will finish running the dialplan and hangup before your ESL client has a chance to send it any commands. As you can see from the log there are no dialplan matches found so FS responds with a 480. When using outbound mode you put the socket app in the dialplan so that FS knows to hand over the call handling to your ESL client.
On Thu, Dec 26, 2013 at 7:15 AM, Yisroel M. Olewski < yisroel@machshevet.com> wrote:
Hi
Thanks fellows
Sorry for the delay, we were a bit busy here lately
I’m attaching the fs log. I don’t even see a the word “answer” there.
It seems fs is totally ignoring the incoming commands
if there’s a way to use inbound (which should be according to the docs) I’d rather not switch around the whole architecture just right now
If there won’t be any other choice, I guess I’ll try that
Thank again
*Sincerely,*
*Yisroel M. Olewski *
*CEO*
+1 (718) 514-2721
+972 (52) 764-9971
*Websites · CRM · ERP · Telephony · Inventory · Content Management*
*From:* Duvid Rottenberg [mailto:adrottenberg@gmail.com] *Sent:* Tuesday, December 24, 2013 8:51 PM *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] answer via .net esl is getting ignored
Try using ESL Outbound mode, I am not sure why it would make a difference, but I have recently used outbound mode and I was able to answer the call. See the mod_event_socket wiki page and the sample code in the managed_esl project for more information.
Duvid Rottenberg
On Tue, Dec 24, 2013 at 10:47 AM, Moishe Grunstein <max@nysolutions.com> wrote:
What are you seeing in the logs?
Thanks,
Moishe Grunstein
Tornado Computer Systems, Inc.
212.400.7650 888.IPPBX.US *Service Request Email: support@nysolutions.com <support@nysolutions.com> *
Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified
[image: cid:image001.jpg@01C72F94.9EE45D60] <http://www.nysolutions.com/>
Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Yisroel M. Olewski *Sent:* Tuesday, December 24, 2013 4:23 AM *To:* freeswitch-users@lists.freeswitch.org *Subject:* [Freeswitch-users] answer via .net esl is getting ignored
Hello everyone
This is my first posting via the mailing list
I’m trying my hand at freeswitch esl with .net
I’ve managed to get a hold of all incoming events, but can’t seem to "pick up the phone"
my first goal is to pick up the phone and read out some text via tts
I’ve scoured the web, tried everything I can find or think of but no luck
here’s my code
Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo)
FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass")
Dim eslEvent = FreeSwitch.SendRecv("event plain ALL")
FreeSwitch.SendRecv("event plain DTMF")
If eslEvent IsNot Nothing Then
AddEvent(eslEvent)
While FreeSwitch.Connected
eslEvent = FreeSwitch.RecvEvent
AddEvent(eslEvent)
End While
End If
End Sub))
End Sub
Private Sub AddEvent(e As ESLevent)
Dim dd = TextCollection(e.Serialize(""), ": ", vbLf)
Dim eventname = dd("event-name")
'Dim uid = dd("Unique-ID")
Dim uid = dd("Channel-Call-UUID")
If dd("Caller-Network-Addr") <> "" Then
Dim dcx = DBEntities()
Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid)
Dim ChannelState = dd("Channel-State")
Dim ChannelCallState = dd("Channel-Call-State").ToLower
Select Case eventname
Case "CHANNEL_STATE"
If ses Is Nothing Then
ses = New Session
dcx.Sessions.AddObject(ses)
End If
ses.CallerHost = dd("Caller-Network-Addr")
ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name"))
ses.CallerPhone = dd("Caller-Caller-ID-Number")
ses.CallerUser = dd("Caller-Username")
ses.CalleeUser = dd("Caller-Destination-Number")
ses.ServerCode = uid
If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now
Case "CHANNEL_CALLSTATE"
If ChannelCallState = "ringing" Then
Dim evn = FreeSwitch.Execute("answer", String.Empty, uid)
Dim res = evn.Serialize("")
End If
Case "CHANNEL_DESTROY"
If ses IsNot Nothing Then ses.HungUpOn = Now
End Select
dcx.SaveChanges()
End If
End Sub
the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing
please note that I’m unsure which is the correct uuid, but trying both of them gave me identical results
As per advise from Nuwan Wijerathne, I put the “answer” action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands.
It picks up, and immediately hangs up because it has finished the whole dialplan
I’d appreciate your help. I’m pretty new to freeswitch and esl
Please advise
*Sincerely,*
*ymo*
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks!!! That did the trick!! It now works perfectly I appreciate your help, and thanks for all the poster and guides God bless ye all! Sincerely, Yisroel M. Olewski CEO +1 (718) 514-2721 +972 (52) 764-9971 Websites . CRM . ERP . Telephony . Inventory . Content Management From: Peter Olsson [mailto:peter@olssononline.se] Sent: Friday, December 27, 2013 6:10 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] answer via .net esl is getting ignored Inbound works as well. But you need to add the park application in the dialplan, so it won't exit too early. The park applications just places the call inside a loop, to let you do whatever you want to from ESL. 2013/12/27 Yisroel M. Olewski <yisroel@machshevet.com> From http://lists.freeswitch.org/pipermail/freeswitch-users/2011-October/077209.h tml "if you want to control an incoming call (a call that hits an extension managed by freeswitch) you'll be better served by using a socket outbound connection. Off course this is from a design perspective, not because there are limitations when using an inbound connection." Is he wrong? Is there any documentation this way or the other? Changing to outbound is really a last resort, as this would disallow me to just connect to any arbitrary freeswitch instance at will But rather requires freeswitch having precise knowledge of my application While im considering outbound, I see that I have in my event_socket file: <configuration name="event_socket.conf" description="Socket Client"> <settings> <param name="nat-map" value="false"/> <param name="listen-ip" value="0.0.0.0"/> <param name="listen-port" value="8021"/> <param name="password" value="mypass"/> <!-- <param name="apply-inbound-acl" value="lan"/> --> </settings> </configuration> Could this be confusing freeswitch to think I'm using outbound? Thanks! Sincerely, Yisroel M. Olewski CEO +1 (718) 514-2721 <tel:%2B1%20%28718%29%20514-2721> +972 (52) 764-9971 <tel:%2B972%20%2852%29%20764-9971> Websites . CRM . ERP . Telephony . Inventory . Content Management From: Duvid Rottenberg [mailto:adrottenberg@gmail.com] Sent: Thursday, December 26, 2013 4:50 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] answer via .net esl is getting ignored If you are trying to handle incoming calls you probably will have to use outbound socket, otherwise Freeswitch will finish running the dialplan and hangup before your ESL client has a chance to send it any commands. As you can see from the log there are no dialplan matches found so FS responds with a 480. When using outbound mode you put the socket app in the dialplan so that FS knows to hand over the call handling to your ESL client. On Thu, Dec 26, 2013 at 7:15 AM, Yisroel M. Olewski <yisroel@machshevet.com> wrote: Hi Thanks fellows Sorry for the delay, we were a bit busy here lately I'm attaching the fs log. I don't even see a the word "answer" there. It seems fs is totally ignoring the incoming commands if there's a way to use inbound (which should be according to the docs) I'd rather not switch around the whole architecture just right now If there won't be any other choice, I guess I'll try that Thank again Sincerely, Yisroel M. Olewski CEO +1 (718) 514-2721 <tel:%2B1%20%28718%29%20514-2721> +972 (52) 764-9971 <tel:%2B972%20%2852%29%20764-9971> Websites . CRM . ERP . Telephony . Inventory . Content Management From: Duvid Rottenberg [mailto:adrottenberg@gmail.com] Sent: Tuesday, December 24, 2013 8:51 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] answer via .net esl is getting ignored Try using ESL Outbound mode, I am not sure why it would make a difference, but I have recently used outbound mode and I was able to answer the call. See the mod_event_socket wiki page and the sample code in the managed_esl project for more information. Duvid Rottenberg On Tue, Dec 24, 2013 at 10:47 AM, Moishe Grunstein <max@nysolutions.com> wrote: What are you seeing in the logs? Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified <http://www.nysolutions.com/> cid:image001.jpg@01C72F94.9EE45D60 Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Yisroel M. Olewski Sent: Tuesday, December 24, 2013 4:23 AM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] answer via .net esl is getting ignored Hello everyone This is my first posting via the mailing list I'm trying my hand at freeswitch esl with .net I've managed to get a hold of all incoming events, but can't seem to "pick up the phone" my first goal is to pick up the phone and read out some text via tts I've scoured the web, tried everything I can find or think of but no luck here's my code Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo) FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass") Dim eslEvent = FreeSwitch.SendRecv("event plain ALL") FreeSwitch.SendRecv("event plain DTMF") If eslEvent IsNot Nothing Then AddEvent(eslEvent) While FreeSwitch.Connected eslEvent = FreeSwitch.RecvEvent AddEvent(eslEvent) End While End If End Sub)) End Sub Private Sub AddEvent(e As ESLevent) Dim dd = TextCollection(e.Serialize(""), ": ", vbLf) Dim eventname = dd("event-name") 'Dim uid = dd("Unique-ID") Dim uid = dd("Channel-Call-UUID") If dd("Caller-Network-Addr") <> "" Then Dim dcx = DBEntities() Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid) Dim ChannelState = dd("Channel-State") Dim ChannelCallState = dd("Channel-Call-State").ToLower Select Case eventname Case "CHANNEL_STATE" If ses Is Nothing Then ses = New Session dcx.Sessions.AddObject(ses) End If ses.CallerHost = dd("Caller-Network-Addr") ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name")) ses.CallerPhone = dd("Caller-Caller-ID-Number") ses.CallerUser = dd("Caller-Username") ses.CalleeUser = dd("Caller-Destination-Number") ses.ServerCode = uid If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now Case "CHANNEL_CALLSTATE" If ChannelCallState = "ringing" Then Dim evn = FreeSwitch.Execute("answer", String.Empty, uid) Dim res = evn.Serialize("") End If Case "CHANNEL_DESTROY" If ses IsNot Nothing Then ses.HungUpOn = Now End Select dcx.SaveChanges() End If End Sub the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing please note that I'm unsure which is the correct uuid, but trying both of them gave me identical results As per advise from Nuwan Wijerathne, I put the "answer" action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands. It picks up, and immediately hangs up because it has finished the whole dialplan I'd appreciate your help. I'm pretty new to freeswitch and esl Please advise Sincerely, ymo _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, I am trying to setup the voicemail call back feature. Anyone have any experience with this?? When I press the '5' it just sits there. All other voicemail features work. The CLI shows the digit pressed but does nothing else. 2013-12-28 23:44:13.392969 [DEBUG] switch_ivr_play_say.c:1315 Codec Activated L16@8000hz 1 channels 20ms 2013-12-28 23:44:16.372737 [DEBUG] switch_ivr_play_say.c:1703 done playing file file_string://time/today.wav!time/at.wav!digits/11.wav!digits/30.wav!digits/7.wav!time/p-m.wav 2013-12-28 23:44:16.472743 [DEBUG] switch_ivr_play_say.c:1315 Codec Activated L16@8000hz 1 channels 20ms 2013-12-28 23:44:18.492742 [DEBUG] switch_rtp.c:3911 RTP RECV DTMF 5:1280 2013-12-28 23:44:18.492742 [DEBUG] switch_channel.c:471 RECV DTMF 5:1280 2013-12-28 23:44:20.592743 [DEBUG] switch_rtp.c:3911 RTP RECV DTMF 5:1280 2013-12-28 23:44:20.592743 [DEBUG] switch_channel.c:471 RECV DTMF 5:1280 Darcy Primrose
Sounds like it might be a codec issue. Paste the logs from the call, when answer fails. /Peter 24 dec 2013 kl. 16:50 skrev "Yisroel M. Olewski" <yisroel@machshevet.com>: Hello everyone This is my first posting via the mailing list I’m trying my hand at freeswitch esl with .net I’ve managed to get a hold of all incoming events, but can’t seem to "pick up the phone" my first goal is to pick up the phone and read out some text via tts I’ve scoured the web, tried everything I can find or think of but no luck here’s my code Private Sub winMain_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded ThreadPool.QueueUserWorkItem(New WaitCallback(Sub(stateInfo) FreeSwitch = New ESLconnection("10.0.0.1", 8021, "mypass") Dim eslEvent = FreeSwitch.SendRecv("event plain ALL") FreeSwitch.SendRecv("event plain DTMF") If eslEvent IsNot Nothing Then AddEvent(eslEvent) While FreeSwitch.Connected eslEvent = FreeSwitch.RecvEvent AddEvent(eslEvent) End While End If End Sub)) End Sub Private Sub AddEvent(e As ESLevent) Dim dd = TextCollection(e.Serialize(""), ": ", vbLf) Dim eventname = dd("event-name") 'Dim uid = dd("Unique-ID") Dim uid = dd("Channel-Call-UUID") If dd("Caller-Network-Addr") <> "" Then Dim dcx = DBEntities() Dim ses = dcx.Sessions.SingleOrDefault(Function(x) x.ServerCode = uid) Dim ChannelState = dd("Channel-State") Dim ChannelCallState = dd("Channel-Call-State").ToLower Select Case eventname Case "CHANNEL_STATE" If ses Is Nothing Then ses = New Session dcx.Sessions.AddObject(ses) End If ses.CallerHost = dd("Caller-Network-Addr") ses.CallerName = UrlDecoded(dd("Caller-Caller-ID-Name")) ses.CallerPhone = dd("Caller-Caller-ID-Number") ses.CallerUser = dd("Caller-Username") ses.CalleeUser = dd("Caller-Destination-Number") ses.ServerCode = uid If {"cs_destroy", "cs_hangup"}.Contains(ChannelState) Then ses.HungUpOn = Now Case "CHANNEL_CALLSTATE" If ChannelCallState = "ringing" Then Dim evn = FreeSwitch.Execute("answer", String.Empty, uid) Dim res = evn.Serialize("") End If Case "CHANNEL_DESTROY" If ses IsNot Nothing Then ses.HungUpOn = Now End Select dcx.SaveChanges() End If End Sub the answer line is getting reached, and the result is "+OK" but the phone still keeps ringing please note that I’m unsure which is the correct uuid, but trying both of them gave me identical results As per advise from Nuwan Wijerathne, I put the “answer” action in the dialplan, and tried just the playback from code (just a wav file), but the result is the same. Freeswitch ignores entirely my commands. It picks up, and immediately hangs up because it has finished the whole dialplan I’d appreciate your help. I’m pretty new to freeswitch and esl Please advise *Sincerely,* *ymo* _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (5)
-
Duvid Rottenberg
-
fs
-
Moishe Grunstein
-
Peter Olsson
-
Yisroel M. Olewski