Hello,

in a quick look at the trace and the code, the assignment with empty value seems to be the issue, likely to be:

$rU = $dbr(ra=>[0,1]);

I remember that a similar issue was fixed long time ago, but not sure before your version (3.2.x) which is very old right now. If you have time, you can simulate the same situation using a more recent version such as 4.2 or 4.3.

Being traveling, I can't do much testing and analysis of the commit logs to see what and when was fixed.

For the moment, you can try to catch the situation in the config:

if($dbr(ra=>[0,1])!="") $rU = $dbr(ra=>[0,1]);

Cheers,
Daniel

On 03/07/15 08:38, Nick Raper wrote:

This is our call forward route:

 

route[CALLFWD]

{

        if(!is_method("INVITE"))

                return -1;

        if($avp(DST_CARRIER) != CARRIER_US)

                return -1;

        sql_result_free("ra");

        sql_query("ca",

                "SELECT forward, fwdnumber FROM subscriber WHERE username='$rU'",

                "ra");

        if($dbr(ra=>rows)<=0) {

                return -1;

        }

        if($dbr(ra=>[0,0])==1) {

                $rU = $dbr(ra=>[0,1]);

                $avp(ACC_FWDNUMBER)=$rU;

                return 1;

        }

        return -1;

}

 

Cheers,

cid:image001.jpg@01CFEF9D.A1F537A0

 

                      

Nick Raper

Infrastructure Engineer

4th Dimension Technology | South Africa

Office: +27 21 506 6260 | 24 hour helpline: +27 21 506 6260 | Fax: +27 86 610 5792

Email: nick@4dt.co.za | Web: www.4dt.co.za

 

 P Please consider the environment before printing this email

 

From: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
Sent: 02 July 2015 06:11 PM
To: Nick Raper; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Segment fault

 

How do you load the value of fwdnumber and then how you use it to update the request uri?

The backtrace points to an assignment, but I need to know exactly the operations you do to track it down.

Cheers,
Daniel

On 02/07/15 11:42, Nick Raper wrote:

I see now that we had an entry in the ‘subscriber’ table with forwarding enabled but the ‘fwdnumber’ field was blank.

 

Could this be the cause?

 

cid:image001.jpg@01CFEF9D.A1F537A0

 

                      

Nick Raper

Infrastructure Engineer

4th Dimension Technology | South Africa

Office: +27 21 506 6260 | 24 hour helpline: +27 21 506 6260 | Fax: +27 86 610 5792

Email: nick@4dt.co.za | Web: www.4dt.co.za

 

 P Please consider the environment before printing this email

 

From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Nick Raper
Sent: 02 July 2015 09:43 AM
To: miconda@gmail.com; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Segment fault

 

Sorry I forgot to mention the vesion 3.2.1

 

cid:image001.jpg@01CFEF9D.A1F537A0

 

                      

Nick Raper

Infrastructure Engineer

4th Dimension Technology | South Africa

Office: +27 21 506 6260 | 24 hour helpline: +27 21 506 6260 | Fax: +27 86 610 5792

Email: nick@4dt.co.za | Web: www.4dt.co.za

 

 P Please consider the environment before printing this email

 

From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla
Sent: 02 July 2015 08:37 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Segment fault

 

Hello,

according to the log, you got a coredump:

Jul  1 14:44:52 sipa /usr/local/sbin/kamailio[2837]: ALERT: <core> [main.c:754]: core was generated


Send the output of 'bt full' taken with gdb from the core file -- the core file is either in / or in the working dir of kamailio.

Also, mention the version of kamailio that you are using (kamailio -V).

Cheers,
Daniel

On 01/07/15 21:20, Nick Raper wrote:

Hi,

 

Can anyone help with a segment fault we had today please?

 

Our Kamailio has been running for months with no problem but today we received this error 3 times and Kamailio stopped.

 

Jul  1 12:48:43 sipa kernel: kamailio[2853]: segfault at 7f516819f6fc ip 00007f516a51c4a6 sp 00007fffd0fbe420 error 7 in pv.so[7f516a510000+36000]

 

The full log files are attached for the three seg faults.

 

Regards,

 

cid:image001.jpg@01CFEF9D.A1F537A0

 

                      

Nick Raper

Infrastructure Engineer

4th Dimension Technology | South Africa

Office: +27 21 506 6260 | 24 hour helpline: +27 21 506 6260 | Fax: +27 86 610 5792

Email: nick@4dt.co.za | Web: www.4dt.co.za

 

 P Please consider the environment before printing this email

 




_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com



-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com