<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>I looked at the code and actually the log message from the c code
      is printed on SIP reply handler. So look at the reply of the
      PUBLISH and see if it has expires header.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 22.06.20 21:41, Denys Pozniak wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+x3AxoGK00diFgW-o9sbGPAeOxZnGnoog8nhXDAT20JWpJnbA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hello!
        <div><br>
          <div>I added logging to onsend_route (as I understand this is
            only one place to catch publishes):</div>
          <div><br>
          </div>
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
            <div>if ( is_method("PUBLISH") ) {</div>
            <div>  xlog("L_WARN", "[PUBLISH] $rm/$ru
              expires=$hdr(Expires) [$ci]\n");</div>
            <div>}</div>
          </blockquote>
          <div><br>
          </div>
          <div>Got output:</div>
          <div><br>
          </div>
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
            <div>64(13374) WARNING: <script>: [PUBLISH] PUBLISH/<a
                href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>
              expires=7201 [<a
                href="mailto:0cd27f8b0b9651ca-13374@10.10.10.125"
                moz-do-not-send="true">0cd27f8b0b9651ca-13374@10.10.10.125</a>]</div>
            <div> 8(13315) ERROR: pua [send_publish.c:304]:
              publ_cback_func(): No Expires header found</div>
            <div><br>
            </div>
            <div>64(13374) WARNING: <script>: [PUBLISH] PUBLISH/<a
                href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>
              expires=11 [<a
                href="mailto:0cd27f8b0b9651cc-13374@10.10.10.125"
                moz-do-not-send="true">0cd27f8b0b9651cc-13374@10.10.10.125</a>]</div>
            <div> 7(13314) ERROR: pua [send_publish.c:304]:
              publ_cback_func(): No Expires header found</div>
          </blockquote>
          <div><br>
            And SIP PUBLISHes:</div>
          <div><br>
          </div>
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
            <div>2020/06/22 21:29:59.724833 <a
                href="http://10.10.10.125:5060" moz-do-not-send="true">10.10.10.125:5060</a>
              -> <a href="http://10.10.10.126:5060"
                moz-do-not-send="true">10.10.10.126:5060</a></div>
            <div>PUBLISH <a href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>
              SIP/2.0</div>
            <div>Via: SIP/2.0/UDP
              10.10.10.125;branch=z9hG4bK960b.3f81b5e2000000000000000000000000.0</div>
            <div>To: <<a href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>></div>
            <div>From: <<a href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>>;tag=154c77e64b07d40a0bc49115911058a7-42b5</div>
            <div>CSeq: 10 PUBLISH</div>
            <div>Call-ID: <a
                href="mailto:0cd27f8b0b9651ca-13374@10.10.10.125"
                moz-do-not-send="true">0cd27f8b0b9651ca-13374@10.10.10.125</a></div>
            <div>Content-Length: 651</div>
            <div>User-Agent: Proxy</div>
            <div>Max-Forwards: 70</div>
            <div>Event: dialog</div>
            <div>Expires: 7201</div>
            <div>Content-Type: application/dialog-info+xml</div>
            <div><br>
            </div>
            <div><?xml version="1.0"?></div>
            <div><dialog-info
              xmlns="urn:ietf:params:xml:ns:dialog-info" version="0"
              state="full" entity="<a
                href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>"></div>
            <div>  <dialog id="9a422dd4-2f61-1239-a0b7-001dd8b71cb2"
              call-id="9a422dd4-2f61-1239-a0b7-001dd8b71cb2"
              local-tag="2882179052" remote-tag="SvXmvgH8jvrra"
              direction="recipient"></div>
            <div>    <state>early</state></div>
            <div>    <remote></div>
            <div>      <identity><a
                href="mailto:sip%3Asrc_exten@10.10.10.123"
                moz-do-not-send="true">sip:src_exten@10.10.10.123</a></identity></div>
            <div>      <target uri="<a
                href="http://sip:mod_sofia@10.10.10.123:5060"
                moz-do-not-send="true">sip:mod_sofia@10.10.10.123:5060</a>"/></div>
            <div>    </remote></div>
            <div>    <local></div>
            <div>      <identity><a
                href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a></identity></div>
            <div>      <target
              uri=<a class="moz-txt-link-rfc2396E" href="sip:dst_exten@1.1.1.6:12155;transport=TCP">"sip:dst_exten@1.1.1.6:12155;transport=TCP"</a>/></div>
            <div>    </local></div>
            <div>  </dialog></div>
            <div></dialog-info></div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>2020/06/22 21:30:02.351993 <a
                href="http://10.10.10.125:5060" moz-do-not-send="true">10.10.10.125:5060</a>
              -> <a href="http://10.10.10.126:5060"
                moz-do-not-send="true">10.10.10.126:5060</a></div>
            <div>PUBLISH <a href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>
              SIP/2.0</div>
            <div>Via: SIP/2.0/UDP
              10.10.10.125;branch=z9hG4bKb60b.d7b81cd5000000000000000000000000.0</div>
            <div>To: <<a href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>></div>
            <div>From: <<a href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>>;tag=154c77e64b07d40a0bc49115911058a7-99de</div>
            <div>CSeq: 10 PUBLISH</div>
            <div>Call-ID: <a
                href="mailto:0cd27f8b0b9651cc-13374@10.10.10.125"
                moz-do-not-send="true">0cd27f8b0b9651cc-13374@10.10.10.125</a></div>
            <div>Content-Length: 586</div>
            <div>User-Agent: Proxy</div>
            <div>Max-Forwards: 70</div>
            <div>Event: dialog</div>
            <div>Expires: 11</div>
            <div>Content-Type: application/dialog-info+xml</div>
            <div><br>
            </div>
            <div><?xml version="1.0"?></div>
            <div><dialog-info
              xmlns="urn:ietf:params:xml:ns:dialog-info" version="0"
              state="full" entity="<a
                href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>"></div>
            <div>  <dialog id="9a422dd4-2f61-1239-a0b7-001dd8b71cb2"
              call-id="9a422dd4-2f61-1239-a0b7-001dd8b71cb2"
              direction="recipient"></div>
            <div>    <state>terminated</state></div>
            <div>    <remote></div>
            <div>      <identity><a
                href="mailto:sip%3Asrc_exten@10.10.10.123"
                moz-do-not-send="true">sip:src_exten@10.10.10.123</a></identity></div>
            <div>      <target uri="<a
                href="http://sip:mod_sofia@10.10.10.123:5060"
                moz-do-not-send="true">sip:mod_sofia@10.10.10.123:5060</a>"/></div>
            <div>    </remote></div>
            <div>    <local></div>
            <div>      <identity><a
                href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a></identity></div>
            <div>      <target uri="<a
                href="mailto:sip%3Adst_exten@10.10.10.126"
                moz-do-not-send="true">sip:dst_exten@10.10.10.126</a>"/></div>
            <div>    </local></div>
            <div>  </dialog></div>
            <div></dialog-info></div>
          </blockquote>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">пн, 22 июн. 2020 г. в 13:12,
          Daniel-Constantin Mierla <<a
            href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@gmail.com</a>>:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>Hello,</p>
            <p>can you print the Expires header with xlog() to see what
              value is written in syslog? Just to be sure the header is
              not removed by other processing rules and msg apply
              changes...</p>
            <p>Cheers,<br>
              Daniel<br>
            </p>
            <div>On 22.06.20 09:41, Denys Pozniak wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Hello!
                <div><br>
                </div>
                <div>Any help is appreciated.<br>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">вт, 16 июн. 2020 г. в
                  15:04, Denys Pozniak <<a
                    href="mailto:denys.pozniak@gmail.com"
                    target="_blank" moz-do-not-send="true">denys.pozniak@gmail.com</a>>:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div dir="ltr">Hello!
                    <div><br>
                    </div>
                    <div>Could someone point me to the possible source
                      of the problem?</div>
                    <div><br>
                      <div>
                        <div>Jun 16 09:51:06 proxy-edge
                          /usr/sbin/kamailio[9645]: ERROR: pua
                          [send_publish.c:304]: publ_cback_func(): No
                          Expires header found<br>
                          Jun 16 09:51:07 proxy-edge
                          /usr/sbin/kamailio[9640]: ERROR: pua
                          [send_publish.c:304]: publ_cback_func(): No
                          Expires header found<br>
                          Jun 16 09:51:07 proxy-edge
                          /usr/sbin/kamailio[9600]: ERROR: pua
                          [send_publish.c:304]: publ_cback_func(): No
                          Expires header found<br>
                          Jun 16 09:51:07 proxy-edge
                          /usr/sbin/kamailio[9660]: ERROR: pua
                          [send_publish.c:304]: publ_cback_func(): No
                          Expires header found<br>
                        </div>
                        <div><br>
                        </div>
                        <div>Modules settings:</div>
                        <div><br>
                        </div>
                      </div>
                    </div>
                    <blockquote style="margin:0px 0px 0px
                      40px;border:none;padding:0px">
                      <div>
                        <div>
                          <div><i>loadmodule "pua.so"</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>loadmodule "pua_dialoginfo"</i></div>
                        </div>
                      </div>
                      <div>
                        <div><i>loadmodule "dialog.so" </i></div>
                        <div><i> <br>
                          </i></div>
                      </div>
                      <div>
                        <div><i>modparam("pua", "default_expires", 1200)</i></div>
                      </div>
                      <div>
                        <div><i>modparam("pua", "outbound_proxy",
                            LOCAL_IP_ADDR)</i></div>
                      </div>
                      <div>
                        <div><i>modparam("pua_dialoginfo",
                            "include_callid", 1)</i></div>
                      </div>
                      <div><i><br>
                        </i></div>
                      <div>
                        <div><i>modparam("pua_dialoginfo",
                            "include_localremote", 1)</i></div>
                      </div>
                      <div>
                        <div><i>modparam("pua_dialoginfo",
                            "include_tags", 1)</i></div>
                      </div>
                      <div>
                        <div><i>modparam("pua_dialoginfo",
                            "send_publish_flag", 8)</i></div>
                      </div>
                      <div><i><br>
                        </i></div>
                      <div><i>modparam("dialog", "dlg_flag", 4)<br>
                          modparam("dialog", "db_mode", 0)<br>
                          modparam("dialog", "enable_stats", 1)<br>
                          modparam("dialog", "dlg_match_mode", 1)<br>
                          modparam("dialog", "default_timeout", 7200)<br>
                           modparam("dialog", "hash_size", 8192)<br>
                        </i></div>
                      <div><i><br>
                        </i></div>
                    </blockquote>
                    <blockquote style="margin:0px 0px 0px
                      40px;border:none;padding:0px">
                      <div><i>request_route{</i></div>
                      <div><i>...</i></div>
                      <div><i>setflag(8);<br>
                        </i></div>
                      <div><i>...</i></div>
                      <div><i>}</i></div>
                      <div><br>
                      </div>
                    </blockquote>
                    <div>
                      <div><br>
                      </div>
                      <div>Generated SIP PUBLISH:</div>
                      <div><br>
                      </div>
                    </div>
                    <blockquote style="margin:0px 0px 0px
                      40px;border:none;padding:0px">
                      <div>
                        <div>
                          <div><i>PUBLISH <a
                                href="mailto:sip%3Aextension@sip.company.com"
                                target="_blank" moz-do-not-send="true">sip:extension@sip.company.com</a>
                              SIP/2.0</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>Via: SIP/2.0/UDP
                              8.8.8.8;branch=z9hG4bK3e55.afdce977000000000000000000000000.0</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>To: <<a
                                href="mailto:sip%3Aextension@sip.company.com"
                                target="_blank" moz-do-not-send="true">sip:extension@sip.company.com</a>></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>From: <<a
                                href="mailto:sip%3Aextension@sip.company.com"
                                target="_blank" moz-do-not-send="true">sip:extension@sip.company.com</a>>;tag=e98d9fc94bada9746d67946ab287a76f-ba77</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>CSeq: 10 PUBLISH</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>Call-ID: <a
                                href="mailto:72ef85f374c8e703-9659@10.10.10.10"
                                target="_blank" moz-do-not-send="true">72ef85f374c8e703-9659@10.10.10.10</a></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>Content-Length: 578</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>User-Agent: proxy</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>Max-Forwards: 70</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>Event: dialog</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><span
                              style="background-color:rgb(255,255,0)"><i>Expires:
                                7201</i></span></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>Content-Type:
                              application/dialog-info+xml</i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i><br>
                            </i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i><?xml version="1.0"?></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i><dialog-info
                              xmlns="urn:ietf:params:xml:ns:dialog-info"
                              version="0" state="full" entity="<a
                                href="mailto:sip%3Aextension@sip.company.com"
                                target="_blank" moz-do-not-send="true">sip:extension@sip.company.com</a>"></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>  <dialog id=<a
                                href="mailto:162092997-5060-464@BJC.BGI.CA.BBI"
                                target="_blank" moz-do-not-send="true">"162092997-5060-464@BJC.BGI.CA.BBI"</a>
                              call-id=<a
                                href="mailto:162092997-5060-464@BJC.BGI.CA.BBI"
                                target="_blank" moz-do-not-send="true">"162092997-5060-464@BJC.BGI.CA.BBI"</a>
                              direction="initiator"></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>    <state>Trying</state></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>    <remote></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>      <identity><a
                                href="mailto:sip%3A1234567890@sip.company.com"
                                target="_blank" moz-do-not-send="true">sip:1234567890@sip.company.com</a></identity></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>      <target uri="<a
                                href="mailto:sip%3A1234567890@sip.company.com"
                                target="_blank" moz-do-not-send="true">sip:1234567890@sip.company.com</a>"/></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>    </remote></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>    <local></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>      <identity><a
                                href="mailto:sip%3Aextension@sip.company.com"
                                target="_blank" moz-do-not-send="true">sip:extension@sip.company.com</a></identity></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>      <target uri="<a
                                href="mailto:sip%3Aextension@sip.company.com"
                                target="_blank" moz-do-not-send="true">sip:extension@sip.company.com</a>"/></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>    </local></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i>  </dialog></i></div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div><i></dialog-info></i></div>
                        </div>
                      </div>
                    </blockquote>
                    <div>
                      <div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        -- <br>
                        <div dir="ltr">
                          <div dir="ltr"><br>
                            <div>
                              <div>BR,</div>
                              <div>Denys Pozniak<br>
                              </div>
                              <div><br>
                              </div>
                              <div><br>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br clear="all">
              <div><br>
              </div>
              -- <br>
              <div dir="ltr">
                <div dir="ltr"><br>
                  <div>
                    <div>BR,</div>
                    <div>Denys Pozniak<br>
                    </div>
                    <div><br>
                    </div>
                    <div><br>
                    </div>
                  </div>
                </div>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
            </blockquote>
            <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
          </div>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr"><br>
          <div>
            <div>BR,</div>
            <div>Denys Pozniak<br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
  </body>
</html>