Can’t Define PJSIP Endpoint From DB With Proxy Loose Routing

Home » Asterisk Users » Can’t Define PJSIP Endpoint From DB With Proxy Loose Routing
Asterisk Users 2 Comments

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?


Cheers, Kingsley.

2 thoughts on - Can’t Define PJSIP Endpoint From DB With Proxy Loose Routing

  • 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.