Grandstream GXP2160 phones. These are 6 line phones.
In the web GUI of the phone, I configure the phone to have multiple accounts.
Phone 1 Acct 1 = 1111
Phone 1 Acct 2 = 2222
Phone 1 Acct 3 = 3333
Phone 2 Acct 1 = 4444
Phone 2 Acct 2 = 5555
Phone 2 Acct 3 = 6666
Both phones are created in sip.conf. Both phones register.
All 6 extensions are created in extension.conf and all 6 extensions register.
Format of extensions.conf is
exten => 1111,1,Dial(SIP/Phone_1,10)
exten => 2222,1,Dial(SIP/Phone_2,10)
etc for the rest of the extensions
The problem is: the incoming calls do not ring to the correct line on the phone. All incoming calls appear to ring into the last line on the phone - regardless of what number was actually dialed.
For example, placing a call from Phone_1 to 4444. The call will succeed and will ring into Phone_2. However, the call rings into Line 3 of Phone_2. Ringing in on line 6666
Do I need a to add something additional to my extension definitions? Something like
exten => 1111,1,Dial(SIP/Phone_1:1,10) to specify Account 1 on that particular handset?
There is nothing on the Asterisk side for that or to configure. We merely send the call to where the phone says. It’s up to the phone to behave as you want when it receives the call. I guess there could be a phone specific SIP header, but that’s phone specific and I don’t think I’ve ever heard of one.
chan_sip is deprecated. You should be using chan_pjsip.
Your dial string doesn’t seem to contain enough information to do what you are trying to do. Please explain how the fields in the first dial string relates to each of the four fields in “Phone 1 Acct 1”. Note that the extension number in the dialplan won’t relate directly to anything in the phone. All the information needs to be in the dial string.
Iif I’m not wrong, both 6 accounts are sharing same sip port at grandstream. Check that and set one port per account. This could help with your issue.
Thank you all for your responses.
@fsilvestre - thank you very much. You are correct, they are all currently sharing the same port - as I did not make any port modifications. When I return tonight, I will try that suggestion. Thank you
@fsilvestre - results of testing were not successful. Perhaps I am not using the correct syntax
On my Grandstream phones, I have found the location where I can specify the SIP port for each of the accounts. An account equates to one of the 6 lines on the phone.
For Account 1, I configured the DN to be 1111 and the SIP port to be 5560
For Account 2, I configured the DN to be 2222 and the SIP port to be 5561
For Account 3, I configured the DN to be 3333 and the SIP port to be 5562
This is my extensions.conf
exten => 1111,1,dial(sip/Phone_1/port 5560,10)
exten => 2222,1,dial(sip/Phone_1/port 5561,10)
exten => 3333,1,dial(sip/Phone_1/port 5562,10)
This format enables me to complete a call - but inbound calls to 1111 still ring on line 3
Output from a debug
Executing [1111@Internal:1]Dial(“SIP/Phone_2-0000003e”,“SIP/Phone_1/port:5560,10”) in new stack.
additional debug lines shows the phone is ring and answered.
I have rebooted the phone to ensure that the port changes have taken effect. I have been Googling for quite some time, but am unable to find the syntax for specifying a port after the device name
I have also tried Phone_1:5560 and P\hone_1/5560
port has no special meaning in a dial string. This will try to dial the invalid SIP URI starting “port 5561@…”, using the standard port number. If you want to call different port numbers, you would need to have different endpoint names for each port number, and make sure that you DID NOT set insecure=port.
I could envisage devices for which the dial string “sip/Phone_1/3333” might work, but I’ve no idea if that applies here. This is basically a question of understanding how the phone works, before you can think about how to configure Asterisk.