Hi! We have build a small and simple call center using FreeSWITCH and mod_erlang_event. My erlang process keeps track of available agents and routes incoming calls to them. Calls are sent to my application via: <action application="erlang" data="switch_event:! erlswitch@localhost" /> switch_event is a registered process, which spawns a new process for each incoming call and returns new pid when it receives {get_pid, UUID, Ref, From} message from FreeSWITCH. The problem is, that pretty frequently processes which handle incoming calls receive messages like {'EXIT', <5406.48.0>, noconnection} from FreeSWITCH. As I understand from googling, this happens when remote C node disconnects (and I see TCP connections from FreeSWITCH to epmd daemon being torn down and reestablished). FreeSWITCH drops calls at that moment. Have anyone seen this? Is there any fix/ advice? My system is Debian Lenny (5.0.3), 64-bit system, erlang installed from Debian packages, no backports. -- Timur Irmatov, xmpp:irmatov@jabber.ru
On Thu, Jan 21, 2010 at 10:59:38AM +0500, Timur Irmatov wrote:
We have build a small and simple call center using FreeSWITCH and mod_erlang_event. My erlang process keeps track of available agents and routes incoming calls to them. Calls are sent to my application via:
<action application="erlang" data="switch_event:! erlswitch@localhost" />
switch_event is a registered process, which spawns a new process for each incoming call and returns new pid when it receives {get_pid, UUID, Ref, From} message from FreeSWITCH.
That all looks fine.
The problem is, that pretty frequently processes which handle incoming calls receive messages like {'EXIT', <5406.48.0>, noconnection} from FreeSWITCH. As I understand from googling, this happens when remote C node disconnects (and I see TCP connections from FreeSWITCH to epmd daemon being torn down and reestablished). FreeSWITCH drops calls at that moment.
Does it drop ALL calls being handled in erlang, or just that one?
Have anyone seen this? Is there any fix/ advice?
I haven't seen this before, how many calls are involved? I'm willing to help you troubleshoot though. Is there anything relevant in the logs (even at DEBUG)?
My system is Debian Lenny (5.0.3), 64-bit system, erlang installed from Debian packages, no backports.
What OTP release does that equate to, R12 or R13? Andrew (mod_erlang_event author)
On Thu, Jan 21, 2010 at 6:42 PM, Andrew Thompson <andrew@hijacked.us> wrote:
The problem is, that pretty frequently processes which handle incoming calls receive messages like {'EXIT', <5406.48.0>, noconnection} from FreeSWITCH. As I understand from googling, this happens when remote C node disconnects (and I see TCP connections from FreeSWITCH to epmd daemon being torn down and reestablished). FreeSWITCH drops calls at that moment.
Does it drop ALL calls being handled in erlang, or just that one?
It seems at it drops all calls handled in erlang. At the moment we have only 7 calls maximum, and my applications logs several such exits happening at exactly same time, up to 7 at once.
Have anyone seen this? Is there any fix/ advice?
I haven't seen this before, how many calls are involved? I'm willing to help you troubleshoot though. Is there anything relevant in the logs (even at DEBUG)?
It is good and bad to know that you haven't seen this before.. :) Good, because then it seems like local anomaly which, hopefully, can be debugged and fixed. Bad, because it means we should debug it and there's no ready fix. As for the load, it is small. FreeSWITCH has 7 sip registrations to our upstream, so 7 simultaneous calls is maximum. I will send you logs offlist. This is small excerpt: 2010-01-22 16:40:00.059202 [DEBUG] mod_sofia.c:293 sofia/external/1504291@10.0.2.5 SOFIA DESTROY 2010-01-22 16:40:00.059202 [DEBUG] switch_core_state_machine.c:60 sofia/external/1504291@10.0.2.5 Standard DESTROY 2010-01-22 16:40:00.059202 [DEBUG] switch_core_state_machine.c:434 (sofia/external/1504291@10.0.2.5) State DESTROY going to sleep 2010-01-22 16:40:00.091201 [WARNING] mod_erlang_event.c:489 Can't locate session df4f60c0-074a-11df-af37-b1ee9ca9c744 2010-01-22 16:40:00.091201 [DEBUG] mod_erlang_event.c:541 Notifying new session failed 2010-01-22 16:40:00.091201 [DEBUG] mod_erlang_event.c:842 check_attached_sessions requested exit 2010-01-22 16:40:00.091201 [DEBUG] mod_erlang_event.c:920 Session complete, waiting for children 2010-01-22 16:40:00.091201 [DEBUG] mod_erlang_event.c:930 Connection Closed 2010-01-22 16:40:00.095844 [DEBUG] mod_erlang_event.c:1723 Launching listener, connection from node erlswitch@localhost, ip 127.0.0.1 2010-01-22 16:40:00.095844 [DEBUG] mod_erlang_event.c:910 Connection Open from 127.0.0.1 2010-01-22 16:40:00.095844 [DEBUG] switch_core_session.c:857 Send signal sofia/internal/sip:106@192.168.1.107:5060 [BREAK] 2010-01-22 16:40:00.095844 [DEBUG] switch_core_session.c:857 Send signal sofia/internal/sip:108@192.168.1.108 [BREAK] 2010-01-22 16:40:00.102708 [DEBUG] switch_ivr_bridge.c:315 sofia/internal/sip:108@192.168.1.108 receive message [UNBRIDGE]
My system is Debian Lenny (5.0.3), 64-bit system, erlang installed from Debian packages, no backports. What OTP release does that equate to, R12 or R13?
I guess this corresponds to R12B3: $ apt-cache show erlang-nox|grep Version Version: 1:12.b.3-dfsg-4 May be I should try to build latest erlang from source, rebuild FreeSWITCH and see if it helps..
Also, what FS version are you running?
'version' output in fs_cli does not reveal it's version: freeswitch@internal> version FreeSWITCH Version 1.0.trunk (hacked) It was build from svn, i guess it is revision 16041. -- Timur Irmatov, xmpp:irmatov@jabber.ru
Give this patch a shot: http://eagle.bsd.st/~andrew/erlang_session_fix.diff And see if it makes a difference. Andrew
Hi, Andrew! On Fri, Jan 22, 2010 at 8:46 PM, Andrew Thompson <andrew@hijacked.us> wrote:
Give this patch a shot:
http://eagle.bsd.st/~andrew/erlang_session_fix.diff
And see if it makes a difference.
I have just installed this patch. Thank you. I will let you know the results. -- Timur Irmatov, xmpp:irmatov@jabber.ru
Hi, Andrew! On Fri, Jan 22, 2010 at 8:46 PM, Andrew Thompson <andrew@hijacked.us> wrote:
Give this patch a shot:
http://eagle.bsd.st/~andrew/erlang_session_fix.diff
And see if it makes a difference.
24 hours passed since I have installed this patch. Seems to be working fine - I haven't seen a single disconnect between FreeSWITCH and my application. Thank you very much! I owe you a beer, if you ever to visit Tashkent, Uzbekistan.. :-) -- Timur Irmatov, xmpp:irmatov@jabber.ru
On Tue, Jan 26, 2010 at 02:37:18PM +0500, Timur Irmatov wrote:
24 hours passed since I have installed this patch. Seems to be working fine - I haven't seen a single disconnect between FreeSWITCH and my application.
Okay, I'll commit it to trunk then. Thanks for the report.
Thank you very much! I owe you a beer, if you ever to visit Tashkent, Uzbekistan.. :-)
I'll keep that in mind :) Andrew
participants (2)
-
Andrew Thompson
-
Timur Irmatov