[SR-Users] Intermittent error seen when using a python script in kamailio
Wojciech Kopciewicz
wojciech.kopciewicz at motorolasolutions.com
Wed Apr 27 16:21:36 CEST 2022
In this particular case you mean that display_headers must return an
integer?
Pozdrawiam / Best regards,
Wojtek
On Wed, Apr 27, 2022 at 4:18 PM Anthony Alba <ascanio.alba7 at gmail.com>
wrote:
> Note that some top-level methods *MUST* return integers like 1 for success
> and 0 for failure. You cannot let the method fallthrough to None. Try
> returning an int everywhere until you get it working.
>
>
> On Mon, 4 Apr 2022, 23:20 Daniel-Constantin Mierla, <miconda at gmail.com>
> wrote:
>
>> I am not using Python module myself, although I helped adding Kemi
>> support to it. It is not easy for me to create a testbed and try to
>> reproduce. Maybe you can create a minimal config and a sipp scenario that
>> can reproduce it. That could help the non-python developers to troubleshoot.
>>
>> Cheers,
>> Daniel
>> On 01.04.22 15:40, Wojciech Kopciewicz wrote:
>>
>> Any thoughts on this?
>>
>> Pozdrawiam / Best regards,
>> Wojtek
>>
>>
>> On Fri, Feb 25, 2022 at 9:30 AM Wojciech Kopciewicz <
>> wojciech.kopciewicz at motorolasolutions.com> wrote:
>>
>>> Hi Daniel,
>>>
>>> This is still a development setup so the traffic is very small - a few
>>> calls a day.
>>> It seems that the issue can be seen during first calls after some
>>> inactivity.
>>>
>>> Pozdrawiam / Best regards,
>>> Wojtek
>>>
>>>
>>> On Wed, Feb 23, 2022 at 2:11 PM Daniel-Constantin Mierla <
>>> miconda at gmail.com> wrote:
>>>
>>>> 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 <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.asipto.com&d=DwMDaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=ciUm5591lbERv9MC6e_pLveQYX7zQZLMLzi4r2na0WG0tvcJeJNOtw77DQ7-OgGU&s=zJFtVCAWufSwSehp6pvpr04uyL6lD3FGqDeaFPv944I&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=ciUm5591lbERv9MC6e_pLveQYX7zQZLMLzi4r2na0WG0tvcJeJNOtw77DQ7-OgGU&s=qUYXpFu_MBwO--p70pHIPCfpxAjJtZr3uBK5K-mGvFA&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=ciUm5591lbERv9MC6e_pLveQYX7zQZLMLzi4r2na0WG0tvcJeJNOtw77DQ7-OgGU&s=9swPTb_vUy_tOOdA5cLpzqwo46lZcq49D8HfUU5nukk&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=ciUm5591lbERv9MC6e_pLveQYX7zQZLMLzi4r2na0WG0tvcJeJNOtw77DQ7-OgGU&s=vuZxuK6JIx5vA6L8rdnutswybBv_85F8w0JaOSr-9Ps&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>.*
>>
>> __________________________________________________________
>> 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=DwMFaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=aWgCJ_duDoeaV1anSQM8WPFr7vhBPzQ0fz-E209IUWgqBFib5wpUombvvUBE4WDe&s=49ifriU0RNo5hPDx2He00teXiGOkpMrUNUL1thF2n3I&e=>
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.asipto.com&d=DwMFaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=aWgCJ_duDoeaV1anSQM8WPFr7vhBPzQ0fz-E209IUWgqBFib5wpUombvvUBE4WDe&s=SKl2R95SsNSxcSLbV8RB9EXWDdXdF4pvX6ZbfuTCAuk&e=>www.twitter.com/miconda <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.twitter.com_miconda&d=DwMFaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=aWgCJ_duDoeaV1anSQM8WPFr7vhBPzQ0fz-E209IUWgqBFib5wpUombvvUBE4WDe&s=jPyIp4IaKFtJ7-zMGjm1uSg_8KAdU7FtxvYjWresFkg&e=> -- www.linkedin.com/in/miconda <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.linkedin.com_in_miconda&d=DwMFaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=aWgCJ_duDoeaV1anSQM8WPFr7vhBPzQ0fz-E209IUWgqBFib5wpUombvvUBE4WDe&s=uYnSJ1DFL1HoY-76EuWToSn8OecvtIb9npVaR9ikjfs&e=>
>> Kamailio Advanced Training - Online
>> March 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=DwMFaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=aWgCJ_duDoeaV1anSQM8WPFr7vhBPzQ0fz-E209IUWgqBFib5wpUombvvUBE4WDe&s=-_tY6OOQBt6YOygx4KofWGnh4qrZr588Gn-p8BjRS4A&e=>
>>
>> __________________________________________________________
>> 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=DwMFaQ&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=aWgCJ_duDoeaV1anSQM8WPFr7vhBPzQ0fz-E209IUWgqBFib5wpUombvvUBE4WDe&s=49ifriU0RNo5hPDx2He00teXiGOkpMrUNUL1thF2n3I&e=>
>>
> __________________________________________________________
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__lists.kamailio.org_cgi-2Dbin_mailman_listinfo_sr-2Dusers&d=DwICAg&c=q3cDpHe1hF8lXU5EFjNM_C93KOmcBXCBnhee2v6PYlc&r=RsXkMe6sb2-9yHQUV8KP4MrUtS9gOAiWNJa5xB5cLRjcZVaHW3sjBwy6Fjb928KS&m=aWgCJ_duDoeaV1anSQM8WPFr7vhBPzQ0fz-E209IUWgqBFib5wpUombvvUBE4WDe&s=49ifriU0RNo5hPDx2He00teXiGOkpMrUNUL1thF2n3I&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>.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220427/d034c587/attachment.htm>
More information about the sr-users
mailing list