fetch_event_params for E_UL_CONTACT_INSERT

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

fetch_event_params for E_UL_CONTACT_INSERT

Andreas Bøckmann
Hello!

The same snippet used below worked in older versions and I couldn't see any change in docs.
How should I correctly fetch event parameters? Even $ci is gone inside event_route.

_version: opensips 2.4.0-dev (x86_64/linux)
flags: STATS: On, SHM_EXTRA_STATS, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
git revision: 99ebafd
main.c compiled on 12:20:24 Jun  7 2017 with gcc 4.9.2_

event_route[E_UL_CONTACT_INSERT] {
fetch_event_params("$avp(aor_param);$avp(addr_param);$avp(callid_param);$avp(rec_param);$avp(cseq_param)");
xlog("L_NOTICE","E_UL_INSERT cid=$avp(callid_param), $avp(aor_param), $avp(rec_param), $avp(cseq_param) - callid=$ci\n");             
}

DBG:core:evi_raise_event_msg: found subscriber E_UL_CONTACT_INSERT
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
DBG:event_route:scriptroute_fetch: Fetching parameters for event E_UL_CONTACT_INSERT
DBG:event_route:scriptroute_fetch: Successfully fetched 5 parameters
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
DBG:core:subst_run: running. r=1
DBG:core:subst_str: no match
DBG:avpops:ops_subst: subst to 0 avps
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
E_UL_INSERT cid=sip:1.2.3.4:53875, +[hidden email], , -1 - callid=<null>
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header

The CallID header it complains about is
Call-ID: 142559_rel51ZjRhYWM2ZGZjNjdkZTgxYWU4ZDcxZWU1NjdiNTZmN2Q

Thanks!

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: fetch_event_params for E_UL_CONTACT_INSERT

Bogdan-Andrei Iancu-2
Hi Andreas,

Note that the number and order of parameters provided by the E_UL_CONTACT_INSERT event changed starting with 2.3. See:
    http://www.opensips.org/html/docs/modules/2.4.x/usrloc.html#idp5808768

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
On 06/12/2017 09:43 PM, Andreas Bøckmann wrote:
Hello!

The same snippet used below worked in older versions and I couldn't see any change in docs.
How should I correctly fetch event parameters? Even $ci is gone inside event_route.

_version: opensips 2.4.0-dev (x86_64/linux)
flags: STATS: On, SHM_EXTRA_STATS, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
git revision: 99ebafd
main.c compiled on 12:20:24 Jun  7 2017 with gcc 4.9.2_

event_route[E_UL_CONTACT_INSERT] {
fetch_event_params("$avp(aor_param);$avp(addr_param);$avp(callid_param);$avp(rec_param);$avp(cseq_param)");
xlog("L_NOTICE","E_UL_INSERT cid=$avp(callid_param), $avp(aor_param), $avp(rec_param), $avp(cseq_param) - callid=$ci\n");             
}

DBG:core:evi_raise_event_msg: found subscriber E_UL_CONTACT_INSERT
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
DBG:event_route:scriptroute_fetch: Fetching parameters for event E_UL_CONTACT_INSERT
DBG:event_route:scriptroute_fetch: Successfully fetched 5 parameters
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
DBG:core:subst_run: running. r=1
DBG:core:subst_str: no match
DBG:avpops:ops_subst: subst to 0 avps
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
E_UL_INSERT cid=sip:1.2.3.4:53875, +[hidden email], , -1 - callid=<null>
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header

The CallID header it complains about is
Call-ID: 142559_rel51ZjRhYWM2ZGZjNjdkZTgxYWU4ZDcxZWU1NjdiNTZmN2Q

Thanks!


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: fetch_event_params for E_UL_CONTACT_INSERT

Bogdan-Andrei Iancu-2
In reply to this post by Andreas Bøckmann
Hi Andreas,

I guess the error is triggered by the usage of $ci, right ?

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
On 06/21/2017 07:22 PM, Andreas Bøckmann wrote:
Sorry! 

I wasn't aware the parameters had to be ordered specifically. Works better again now.

I am still seeing the ERROR:core:pv_get_callid: cannot parse Call-Id header error on E_UL_CONTACT_INSERT but I wonder if that might be related to https://github.com/OpenSIPS/opensips/issues/1126 ?

Didn't see this error using E_UL_CONTACT_INSERT event in 2.2. 

xlog correctly prints the CallID from the fetch_event_params parameter and I also tried with simple syntax of 1,2,3,4 etc. which also yields the same error but is able but param contains correct CallID.. so everything seems to work anywho.

fetch_event_params("$avp(1);$avp(2);$avp(3);$avp(4);$avp(5);$avp(6);$avp(7);$avp(8);$avp(9);$avp(10)");
xlog("L_NOTICE","L40.01, E_UL_INSERT $avp(1), $avp(2), $avp(3), $avp(4), $avp(5), $avp(6), $avp(7), $avp(8), $avp(9), $avp(10)\n");        
        
fetch_event_params("aor=$avp(aor_param);uri=$avp(uri_param);received=$avp(received_param);path=$avp(path_param);qval=$avp(qval_param);socket=$avp(socket_param);bflags=$avp(bflags_param);expires=$avp(expires_param);callid=$av$
xlog("L_NOTICE","L40.01, E_UL_INSERT cid=$avp(callid_param), $avp(aor_param), $avp(uri_param), $avp(received_param), $avp(bflags_param), $avp(cseq_param), $avp(socket_param), $avp(expires_param), $avp(path_param)\n");

Thanks again!

//Andreas


On Fri, Jun 16, 2017 at 5:03 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Andreas,

Note that the number and order of parameters provided by the E_UL_CONTACT_INSERT event changed starting with 2.3. See:
    http://www.opensips.org/html/docs/modules/2.4.x/usrloc.html#idp5808768

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
On 06/12/2017 09:43 PM, Andreas Bøckmann wrote:
Hello!
The same snippet used below worked in older versions and I couldn't see any change in docs.
How should I correctly fetch event parameters? Even $ci is gone inside event_route.
_version: opensips 2.4.0-dev (x86_64/linux)
flags: STATS: On, SHM_EXTRA_STATS, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
git revision: 99ebafd
main.c compiled on 12:20:24 Jun  7 2017 with gcc 4.9.2_
event_route[E_UL_CONTACT_INSERT] {
fetch_event_params("$avp(aor_param);$avp(addr_param);$avp(callid_param);$avp(rec_param);$avp(cseq_param)");
xlog("L_NOTICE","E_UL_INSERT cid=$avp(callid_param), $avp(aor_param), $avp(rec_param), $avp(cseq_param) - callid=$ci\n");             
}
DBG:core:evi_raise_event_msg: found subscriber E_UL_CONTACT_INSERT
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
DBG:event_route:scriptroute_fetch: Fetching parameters for event E_UL_CONTACT_INSERT
DBG:event_route:scriptroute_fetch: Successfully fetched 5 parameters
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
DBG:core:subst_run: running. r=1
DBG:core:subst_str: no match
DBG:avpops:ops_subst: subst to 0 avps
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
E_UL_INSERT cid=sip:1.2.3.4:53875, +[hidden email], , -1 - callid=<null>
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
The CallID header it complains about is
Call-ID: 142559_rel51ZjRhYWM2ZGZjNjdkZTgxYWU4ZDcxZWU1NjdiNTZmN2Q
Thanks!
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: fetch_event_params for E_UL_CONTACT_INSERT

Bogdan-Andrei Iancu-2
Andreas,

The pv_get_callid() function (which triggers the error) is exclusively used when evaluating the $ci variable. Also, based on the position in the flow of logs, it looks like being generated when the event route is executed.

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
On 06/21/2017 11:16 PM, Andreas Bøckmann wrote:
Hello

Not that I can see no, as shown in the examples above both xlog statements use the avp fetched from event params. 
I only believe it's related to event_param_set as it happens right after E_UL_CONTACT_INSERT.


DBG:core:parse_headers: flags=ffffffffffffffff
DBG:core:evi_param_set: adding string param
DBG:core:destroy_avp_list: destroying list (nil)
DBG:core:parse_headers: flags=8000000
DBG:core:evi_param_set: adding string param
DBG:core:evi_param_set: adding string param
DBG:core:evi_param_set: adding string param
DBG:core:evi_param_set: adding string param
DBG:core:evi_param_set: adding int param
DBG:core:evi_param_set: adding string param
DBG:core:evi_param_set: adding int param
DBG:core:evi_param_set: adding int param
DBG:core:evi_param_set: adding string param
DBG:core:evi_param_set: adding int param
DBG:core:evi_raise_event_msg: found subscriber E_UL_CONTACT_INSERT
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
DBG:event_route:scriptroute_fetch: Fetching parameters for event E_UL_CONTACT_INSERT
DBG:event_route:scriptroute_fetch: Successfully fetched 10 parameters
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header

On Wed, Jun 21, 2017 at 9:34 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Andreas,

I guess the error is triggered by the usage of $ci, right ?

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
On 06/21/2017 07:22 PM, Andreas Bøckmann wrote:
Sorry! 
I wasn't aware the parameters had to be ordered specifically. Works better again now.
I am still seeing the ERROR:core:pv_get_callid: cannot parse Call-Id header error on E_UL_CONTACT_INSERT but I wonder if that might be related to https://github.com/OpenSIPS/opensips/issues/1126 ?
Didn't see this error using E_UL_CONTACT_INSERT event in 2.2. 
xlog correctly prints the CallID from the fetch_event_params parameter and I also tried with simple syntax of 1,2,3,4 etc. which also yields the same error but is able but param contains correct CallID.. so everything seems to work anywho.
fetch_event_params("$avp(1);$avp(2);$avp(3);$avp(4);$avp(5);$avp(6);$avp(7);$avp(8);$avp(9);$avp(10)");
xlog("L_NOTICE","L40.01, E_UL_INSERT $avp(1), $avp(2), $avp(3), $avp(4), $avp(5), $avp(6), $avp(7), $avp(8), $avp(9), $avp(10)\n");        
        
fetch_event_params("aor=$avp(aor_param);uri=$avp(uri_param);received=$avp(received_param);path=$avp(path_param);qval=$avp(qval_param);socket=$avp(socket_param);bflags=$avp(bflags_param);expires=$avp(expires_param);callid=$av$
xlog("L_NOTICE","L40.01, E_UL_INSERT cid=$avp(callid_param), $avp(aor_param), $avp(uri_param), $avp(received_param), $avp(bflags_param), $avp(cseq_param), $avp(socket_param), $avp(expires_param), $avp(path_param)\n");
Thanks again!
//Andreas
On Fri, Jun 16, 2017 at 5:03 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Andreas, Note that the number and order of parameters provided by the E_UL_CONTACT_INSERT event changed starting with 2.3. See:     http://www.opensips.org/html/docs/modules/2.4.x/usrloc.html#idp5808768 Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
On 06/12/2017 09:43 PM, Andreas Bøckmann wrote:

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users