SIP: Properly handle nil trunk. (#2291)
This commit is contained in:
@@ -61,6 +61,9 @@ func (s *IOInfoService) GetSIPTrunkAuthentication(ctx context.Context, req *rpc.
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if trunk == nil {
|
||||||
|
return &rpc.GetSIPTrunkAuthenticationResponse{}, nil
|
||||||
|
}
|
||||||
return &rpc.GetSIPTrunkAuthenticationResponse{
|
return &rpc.GetSIPTrunkAuthenticationResponse{
|
||||||
Username: trunk.InboundUsername,
|
Username: trunk.InboundUsername,
|
||||||
Password: trunk.InboundPassword,
|
Password: trunk.InboundPassword,
|
||||||
|
|||||||
Reference in New Issue
Block a user