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

[bug]: Error when converting chan_sip to PJSIP trunk (convert2pjsip) #511

Open
ramarajan222 opened this issue Oct 18, 2024 · 0 comments
Open
Labels
bug Something isn't working triage Triage

Comments

@ramarajan222
Copy link

FreePBX Version

FreePBX 16

Issue Description

Refhttps://community.freepbx.org/t/pdoexception-during-trunk-creation-in-freepbx17/99575

Error when converting chan_sip to PJSIP trunk (convert2pjsip)

 fwconsole trunks --convert2pjsip 3
Convert the sip trunks to pjsip (Trunk name : test)

In PJSip.class.php line 1596:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3-maxchans' for key 'PRIMARY'

Operating Environment

freepbx v17

Relevant log output

MariaDB [asterisk]> desc trunks;
+---------------+--------------+------+-----+---------+-------+
| Field         | Type         | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| trunkid       | int(11)      | NO   | PRI | 0       |       |
| tech          | varchar(20)  | NO   | PRI | NULL    |       |
| channelid     | varchar(190) | NO   | PRI |         |       |
| name          | varchar(50)  | NO   |     |         |       |
| outcid        | varchar(255) | NO   |     |         |       |
| keepcid       | varchar(4)   | YES  |     | off     |       |
| maxchans      | varchar(6)   | YES  |     |         |       |
| failscript    | varchar(255) | NO   |     |         |       |
| dialoutprefix | varchar(255) | NO   |     |         |       |
| usercontext   | varchar(255) | YES  |     | NULL    |       |
| provider      | varchar(40)  | YES  |     | NULL    |       |
| disabled      | varchar(4)   | YES  |     | off     |       |
| continue      | varchar(4)   | YES  |     | off     |       |
| routedisplay  | varchar(4)   | YES  |     | on      |       |
+---------------+--------------+------+-----+---------+-------+
14 rows in set (0.003 sec)

MariaDB [asterisk]> select * from trunks;
+---------+-------+---------------------+---------------------+------------+---------+----------+------------+---------------+-------------+----------+----------+----------+--------------+
| trunkid | tech  | channelid           | name                | outcid     | keepcid | maxchans | failscript | dialoutprefix | usercontext | provider | disabled | continue | routedisplay |
+---------+-------+---------------------+---------------------+------------+---------+----------+------------+---------------+-------------+----------+----------+----------+--------------+
|       1 | pjsip | fpbx-1-XXXXXXXXXX   | fpbx-1-XXXXXXXXXX   | XXXXXXXXXX | off     |          |            |               |             |          | off      | off      | on           |
|       2 | pjsip | fpbx-2-XXXXXXXXXX   | fpbx-2-XXXXXXXXXX   | XXXXXXXXXX | off     |          |            |               |             |          | off      | off      | on           |
|       3 | sip   | testchan            | test                |            | off     | 2        |            |               |             |          | off      | off      | on           |
|       4 | enum  |                     | ENUM                |            | off     |          |            |               |             |          | off      | off      | on           |
+---------+-------+---------------------+---------------------+------------+---------+----------+------------+---------------+-------------+----------+----------+----------+--------------+
4 rows in set (0.000 sec)

MariaDB [asterisk]> Ctrl-C -- exit!
Aborted

 fwconsole trunks --convert2pjsip 3
Convert the sip trunks to pjsip (Trunk name : test)

In PJSip.class.php line 1600:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3-maxchans' for key 'PRIMARY'


trunks [--enable ENABLE] [--disable DISABLE] [--convert2pjsip CONVERT2PJSIP] [--list] [--xml] [--json] [--] [<args>...]
@ramarajan222 ramarajan222 added bug Something isn't working triage Triage labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Triage
Projects
None yet
Development

No branches or pull requests

1 participant