[OpenSIPS-Users] fetch_event_params for E_UL_CONTACT_INSERT

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Jun 21 15:34:29 EDT 2017


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 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> 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
>     <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 <http://www.opensips-solutions.com>
>
>     OpenSIPS Bootcamp 2017, Houston, US
>        http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
>     <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 <http://1.2.3.4:53875>,
>>     +12345678 at cooldomain.aq <mailto:12345678 at cooldomain.aq>, , -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
>>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>     <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170621/09b9a099/attachment.html>


More information about the Users mailing list