FYI A shared-extension hack pre-Asterisk 12/13

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
Here's one I wish I had found sooner.

According to https://wiki.asterisk.org/wiki/display/AST/Using Templates , sections don't have to be defined as templates in order to be used as templates. Therefore, it's easy to duplicate extensions that FreePBX creates by referencing them as though they were templates.

The idea is that I'd like to have extension 1001 appear on my desktop phone, PC softphone, and mobile softphone. I configure 1001 in FreePBX, then edit sip_custom_post.conf and add these lines:

Code:
[10011](1001)
[10012](1001)

Now I have three identical extensions: 1001, 10011, and 10012, with the same password and caller ID.

I can call out on any of these and the caller ID appears internally as 1001 and externally as whatever is set on the oubound caller ID in the FreePBX extension. To make them all ring at the same time, I go to the FreePBX extension and edit the Dial field:

Originally:
Code:
SIP/1001

Change to:
Code:
SIP/1001&SIP/10011&SIP/10012


With this kind of arrangement, 1001 has to be the "main" phone and the others would be secondaries. Message waiting indicator works but I'm not sure that advanced subscription features like busy lamp fields would carry over to the secondaries.

In Asterisk 12/13 with pjsip, there's no need for this, because pjsip allows multiple registrations to the same SIP account. But so far I haven't gotten pjsip to work well in my environment and I like this simple duplicate-extension setup pretty well.
 

smarks

Guru
Joined
Jan 7, 2015
Messages
116
Reaction score
26
The sooner people transition to pjsip the better. There are a lot of benefits. What problems have you had with it? I haven't seen any so far for anything I do. I love how much easier it is to configure trunks now. Also no problems with (call from unknown IP) inbound calls coming from mulitple A record servers. Chan_pjsip automatically tracks all A records as opposed to chan_sip which only resolves the first returned record.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
Agreed -- the benefits are many. In the environment where I tried to set it up specifically for the multi-registration feature, I discovered incompatibilities with the phones. The log file was filling up with warnings about malformed SIP headers from the devices. I had to revert and put the aforementioned "multi-reg" workaround in place. PJSIP appears to be much more concerned with accurate and strict implementation of the protocol, whereas chan_sip has some tolerance to it. I found the same when configuring CSipSimple on Android. It uses the PJSIP stack and quickly tells you about SIP protocol inaccuracies it detects with your server/proxy.
 

smarks

Guru
Joined
Jan 7, 2015
Messages
116
Reaction score
26
Agreed -- the benefits are many. In the environment where I tried to set it up specifically for the multi-registration feature, I discovered incompatibilities with the phones. The log file was filling up with warnings about malformed SIP headers from the devices. I had to revert and put the aforementioned "multi-reg" workaround in place. PJSIP appears to be much more concerned with accurate and strict implementation of the protocol, whereas chan_sip has some tolerance to it. I found the same when configuring CSipSimple on Android. It uses the PJSIP stack and quickly tells you about SIP protocol inaccuracies it detects with your server/proxy.


Those would be problems with your phone then and not Pjsip. PJSIP is used in a lot of places besides Asterisk as you impled. So it should be more tested and more compatible in theory. Are you using the latest stable pjsip (v2.3) from the public repository and not the old proprietary digium version?
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
Those would be problems with your phone then and not Pjsip. PJSIP is used in a lot of places besides Asterisk as you impled. So it should be more tested and more compatible in theory. Are you using the latest stable pjsip (v2.3) from the public repository and not the old proprietary digium version?


I understand it to be a phone problem, also. I didn't check the version of the pjsip library. This was done with a FreePBX Distro and using the yum scripts to change versions and setup Asterisk 13.
 

smarks

Guru
Joined
Jan 7, 2015
Messages
116
Reaction score
26
I understand it to be a phone problem, also. I didn't check the version of the pjsip library. This was done with a FreePBX Distro and using the yum scripts to change versions and setup Asterisk 13.


I think they might be using pjsip v2.2 but not sure if it's the digium version or the public generic version. I have only ever used the public generic pjsip v2.3 version.
 

Members online

No members online now.

Forum statistics

Threads
25,825
Messages
167,850
Members
19,250
Latest member
mark-curtis
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top