Multi-account on Yealink V81+Asterisk


Nice to know you via e-mail. I meet 1 issue, need your kindly help.

PBX Version is Asterisk 13.9.1, chan_sip
T46G version 28-81.0.4 and

I register 2 accounts on T46G. I can use account 1 to make call out. If i use account 2 to make call out, the server reply with 403 forbidden. I attached the log information for your reference:

Sending to (no NAT)
Using INVITE request as basis request - 0_3222719831@
Found peer ‘1234’ for ‘7419’ from
[Jun 29 13:19:20] WARNING[31441]: chan_sip.c:15083 check_auth: username mismatch, have <1234>, digest has <7419>
[Jun 29 13:19:20] NOTICE[31441]: chan_sip.c:23612 handle_request_invite: Failed to authenticate device “7419” sip:7419@;tag=1458399292

Account 1 is 1234, account 2 is 7419. If i use 7419 to make call out, the server will check the peer information, and use the authentication of 1234 for 7419. Apparently, it auth failed.

Seems that we can change the identify_by option on the server side(PJSIP).
If we use identify_by=username, then we can use 2nd account to make call out.
If we use identify_by=location, then we only can use 1st account to make call out, unless the phone set different port for every single account. On yealink V73, the 1st account us 5060 port, the 2nd account use 5061 account.

To solve the issue, i need to change it on the server sdie (chan_sip), i need your kindly answer my 2 question as below:

  1. If we change identify_by option to username on chan_sip Asterisk, can we solve this issue?
  2. How can we change this option on chan_sip asterisk? I think we need to change code to release Asterisk version, right?
  3. Can you tell me the workload if we need to change Asterisk code? Is it easy?
  4. If we change the identify_by option by changing asterisk code, will it import other issue to the server?

Thanks in advanced.

Anybody can help me?

for chan_sip use type=friend with a secret and have the phone register to your PBX.

Note that the user part of friend has nothing to do with register. If Asterisk receives a call that matches the user name, it will ignore whether or not it came from the registered IP address. Phones don’t even have to be registered to make calls if they match type-friend on the user.

Two, non-equivalent lines on one IP address is about the only time that friend is useful.

Thanks for your reply.

To solve the issue, so we need to set type=friend or type=user?

Can you tell me how to change it on chan_sip Asterisk? Will it import other issue to the server?
Can you tell me the workload if we need to change Asterisk code? Is it easy?

the Phone should be able to use 2 different accounts on each line with no issue at all. verify you have the correct Auth name for each corresponding sip account on each line