Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module:sca Line seize does not release after some 'BYE's #341

Closed
TheGrandWazoo opened this issue Sep 23, 2015 · 20 comments
Closed

Module:sca Line seize does not release after some 'BYE's #341

TheGrandWazoo opened this issue Sep 23, 2015 · 20 comments

Comments

@TheGrandWazoo
Copy link
Contributor

I have a situation that I can't get my head around. Every so often I have a SCA seized and I need to manually release it. Here is the log of the sca and bye from the event logs.

messages-20150920:Sep 18 14:35:28 sip-registrar /usr/sbin/kamailio[7608]: ERROR: sca [sca_call_info.c:1580]: sca_call_info_bye_handler(): sca_call_info_bye_handler: sip:Mindfield@kamailio.newgarllc.com dialog leg 96b9ad37-9a7fa462-15c35d3@192.168.1.117;1c389191866 is not active

messages-20150920:Sep 18 14:35:28 sip-registrar /usr/sbin/kamailio[7610]: NOTICE: acc [acc.c:317]: acc_log_request(): ACC: transaction answered: timestamp=1442601328;method=BYE;from_tag=76C3EC1F-114D759A;to_tag=1c389191866;call_id=96b9ad37-9a7fa462-15c35d3@192.168.1.117;code=200;reason=OK;src_user=Mindfield;src_domain=kamailio.newgarllc.com;src_ip=192.168.1.40;dst_ouser=Mindfield;dst_user=Mindfield;dst_domain=192.168.1.117

And the kamcmd showing the seize line

sip:Mindfield@kamailio.newgarllc.com 1 active 1442601278 sip:Mindfield@192.168.1.117 sip:1030@192.168.1.40:5060 96b9ad37-9a7fa462-15c35d3@192.168.1.117 76C3EC1F-114D759A 1c389191866

I am running Kamailio 4.2.6. The phones are Polycom VVX 310/410 running 5.3.1. And the PSTN gateway is an Audiocodes Mediant 1000 running 6.60A.292.001.

The call volume is light so I don't think there is a lot of traffic but there is about 16 phones one SCA. It is not happening all time. Could be a couple days that nothing happens and then there could be a couple days that it happens multiple times a day. I can't find a common element that would be causing this unless the 'bye' is closing the call before the SCA has a chance to do something with it.

Thanks
Kev

@TheGrandWazoo TheGrandWazoo changed the title Module:sca Line seize does not release after some 'bye's Module:sca Line seize does not release after some 'BYE's Sep 23, 2015
@kamailio-sync
Copy link

If you can get a clean packet capture, feel free to send it to me off-list.

If you can't, then perhaps you can dig all of the Kamailio logs out for
those call IDs?

-- Jorj

On 9/23/15 3:44 PM, Kevin Scott Adams wrote:

I have a situation that I can't get my head around. Every so often I
have a SCA seized and I need to manually release it. Here is the log
of the sca and bye from the event logs.

messages-20150920:Sep 18 14:35:28 sip-registrar
/usr/sbin/kamailio[7608]: ERROR: sca [sca_call_info.c:1580]:
sca_call_info_bye_handler(): sca_call_info_bye_handler:
sip:Mindfield@kamailio.newgarllc.com
mailto:Mindfield@kamailio.newgarllc.com dialog leg
96b9ad37-9a7fa462-15c35d3@192.168.1.117;1c389191866 is not active

messages-20150920:Sep 18 14:35:28 sip-registrar
/usr/sbin/kamailio[7610]: NOTICE: acc [acc.c:317]: acc_log_request():
ACC: transaction answered:
timestamp=1442601328;method=BYE;from_tag=76C3EC1F-114D759A;to_tag=1c389191866;call_id=96b9ad37-9a7fa462-15c35d3@192.168.1.117;code=200;reason=OK;src_user=Mindfield;src_domain=kamailio.newgarllc.com;src_ip=192.168.1.40;dst_ouser=Mindfield;dst_user=Mindfield;dst_domain=192.168.1.117

And the kamcmd showing the seize line (in this case both are seized)

sip:Mindfield@kamailio.newgarllc.com
mailto:Mindfield@kamailio.newgarllc.com 1 active 1442601278
sip:Mindfield@192.168.1.117 sip:1030@192.168.1.40:5060
96b9ad37-9a7fa462-15c35d3@192.168.1.117 76C3EC1F-114D759A 1c389191866

I am running Kamailio 4.2.6. The phones are Polycom VVX 310/410
running 5.3.1. And the PSTN gateway is an Audiocodes Mediant 1000
running 6.60A.292.001.

The call volume is light so I don't think there is a lot of traffic
but there is about 16 phones one SCA. It is not happening all time.
Could be a couple days that nothing happens and then there could be a
couple days that it happens multiple times a day. I can't find a
common element that would be causing this unless the 'bye' is closing
the call before the SCA has a chance to do something with it.

Thanks
Kev


Reply to this email directly or view it on GitHub
#341.


sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

@TheGrandWazoo
Copy link
Contributor Author

It will be hard to get a packet capture but I can give you what I have in the logs. I will also get homer going which should give us a better capture due to it sporadicness.
Where would you like me to send it too?

@kamailio-sync
Copy link

You can send it directly to me off-list.

-- Jorj

On 9/23/15 3:51 PM, Kevin Scott Adams wrote:

It will be hard to get a packet capture but I can give you what I have
in the logs. I will also get homer going which should give us a better
capture due to it sporadicness.
Where would you like me to send it too?


Reply to this email directly or view it on GitHub
#341 (comment).


sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

@TheGrandWazoo
Copy link
Contributor Author

Jorj,

What is the email address to send you the capture and SCA output. I think I see the issue but don't know why it happens?

@TheGrandWazoo
Copy link
Contributor Author

TheGrandWazoo commented Oct 8, 2015

Ill try this...hope it works.

sip:Mindfield@kamailio.newgarllc.com 1 active 1444143590 sip:Mindfield@192.168.1.85 sip:1030@192.168.1.40:5060 e90b49fb-d94a179a-a738a3@192.168.1.85 7EF5202B-6BC5E1EA 1c836141488

Thanks,

Kevin Scott Adams
KSA Technologies, LLC

----- Original Message -----

From: "kamailio-sync" notifications@github.com
To: "kamailio/kamailio" kamailio@noreply.github.com
Cc: "Kevin Scott Adams" thegrandwazoo@ksatechnologies.com
Sent: Wednesday, September 23, 2015 6:43:03 PM
Subject: Re: [kamailio] Module:sca Line seize does not release after some 'BYE's (#341)

You can send it directly to me off-list.

-- Jorj

On 9/23/15 3:51 PM, Kevin Scott Adams wrote:

It will be hard to get a packet capture but I can give you what I have
in the logs. I will also get homer going which should give us a better
capture due to it sporadicness.
Where would you like me to send it too?


Reply to this email directly or view it on GitHub
#341 (comment).


sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Reply to this email directly or view it on GitHub .

@TheGrandWazoo
Copy link
Contributor Author

Jorj,
The issue seems to be only with the Polycom UA making a call outbound. I can not find an issue with and inbound call. The Call-ID of the seize/appearance seems to be missing some characters on the prefix of the at-sign in relations to the real Call-ID of the INVITE/BYE.

Just my observation.

Kev

@JorjBauer
Copy link

Apologies for being unresponsive; I've recently left Penn.

I'll need more detail, unfortunately. Can you send any log messages
relating to that Call ID?

e90b49fb-d94a179a-a738a3@192.168.1.85

-- Jorj

On 10/13/15 10:34 AM, Kevin Scott Adams wrote:

Jorj,
The issue seems to be only with the Polycom UA making a call outbound.
I can not find an issue with and inbound call. The Call-ID of the
seize/appearance seems to be missing some characters on the prefix of
the at-sign in relations to the real Call-ID of the INVITE/BYE.

Just my observation.

Kev


Reply to this email directly or view it on GitHub
#341 (comment).

@TheGrandWazoo
Copy link
Contributor Author

TheGrandWazoo commented Oct 19, 2015

Jorj,

I do not have that log file any more. I will need to look for a new seize and give you that info.

Sorry about that,

kevin.adams@ksatechnologies.com

----- Original Message -----

From: "Jorj Bauer" notifications@github.com
To: "kamailio/kamailio" kamailio@noreply.github.com
Cc: "Kevin Scott Adams" thegrandwazoo@ksatechnologies.com
Sent: Wednesday, October 14, 2015 8:28:57 AM
Subject: Re: [kamailio] Module:sca Line seize does not release after some 'BYE's (#341)

Apologies for being unresponsive; I've recently left Penn.

I'll need more detail, unfortunately. Can you send any log messages
relating to that Call ID?

e90b49fb-d94a179a-a738a3@192.168.1.85

-- Jorj

On 10/13/15 10:34 AM, Kevin Scott Adams wrote:

Jorj,
The issue seems to be only with the Polycom UA making a call outbound.
I can not find an issue with and inbound call. The Call-ID of the
seize/appearance seems to be missing some characters on the prefix of
the at-sign in relations to the real Call-ID of the INVITE/BYE.

Just my observation.

Kev


Reply to this email directly or view it on GitHub
#341 (comment).


Reply to this email directly or view it on GitHub .

@TheGrandWazoo
Copy link
Contributor Author

Jorj,
It happened again but the logs do not show any reference to the Call-ID except the < BYE >. I can not find the invite for that call in the logs.
I have a Homer capture of the < INVITE > to the < BYE >.

I'm going to see on my test system if I can find out why we might be missing these < INVITE >s.

@miconda
Copy link
Member

miconda commented Jun 6, 2016

Reopen if this issue is still actual and new details can be provided.

@miconda miconda closed this as completed Jun 6, 2016
@TheGrandWazoo
Copy link
Contributor Author

TheGrandWazoo commented Jun 7, 2016

Yes, it is still happening under 4.2 at the current git patch.

Phones are Polycom VVX310/410 at 5.3.2 and I have Homer running to capture.

Problem is only outbound from Polycom to an outside line via an Audiocode Mediant 1000 with the phone(s) having 2 different SCA's and 2 to 3 line appearances per SCA.

Thanks,

Kevin Scott Adams

----- Original Message -----

From: "Daniel-Constantin Mierla" notifications@github.com
To: "kamailio/kamailio" kamailio@noreply.github.com
Cc: "Kevin Scott Adams" thegrandwazoo@ksatechnologies.com, "Author" author@noreply.github.com
Sent: Monday, June 6, 2016 4:59:22 PM
Subject: Re: [kamailio/kamailio] Module:sca Line seize does not release after some 'BYE's (#341)

Reopen if this issue is still actual and new details can be provided.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .

@TheGrandWazoo
Copy link
Contributor Author

Is there a committer/developer for this module?

@TheGrandWazoo
Copy link
Contributor Author

Typical log entry under the [SCA] route for this situation...

Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=984 a=16 n=if
Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=974 a=25 n=is_method
Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=990 a=16 n=if
Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=984 a=25 n=is_method
Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=990 a=24 n=sca_call_info_update
Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: DEBUG: sca [sca_util.c:53]: sca_get_msg_contact_uri(): Empty Contact header
Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: DEBUG: sca [sca_util.c:53]: sca_get_msg_contact_uri(): Empty Contact header
Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: ERROR: sca [sca_call_info.c:1580]: sca_call_info_bye_handler(): sca_call_info_bye_handler: sip:ParksAndRec@kamailio.newgarllc.com dialog leg 170216930662016111325@192.168.1.40;584cf90b-57a7-4543-bfda-fd7cd71ca84c is not active
Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: ERROR: sca [sca_call_info.c:2032]: sca_call_info_update(): Failed to update Call-Info state for
Jun 6 11:14:28 sip-registrar /usr/sbin/kamailio[15361]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=993 a=2 n=return

The [SCA] route is the one in the modules readme or website doc.

@TheGrandWazoo
Copy link
Contributor Author

Another seized via kamcmd sca.all_appearances

Saturday, June 04, 2016 1:04:30 PM
sip:RepublicTavern@kamailio.newgarllc.com 1 active 1465059870 sip:RepublicTavern@192.168.1.111 sip:1030@192.168.1.40:5060 fe298e35-e351232c-867b4191@192.168.1.111 F8EA101D-EEDFCE4 1c1260378071

Log on the siezed....
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=983 a=16 n=if
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=973 a=25 n=is_method
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=989 a=16 n=if
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=983 a=25 n=is_method
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=989 a=24 n=sca_call_info_update
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: DEBUG: sca [sca_util.c:53]: sca_get_msg_contact_uri(): Empty Contact header
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: DEBUG: sca [sca_util.c:53]: sca_get_msg_contact_uri(): Empty Contact header
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: ERROR: sca [sca_call_info.c:1580]: sca_call_info_bye_handler(): sca_call_info_bye_handler: sip:RepublicTavern@kamailio.newgarllc.com dialog leg fe298e35-e351232c-867b4191@192.168.1.111;1c1260378071 is not active
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: ERROR: sca [sca_call_info.c:2032]: sca_call_info_update(): Failed to update Call-Info state for
Jun 4 13:05:40 sip-registrar /usr/sbin/kamailio[5508]: exec: *** cfgtrace:request_route=[SCA] c=[//etc/kamailio/kamailio.cfg] l=992 a=2 n=return

@miconda
Copy link
Member

miconda commented Jun 7, 2016

@JorjBauer used to maintain the module at some point, but I think he changed positions and not sure if he is still involved in some work with the module.

@miconda miconda reopened this Jun 7, 2016
@TheGrandWazoo
Copy link
Contributor Author

Good day.
I think I have a lead on this to help come up with a resolution. I might be able to do it myself but I need to really dig into the code and kamailio to understand it better.
First, I was using the sip_trace module along with Homer to gather the info, but it did seem incomplete. The work of the SCA module is not picked up by the sip_trace module. I believe because it if doing instead script work and sending its own packets, which would not be picked up by the script anymore. I finally used sngrep (referred by Javan Strika who is also having the issue) and was able to see the entire conversations for the SCA's. But the sngrep in a "HEP" and "non verbose" mode seems to have a memory leak and will crash kamailio due to no more memory. So, I am now turning to captagent to get a more stable system to get better traces for this issue.

Now for the SCA problem. It seems that the unreleased "seized event" resides with the "held" event and the reinvite/invite that occurs to kamailio. It seems to get lost, hungup. pushed around or jacked up in the 'route[WITHINDLG]' section of the script and the reinvites/invites will keep happening until a timeout occurs or the sometimes I have seen the 404 Not here error occur.

I know this is not much to go on until I upload a good trace but maybe a brainiac might go...Oh, I know that problem and quicker fix.

Using Kamailio 4.2.7 with latest patches. CentOS 6.7-latest. One test bed is a mix of 2 Polycom VVX [34]10 with 5.4.4 and 1 Polycom 650 with 3.3.5; Another is a mix of 14 Polycoms VVX [34]10 with 5.3.2, another is a mix of 4 Polycom VVX [34]10 with 5.3.2

@TheGrandWazoo
Copy link
Contributor Author

Good day to people following this.
First please disregard the previous posts with the in dialog issues. I had the IP address of the Audiocodes Gateway in my domain table by accident. Removing that cleared all the in dialog issues up. I will be deleting those posts.

But, this issue still persists and I can confirm and duplicate the issue now that has been haunting me (and others) for quite some time. This issue is when a call is placed on HOLD and another phone picks up the 'held' call...all seems fine until the hangup. This is when the line is still considered 'active' by the SCA module. The current UA (Polycom) seems to have released it but all other phones have the 'appearance' still active. Within 15 to 20 seconds the UA that was part of the released call receives the 'active' appearance. It can be duplicated every time.

@TheGrandWazoo
Copy link
Contributor Author

If people are following this issue thread, I have decided to forked the kamailio repo to my Github account and I am actively working on fixing the issue(s) i have encountered, cleaning up code and hoping to enhance the code to make the module better. The fork is at https://github.com/TheGrandWazoo/kamailio and I will be committing some changes soon.
Disclaimer...I am not an internal kamailio or SCA expert so I am learning as I go and there are a lot of DEBUG statements and XXX notes I have added to help me and others along if they so do wish. I have changed code that has broken other functionality of the module so it is not perfect yet. There has been some changes to the Polycom firmware that I have seen in traces that need to be considered for future enhancements that I hope to incorporate into the module.

Thanks

@TheGrandWazoo
Copy link
Contributor Author

I have been committing changes to the 4.3 branch and HEAD under my fork at this time.

@miconda
Copy link
Member

miconda commented Sep 6, 2016

According to PR #768, this was fixed.

@miconda miconda closed this as completed Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants