Change virtual extension to SIP

When I initially set my PBX up, I created virtual extensions for all users, then added a FollowMe for different SIP endpoints. It was (mostly) functional, but has created a fair share of headaches in implementation.

Now, with the understanding that chan_pjsip can have multiple endpoints for a single extension, which would simplify my dialplans, ring groups, queues, etc. immensely. I upgraded the system to Asterisk 13, set up a test extension using chan_pjsip, and it seems to behave exactly the way I’m expecting.

My question is this: Can I change the virtual extension, which houses all of the user’s voicemail, and is already set up in the dialplan, to be a SIP extension? I’m reasonably sure I could go into the database and change the “technology” setting, but will this cause other issues?

I don’t mind doing this individually for each extension, but I’m hoping to avoid deleting and re-creating the extension as a SIP or PJSIP extension. If I did it that way, I would need to re-create all of the custom settings, re-add to dial plans, migrate voicemail, etc. Much easier if I could just add “This extension uses chan_pjsip technology” to an existing virtual extension. Even better if there were maybe a script or a GUI method that could accomplish the same end-goal.

Looking through the database, it seems that virtual extensions don’t get any sort of entry in the asterisk.sip table, so it would seem that there is no direct way to do it in the database. However, I’ve noticed in the bulkextensions export, there is a “technology” column. I could probably export it using bulkextensions, change the “technology” column, then re-import it over top of the old one.

However, this suggests that somewhere, there exists a script that can insert the values from a bulkextensions export into valid FreePBX extensions. Does there exist perhaps a version of this script that could perform the same functions without the need to exporting to a CSV, then importing back into the system?

Thanks in advance!

No reply on this for a while, so on our test system, I just used the bulkextensions module to export all of the extensions, then edit them on a spreadsheet to “merge” the virtual extension with the physical extensions. It’s a little bit cumbersome, but it only needs to be done once per employee, and seems to be working pretty well.

I am very much looking forward to being able to deploy Asterisk 13 (along with chan_pjsip) in our production system!

@cmhxaktsoft, I’d be very interested in hearing how this worked out for you. Any other details to know about converting?

My situation is slightly different… I started with all pjsip extensions, but there a some that need to be converted to virtual extensions. I’m presuming your technique will work in the other direction if it worked for you going from virtual to pjsip.