[Home]

Summary:ASTERISK-27891: Sip to PJSIP conversion scripts errors
Reporter:Oscar Santos (osantos@ramsoft.com)Labels:pjsip
Date Opened:2018-06-01 13:01:51Date Closed:2018-06-01 14:03:56
Priority:MajorRegression?
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:13.19.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Sangoma Linux 7, physical hosted server running FreePBX 14.0.3.6Attachments:
Description:My company is attempting to migrate our FreePBX phone system to a newer instance running the latest firmware version and with that migration, we are looking into converting our use of chan_sip to chan_pjsip. Came across your wiki post showing how to migrate (https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip) and the fact that I need to run the sip_to_pjsip.py conversion script.

Running the script in my environment completes with the following output:

[root@XXXXX asterisk]# /var/www/html/admin/modules/core/sip_to_pjsip/sip_to_pjsip.py
Please, report any issue at:
   https://issues.asterisk.org/
Reading sip.conf
Traceback (most recent call last):
 File "/var/www/html/admin/modules/core/sip_to_pjsip/sip_to_pjsip.py", line 1213, in <module>
   sip.read(sip_filename)
 File "/var/www/html/admin/modules/core/sip_to_pjsip/astconfigparser.py", line 446, in read
   self._read(config_file, sect)
 File "/var/www/html/admin/modules/core/sip_to_pjsip/astconfigparser.py", line 462, in _read
   parser.read(include_name, sect)
 File "/var/www/html/admin/modules/core/sip_to_pjsip/astconfigparser.py", line 446, in read
   self._read(config_file, sect)
 File "/var/www/html/admin/modules/core/sip_to_pjsip/astconfigparser.py", line 473, in _read
   key, val = try_option(line)
 File "/var/www/html/admin/modules/core/sip_to_pjsip/astconfigparser.py", line 250, in try_option
   return data[0].rstrip(), data[1].lstrip()
IndexError: list index out of range

The output also included steps to log a request here, as I have a very vanilla FreePBX instance and I should not be running into this issue. Thanks.
Comments:By: Asterisk Team (asteriskteam) 2018-06-01 13:01:52.052-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Richard Mudgett (rmudgett) 2018-06-01 14:03:56.581-0500

Converting a FreePBX configuration using the sip_to_pjsip.py script is outside the scope of the script.  Even if the script worked in converting the configuration you wouldn't be able to plug that config back into FreePBX.  FreePBX generates the configuration files from its own database and wouldn't know how to read a user supplied one.  You should see if FreePBX has a way to convert their setup to using chan_pjsip from chan_sip.

By: Oscar Santos (osantos@ramsoft.com) 2018-06-01 14:23:12.250-0500

Thank you for clarifying, that would've sent me down a completely wrong direction if that script completed. Take care!

By: Asterisk Team (asteriskteam) 2018-06-01 14:23:12.398-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.