[OpenSIPS-Users] 3.1 - access Path and Via values from REGISTER

Mark Allen mark at allenclan.co.uk
Thu Jul 30 15:24:05 EST 2020


Seeking to find a workaround for the problem I'm having with WebRTC and AOR
throttling (http://lists.opensips.org/pipermail/users/2020-July/043542.html)
I want to access the values of the "Via" and "Path" headers that are being
passed to the registrar.

Using sngrep on the OpenSIPS server I can see the REGISTER includes Path
and Via headers. If I try to access them with  $(hdr(Path)[0])  or
 $(hdr(Via)[0])  I get nothing, but I can access the values of all the
other headers without any problem - e.g.  $(hdr(Authorization)[0]). What am
I missing or is there another way to get the info used in the Via
and particularly in creating the Path header values???

  add_path_received();
  xlog("!!!!!!!!!!!! $(hdr(Path)[0]) !!!!!!!!!!");
  $avp(attr) = $(hdr(Path)[0]);
  mid_registrar_save("location","p0v");

The code gives an "attr" value in the "location" table of "NULL"

/var/log/syslog shows:

  Jul 30 16:13:17  /usr/sbin/opensips[27423]: !!!!!!!!!!!! <null> !!!!!!!!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200730/2e5c91f6/attachment.html>


More information about the Users mailing list