[SR-Users] Intermittent error seen when using a python script in kamailio
Daniel-Constantin Mierla
miconda at gmail.com
Wed Feb 23 14:10:54 CET 2022
Hello,
how often they show up and is there high volume of traffic at that moment?
Cheers,
Daniel
On 23.02.22 11:44, Wojciech Kopciewicz wrote:
> Hi,
>
> Yes, those values are hard-coded strings.
>
> Pozdrawiam / Best regards,
> Wojtek
>
>
> On Wed, Feb 23, 2022 at 8:25 AM Daniel-Constantin Mierla
> <miconda at gmail.com> wrote:
>
> Hello,
>
> do you check that header_name parameter set for
> KSR.hdr.is_present() is a string value?
>
> Cheers,
> Daniel
>
> On 22.02.22 15:36, Wojciech Kopciewicz wrote:
>>
>> Hi,
>>
>> Intermittently we are observing the following error when checking
>> if given header is present in SIP INVITE:
>>
>> SystemError: returned a result with an error set
>>
>> The complete stack trace is (some names redacted):
>> 11(28) ERROR: {1 195 INVITE nMHZDN.10nOIDt4ldOwz5cqz0XnMepA9}
>> app_python3 [python_support.c:156]: python_handle_exception():
>> apy_exec: modify_headers((null)): Unhandled exception in the
>> Python code:
>> TypeError: an integer is required (got type NoneType)
>>
>> The above exception was the direct cause of the following exception:
>>
>> Traceback (most recent call last):
>> File "/etc/kamailio/kamailio.py", line 25, in modify_headers
>> self.modify_header("SomeHeader")
>> File "/etc/kamailio/kamailio.py", line 29, in modify_header
>> present = KSR.hdr.is_present(header_name)
>> SystemError: returned a result with an error set
>>
>> Kamailio version (kamailio -v output):
>>
>> version: kamailio 5.4.6 (x86_64/linux)
>>
>> flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
>> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC,
>> Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
>> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
>> USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES,
>> TLS_PTHREAD_MUTEX_SHARED
>> ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144,
>> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>> id: unknown
>> compiled with gcc 8.3.0
>>
>> Operation system: Linux kamailio-5c7484c74d-vhhr8
>> 5.4.0-1056-azure #58~18.04.1-Ubuntu SMP Wed Jul 28 23:14:18 UTC
>> 2021 x86_64 GNU/Linux
>>
>> Are you able to help me find the root cause of this issue?
>>
>> Pozdrawiam / Best regards,
>> Wojtek
>>
>> /For more information on how and why we collect your personal
>> information, please visit our Privacy Policy
>> <https://www.motorolasolutions.com/en_us/about/privacy-policy.html?elqTrackId=8980d888905940e39a2613a7a3dcb0a7&elqaid=2786&elqat=2#privacystatement>./
>>
>>
>> __________________________________________________________
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> * sr-users at lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to the sender!
>> Edit mailing list options or unsubscribe:
>> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.kamailio.org_cgi-2Dbin_mailman_listinfo_sr-2Dusers&d=DwMDaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=CCE2EDt4eKanG8YC1Bxc51CQSyCg0YpKbySFR-sqilb-wdhYCRYU-pAI_eYmCu2v&s=oNz1IY8iG084QGzn9D7M4d5CSZ2xiCNdRm22mixUGjA&e=>
>
> --
> Daniel-Constantin Mierla -- www.asipto.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.asipto.com&d=DwMDaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=CCE2EDt4eKanG8YC1Bxc51CQSyCg0YpKbySFR-sqilb-wdhYCRYU-pAI_eYmCu2v&s=pnzsCbZ_eh8dJX6QplBGIAK-EmQkpN_VjRyxXF0SFxo&e=>
> www.twitter.com/miconda <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.twitter.com_miconda&d=DwMDaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=CCE2EDt4eKanG8YC1Bxc51CQSyCg0YpKbySFR-sqilb-wdhYCRYU-pAI_eYmCu2v&s=iWp3lX8ri4p3VEeSGTnGf6vgaEBQDXLQmnskbOwLB3E&e=> -- www.linkedin.com/in/miconda <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.linkedin.com_in_miconda&d=DwMDaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=CCE2EDt4eKanG8YC1Bxc51CQSyCg0YpKbySFR-sqilb-wdhYCRYU-pAI_eYmCu2v&s=1iFgA-q0-_ZShBF-FItoq6r0sAg09N2RKDLCO80LzGw&e=>
> Kamailio Advanced Training - Online
> Mar 28-31, 2022 (Europe Timezone)
> * https://www.asipto.com/sw/kamailio-advanced-training-online/ <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.asipto.com_sw_kamailio-2Dadvanced-2Dtraining-2Donline_&d=DwMDaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=CCE2EDt4eKanG8YC1Bxc51CQSyCg0YpKbySFR-sqilb-wdhYCRYU-pAI_eYmCu2v&s=QwGb6KwCF4tHdyutmu1wpA-aRpIRbvyVHS1wcj34mdA&e=>
>
>
> /For more information on how and why we collect your personal
> information, please visit our Privacy Policy
> <https://www.motorolasolutions.com/en_us/about/privacy-policy.html?elqTrackId=8980d888905940e39a2613a7a3dcb0a7&elqaid=2786&elqat=2#privacystatement>./
>
--
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
Mar 28-31, 2022 (Europe Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220223/05896e91/attachment.htm>
More information about the sr-users
mailing list