<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div>Adding:</div><div><br></div><div>event_route[E_UL_CONTACT_REFRESH]</div><div>{</div><div> route(pm_send, $(param(uri){param.value,pn-provider}),</div><div> $(param(uri){param.value,pn-prid}),</div><div> $(param(uri){param.value,pn-param}));</div><div># $callid;</div><div># $param(callid);</div><div>}</div><div><br></div><div><br></div><div>#--</div><div>route [pm_send]</div><div>{</div><div># exec(marg.sh)</div><div>xlog(" -- ** --pn_send was called $ru\n");</div><div>xlog("pn_send: pn params: $(param(uri){param.value,pn-provider}),</div><div> $(param(uri){param.value,pn-prid}),</div><div> $(param(uri){param.value,pn-param})\n");</div><div>$var(input) = "input mine three";</div><div>#async(exec("/root/marg.sh > effect", "this is my $var(input) for exec\n", , , $avp(env));</div><div># async(exec("/root/marg.sh 5 6 7 > effect", $ru, $ru), resume_route);</div><div> exit;</div><div>}</div><div><br></div><div>question: Does the route[pm_send] need to return any value? exit does not not return value does it?</div><div><br></div><div>does the [pm_send] acually need to send the push for the INVITE to be answered by 200 OK?</div><div><br></div><div>Regards, Ronald</div><div><br></div><p>March 9, 2024 at 2:46 PM, <a href="mailto:rvg@rvgeerligs.nl" target="_blank" tabindex="-1">rvg@rvgeerligs.nl</a> wrote:</p><blockquote><div><div>Hi All,</div><div><br></div><div>I still have problems with opensips3.4 push notifications:</div><div><br></div><div>Somehow INVITEs keep looping and get rejected.</div><div><br></div><div>Code:</div><div>...</div><div>route{</div><div><br></div><div>...</div><div><br></div><div>if (has_totag()) {</div><div><br></div><div>...</div><div><br></div><div>if (!is_method("ACK"))</div><div> async (pn_process_purr("location"), resume_route);</div><div><br></div><div>...</div><div>}</div><div><br></div><div>...</div><div><br></div><div># do lookup with method filtering</div><div><br></div><div>#--</div><div> lookup("location", "method-filtering");</div><div> $var(rc) = $retcode;</div><div> switch ($var(rc)) {</div><div> case 1:</div><div> # we found at least 1 non-PN contact!</div><div> xlog("L_INFO", "DBG: 1 contacts found non-PN ($var(rc))\n");</div><div> $var(do_relay) = true;</div><div> break;</div><div> case 2:</div><div> # success, but all contacts are PN-enabled, so we're</div><div> # sending PNs / awaiting re-registrations from them</div><div> xlog("L_INFO", "DBG: contacts found send PN? ($var(rc))\n");</div><div> $var(do_relay) = false;</div><div> #$avp(skip_relay) = true;</div><div> break;</div><div> default:</div><div> xlog("L_INFO", "DBG: no contacts found ($var(rc))\n");</div><div> t_reply(404, "Not Found");</div><div> exit;</div><div> }</div><div><br></div><div> if ($var(do_relay) && !t_relay())</div><div> send_reply(500, "Internal Server Error");</div><div><br></div><div>...</div><div><br></div><div>if($var(do_relay) == true) </div><div> route(relay);</div><div>}</div><div><br></div><div>...</div><div><br></div><div>from log (looping log, it repeats):</div><div><br></div><div>DBG:core:parse_headers: this is the first via</div><div>2024-03-09T09:41:13.485706+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:_parse_to: end of header reached, state=10</div><div>2024-03-09T09:41:13.485748+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:_parse_to: display={}, ruri={sip:<a href="mailto:to@dummy.com" target="_blank" tabindex="-1">to@dummy.com</a>}</div><div>2024-03-09T09:41:13.485807+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:get_hdr_field: <To> [20]; uri=[sip:<a href="mailto:to@dummy.com" target="_blank" tabindex="-1">to@dummy.com</a>] </div><div>2024-03-09T09:41:13.485854+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:get_hdr_field: to body [<sip:<a href="mailto:to@dummy.com" target="_blank" tabindex="-1">to@dummy.com</a>>#015#012]</div><div><div>2024-03-09T09:41:13.485915+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:get_hdr_field: cseq <CSeq>: <1> </div></div><div>2024-03-09T09:41:13.485962+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:get_hdr_field: found end of header</div><div>2024-03-09T09:41:13.486040+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:parse_headers: flags=ffffffffffffffff</div><div>2024-03-09T09:41:13.486088+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:get_dummy_sip_msg: setting as static to 0xffffb1a612c0</div><div>2024-03-09T09:41:13.486145+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:evi_raise_event_msg: found subscriber E_UL_CONTACT_REFRESH</div><div>2024-03-09T09:41:13.486207+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:dup_ref_script_route_in_shm: dupping 0xffffaa264f60 [E_UL_CONTACT_REFRESH], idx 1, ver/cnt 1, to new 0xffffaa26d9e0 [E_UL_CONTACT_REFRESH], idx 1, ver/cnt 1</div><div>2024-03-09T09:41:13.486283+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:release_dummy_sip_msg: cleaning the static sip msg 0xffffb1a612c0</div><div>2024-03-09T09:41:13.486352+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:destroy_avp_list: destroying list (nil)</div><div>2024-03-09T09:41:13.486409+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:ipc_handle_job: received job type 0[RPC] from process 6</div><div>2024-03-09T09:41:13.486467+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:get_dummy_sip_msg: reusing the static sip msg 0xffffb1a612c0</div><div>2024-03-09T09:41:13.486533+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:parse_params: Parsing params for:[sip:rvg@82.151.164.77:57775;pn-prid=F1B7F53A99A35254A55CCAE2EDF80C1FAE12F353592BB6ED203ADA0175E34AD9:voip;pn-provider=apns;pn-param=ABCD1234.cllkit.voip;pn-silent=1;pn-timeout=0;transport=udp]</div><div>2024-03-09T09:41:13.486571+00:00 xsp2 /usr/local/sbin/opensips[2061136]: ERROR: -- ** --pn_send was called sip:<a href="mailto:user@dummy.com" target="_blank" tabindex="-1">user@dummy.com</a></div><div>2024-03-09T09:41:13.486651+00:00 xsp2 /usr/local/sbin/opensips[2061136]: ERROR:core:route_param_get: route $param variable accepts only integer indexes</div><div>2024-03-09T09:41:13.486746+00:00 xsp2 /usr/local/sbin/opensips[2061136]: message repeated 2 times: [ ERROR:core:route_param_get: route $param variable accepts only integer indexes]</div><div><div>2024-03-09T09:41:13.486787+00:00 xsp2 /usr/local/sbin/opensips[2061136]: ERROR:pn params: <null>,#012 ,#012 </div></div><div>2024-03-09T09:41:13.486822+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:release_dummy_sip_msg: cleaning the static sip msg 0xffffb1a612c0</div><div>2024-03-09T09:41:13.486913+00:00 xsp2 /usr/local/sbin/opensips[2061136]: DBG:core:destroy_avp_list: destroying list (nil)</div><div>2024-03-09T09:41:13.697168+00:00 xsp2 /usr/local/sbin/opensips[2061135]: DBG:core:parse_msg: SIP Request:</div><div><br></div><div>Any advice appreciated, regards,</div><div><br></div><div>Ronald Geerligs</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></blockquote><div><br></div></body></html>