On Tue, Dec 7, 2021 at 9:26 AM Kingsley Tart <[email protected]> wrote:

> Hi,
>
> I'm using Asterisk 18.8.0 with pjsip version 2.10.
>
> With a database defined endpoint, I can't find a way to define
> outbound_proxy with ";lr" (without the quotes) on the end.
>
> It works fine if I configure an endpoint in pjsip.conf, eg:
>
> -- 8< -----------------------------------------------------
> [custom]
> type=endpoint
> outbound_proxy=sip:88.141.1.10\;lr
> ...
>
> # asterisk -r -x "pjsip show endpoint custom" | grep proxy
>  outbound_proxy                     : sip:88.141.1.10;lr
> -- 8< -----------------------------------------------------
>
>
>
>
> but if I try to do that in the database, it ignores everything up to
> the semicolon, eg:
>
> -- 8< -----------------------------------------------------
> MariaDB [asterisk_realtime]> SELECT id,outbound_proxy FROM ps_endpoints
> WHERE id=30;
> +----+--------------------+
> | id | outbound_proxy     |
> +----+--------------------+
> | 30 | sip:88.141.1.10;lr |
> +----+--------------------+
>
> # asterisk -r -x "pjsip show endpoint 30" | grep proxy
>  outbound_proxy                     : lr
> -- 8< -----------------------------------------------------
>
>
>
> I tried a backshash, just in case:
>
> -- 8< -----------------------------------------------------
> +----+---------------------+
> | id | outbound_proxy      |
> +----+---------------------+
> | 30 | sip:88.141.1.10\;lr |
> +----+---------------------+
>
> but this makes no difference.
> -- 8< -----------------------------------------------------
>
>
>
> I tried putting quotes round it:
>
> -- 8< -----------------------------------------------------
> +----+----------------------+
> | id | outbound_proxy       |
> +----+----------------------+
> | 30 | "sip:88.141.1.10;lr" |
> +----+----------------------+
>
> but that makes no difference to the logic:
>
> # asterisk -r -x "pjsip show endpoint 30" | grep proxy
>  outbound_proxy                     : lr"
> -- 8< -----------------------------------------------------
>
>
>
> I tried enclosing within < > but with the same problem.
>
> Is this a bug, or am I doing this wrong?
>

It's not a bug, it's a result of ";" having special meaning from the
database - it means multiple values. You have to encode it and use ^3B
instead of ; in the entry.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to