[OpenSIPS-Users] can't get is_contact_registered() to return true

Jeff Pyle jeff at ugnd.org
Wed Oct 7 18:15:45 EST 2020

Hi Liviu,

New problem.  $ct.fields(uri) returns the received address in the domain,
rather than what's in the Contact.

At call time:

  $ct = <sip:+12162450000 at>
  $ct.fields(uri) = sip:+12162450000@[PUBLIC_IP]:8490

Am I expecting the wrong thing?

The only difference between $ct and the registered Contact is that $ct is
wrapped in <>.  I wrote a nasty regex to strip the <> characters and it
works with is_contact_registered(), at least from this phone.

- Jeff

On Wed, Oct 7, 2020 at 10:38 AM Liviu Chircu <liviu at opensips.org> wrote:

> On 07.10.2020 17:18, Jeff Pyle wrote:
> > Am I missing something?
> Hi,
> Use "$ct.fields(uri)" instead of "$ct", so you extract the Contact URI
> instead of the entire header body.
> --
> Liviu Chircu
> www.twitter.com/liviuchircu | www.opensips-solutions.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20201007/b3393737/attachment.html>

More information about the Users mailing list