baresip: Dial to a domain without "@" is not possible through `menu`

Suppose that office is a domain in the local network. It should be possible to initiate an outgoing call to domain office.

Current behavior: Dialing e.g. office through module menu is not possible, because the host part of the selected account will be appended. The DNS resolution fails.

e.g. configured account:

<sip:alice@localhost>;regint=0
>                           office
A@localhost: selected for request
call uri: sip:office@localhost

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23 (2 by maintainers)

Most upvoted comments

/etc/hosts is present on some Linux system. What about other platforms like Windows, Android, iOS ? Do you mean that if the input string is a valid DNS name, it is a valid URI ?

is it possible to separate between “sip:” prefix or not ?

sip:office  -> sip prefix, no uri completion needed
jh          -> no sip prefix, use uri completion

What I meant was that if dial string starts with sip:, do not try to do any kind of completion. Prefix sip: can be used as an indication that the user knows what he/she is doing.

If use writes sip:office or sip:alice, both office and alice are uri hostparts and baresip needs to try to resolve them by whatever means is available on the host, e.g. use DNS query and check from /etc/hosts.

one more input:

The “append domain” logic should not be done in baresip core (ua.c), the core should be kept as slim as straightforward as possible.

The logic should be implemented in the application, i.e. menu module and/or user of libbaresip.

I sent similar comment as email, but looks it never arrived:

Date: Fri, 30 Sep 2022 10:15:07 +0300
To: baresip/baresip <reply+ABP3HREKF356CJI5F4MTWSGBIPEDXEVBNHHFFGGDJY@reply.github.com>
Cc: baresip/baresip <baresip@noreply.github.com>,
    Subscribed <subscribed@noreply.github.com>
Subject: Re: [baresip/baresip] Dial to a domain without "@" is not possible
 through `menu` (Issue #2150)
In-Reply-To: <baresip/baresip/issues/2150/1263190569@github.com>
References: <baresip/baresip/issues/2150@github.com>
	<baresip/baresip/issues/2150/1263190569@github.com>
X-Mailer: VM 8.2.0b under 27.1 (x86_64-pc-linux-gnu)
From: Juha Heinanen <jh@tutpro.com>
--text follows this line--
Alfred E. Heggestad writes:

> How about using this instead:
> 
> ```
> sip:office@company.com
> ```
> 
> sip:office is not a globally routable AOR/URI ?

I think that sip:office would be a valid URI if office is found in
/etc/hosts.