Summary: | ASTERISK-16519: [patch] Function CONNECTEDLINE causes Asterisk to exit | ||
Reporter: | John Todd (jtodd) | Labels: | |
Date Opened: | 2010-08-06 13:05:37 | Date Closed: | 2010-09-02 11:42:35 |
Priority: | Blocker | Regression? | No |
Status: | Closed/Complete | Components: | Functions/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) Astricon_2009.odp ( 1) connectedline-bt-full.txt ( 2) issue17808.patch | |
Description: | Calling the CONNECTEDLINE function causes Asterisk to exit. No core, no indications. Just exit. This is on OpenBSD 4.6. I have complied with DONT_OPTIMIZE but that seems to make no difference. ****** ADDITIONAL INFORMATION ****** My dialplan: exten => 994,1,Wait(4) exten => 994,n,Set(CONNECTEDLINE(all)=Foobar) exten => 994,n,Answer exten => 994,n,Playback(tt-monkeys) exten => 994,n,Hangup Here is the CLI output with debug and vebose at 9: core1*CLI> core1*CLI> [Aug 6 17:58:27] DEBUG[4409]: acl.c:706 ast_ouraddrfor: For destination '10.10.1.7', our source address is '10.10.1.1'. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:3224 ast_sip_ouraddrfor: Setting SIP_TRANSPORT_UDP with address 10.10.1.1:5060 [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:7162 sip_alloc: Allocating new SIP dialog for 00059bf1-a0de0060-0168ba26-7eb80793@10.10.1.7 - INVITE (No RTP) [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:23366 handle_incoming: **** Received INVITE (5) - Command in SIP INVITE [Aug 6 17:58:27] DEBUG[4409]: sip/reqresp_parser.c:1584 parse_sip_options: Begin: parsing SIP "Supported: replaces,join,norefersub" [Aug 6 17:58:27] DEBUG[4409]: sip/reqresp_parser.c:1600 parse_sip_options: Found SIP option: -replaces- [Aug 6 17:58:27] DEBUG[4409]: sip/reqresp_parser.c:1608 parse_sip_options: Matched SIP option: replaces [Aug 6 17:58:27] DEBUG[4409]: sip/reqresp_parser.c:1600 parse_sip_options: Found SIP option: -join- [Aug 6 17:58:27] DEBUG[4409]: sip/reqresp_parser.c:1608 parse_sip_options: Matched SIP option: join [Aug 6 17:58:27] DEBUG[4409]: sip/reqresp_parser.c:1600 parse_sip_options: Found SIP option: -norefersub- [Aug 6 17:58:27] DEBUG[4409]: sip/reqresp_parser.c:1608 parse_sip_options: Matched SIP option: norefersub [Aug 6 17:58:27] DEBUG[4409]: netsock2.c:125 _ast_sockaddr_parse: Splitting '10.10.1.7:5060' gives... [Aug 6 17:58:27] DEBUG[4409]: netsock2.c:155 _ast_sockaddr_parse: ...host '10.10.1.7' and port '5060'. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:3060 __sip_xmit: Trying to put 'SIP/2.0 401' onto UDP socket destined for 10.10.1.7:5060 [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:23366 handle_incoming: **** Received ACK (6) - Command in SIP ACK [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:3749 __sip_ack: Stopping retransmission on '00059bf1-a0de0060-0168ba26-7eb80793@10.10.1.7' of Response 101: Match Found [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:23366 handle_incoming: **** Received INVITE (5) - Command in SIP INVITE [Aug 6 17:58:27] DEBUG[4409]: netsock2.c:125 _ast_sockaddr_parse: Splitting '10.10.1.7:5060' gives... [Aug 6 17:58:27] DEBUG[4409]: netsock2.c:155 _ast_sockaddr_parse: ...host '10.10.1.7' and port '5060'. [Aug 6 17:58:27] DEBUG[4409]: rtp_engine.c:340 ast_rtp_instance_new: Using engine 'asterisk' for RTP instance '0x808ec0c0' [Aug 6 17:58:27] DEBUG[4409]: res_rtp_asterisk.c:468 ast_rtp_new: Allocated port 10506 for RTP instance '0x808ec0c0' [Aug 6 17:58:27] DEBUG[4409]: rtp_engine.c:349 ast_rtp_instance_new: RTP instance '0x808ec0c0' is setup and ready to go [Aug 6 17:58:27] DEBUG[4409]: res_rtp_asterisk.c:2335 ast_rtp_prop_set: Setup RTCP on RTP instance '0x808ec0c0' [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:4639 do_setnat: Setting NAT on RTP to Off [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8113 process_sdp: Processing session-level SDP v=0... UNSUPPORTED. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8113 process_sdp: Processing session-level SDP o=Cisco-SIPUA 366 0 IN IP4 10.10.1.7... UNSUPPORTED. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8113 process_sdp: Processing session-level SDP s=SIP Call... UNSUPPORTED. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8113 process_sdp: Processing session-level SDP t=0 0... UNSUPPORTED. [Aug 6 17:58:27] DEBUG[4409]: rtp_engine.c:519 ast_rtp_codecs_payloads_set_m_type: Setting payload 0 based on m type on 0x84f160c0 [Aug 6 17:58:27] DEBUG[4409]: rtp_engine.c:519 ast_rtp_codecs_payloads_set_m_type: Setting payload 8 based on m type on 0x84f160c0 [Aug 6 17:58:27] DEBUG[4409]: rtp_engine.c:519 ast_rtp_codecs_payloads_set_m_type: Setting payload 18 based on m type on 0x84f160c0 [Aug 6 17:58:27] DEBUG[4409]: rtp_engine.c:519 ast_rtp_codecs_payloads_set_m_type: Setting payload 101 based on m type on 0x84f160c0 [Aug 6 17:58:27] DEBUG[4409]: netsock2.c:125 _ast_sockaddr_parse: Splitting '10.10.1.7' gives... [Aug 6 17:58:27] DEBUG[4409]: netsock2.c:155 _ast_sockaddr_parse: ...host '10.10.1.7' and port '(null)'. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8298 process_sdp: Processing media-level (audio) SDP c=IN IP4 10.10.1.7... OK. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8298 process_sdp: Processing media-level (audio) SDP a=rtpmap:0 PCMU/8000... OK. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8298 process_sdp: Processing media-level (audio) SDP a=rtpmap:8 PCMA/8000... OK. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8298 process_sdp: Processing media-level (audio) SDP a=rtpmap:18 G729/8000... OK. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8298 process_sdp: Processing media-level (audio) SDP a=fmtp:18 annexb=no... UNSUPPORTED. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8298 process_sdp: Processing media-level (audio) SDP a=rtpmap:101 telephone-event/8000... OK. [Aug 6 17:58:27] DEBUG[4409]: chan_sip.c:8298 process_sdp: Processing media-level (audio) SDP a=sendrecv... OK. [Aug 6 17:58:27] DEBUG[4409]: app_queue.c:1324 handle_statechange: Device 'SIP/2203' changed to state '1' (Not in use) but we don't care because they're not a member of any queue. core1*CLI> core1*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). | ||
Comments: | By: Paul Belanger (pabelanger) 2010-08-06 13:56:11 Any chance you didn't pass the -g flag to asterisk? What about running asterisk from gdb? Going to try and reproduce. By: Leif Madsen (lmadsen) 2010-08-06 14:27:14 jtodd has requested feedback from the reporter stating that he needs to test this on Linux and not just FreeBSD/OpenBSD By: John Todd (jtodd) 2010-08-06 14:41:02 pabelanger - yes, good point. That gets me the core I want. I thought I had it aliased, but apparently I didn't. Here's the backtrace on OpenBSD: ...blahblahblah... Reading symbols from /usr/lib/asterisk/modules/app_saycounted.so...done. Loaded symbols for /usr/lib/asterisk/modules/app_saycounted.so Reading symbols from /usr/lib/asterisk/modules/format_g719.so...done. Loaded symbols for /usr/lib/asterisk/modules/format_g719.so #0 0x1c073630 in party_id_build_data (data=0x87b530f3 "", datalen=1021, id=0x87b53550, label=0x3c016e0e "connected line", ies=0x3c016d80, update=0x3) at channel.c:7800 7800 if (!update || update->name) { (gdb) bt #0 0x1c073630 in party_id_build_data (data=0x87b530f3 "", datalen=1021, id=0x87b53550, label=0x3c016e0e "connected line", ies=0x3c016d80, update=0x3) at channel.c:7800 #1 0x1c073924 in ast_connected_line_build_data (data=0x87b530f0 "\n\001\002", datalen=1024, connected=0x87b53550, update=0x3) at channel.c:7930 #2 0x1c0740b8 in ast_channel_update_connected_line (chan=0x8ae5a8c0, connected=0x87b53550, update=0x3) at channel.c:8155 #3 0x02304238 in connectedline_write (chan=0x8ae5a8c0, cmd=0x87b537c0 "CONNECTEDLINE", data=0x87b537ce "all", value=0x87b53580 "") at func_connectedline.c:249 #4 0x1c0e77ae in ast_func_write (chan=0x8ae5a8c0, function=0x87b53840 "CONNECTEDLINE(all)", value=0x87b538e3 "Foobar") at pbx.c:3568 ASTERISK-1 0x1c0fa4ff in pbx_builtin_setvar_helper (chan=0x8ae5a8c0, name=0x87b538d0 "CONNECTEDLINE(all)", value=0x87b538e3 "Foobar") at pbx.c:9477 ASTERISK-2 0x1c0fa93d in pbx_builtin_setvar (chan=0x8ae5a8c0, data=0x87b53c40 "CONNECTEDLINE(all)=Foobar") at pbx.c:9545 ASTERISK-3 0x1c0e03a7 in pbx_exec (c=0x8ae5a8c0, app=0x8322ec00, data=0x87b53c40 "CONNECTEDLINE(all)=Foobar") at strings.h:64 ASTERISK-4 0x1c0e8c16 in pbx_extension_helper (c=0x8ae5a8c0, con=0x0, context=0x8ae5ac28 "to-binfone", exten=0x8ae5ac78 "994", priority=2, label=0x0, callerid=0x829ed850 "2203", action=E_SPAWN, found=0x87b57e4c, combined_find_spawn=1) at pbx.c:4074 ASTERISK-5 0x1c0ea241 in ast_spawn_extension (c=0x8ae5a8c0, context=0x8ae5ac28 "to-binfone", exten=0x8ae5ac78 "994", priority=2, callerid=0x829ed850 "2203", found=0x87b57e4c, combined_find_spawn=1) at pbx.c:4566 ASTERISK-6 0x1c0ea900 in __ast_pbx_run (c=0x8ae5a8c0, args=0x0) at strings.h:64 ASTERISK-7 0x1c0ec6cd in pbx_thread (data=0x8ae5a8c0) at pbx.c:4975 ASTERISK-8 0x1c138311 in dummy_start (data=0x829ed880) at utils.c:971 ASTERISK-9 0x07d74413 in _thread_start () at /usr/src/lib/libpthread/uthread/uthread_create.c:240 ASTERISK-10 0x0000002b in ?? () ASTERISK-11 0x00000000 in ?? () (gdb) By: John Todd (jtodd) 2010-08-06 14:43:48 I don't get a crash on Ubuntu 9.04, but the same dialplan produces no connectedline information. A search through all of the SIP messages coming/going to the device (a Grandstream video phone) don't show the string "Foobar" anywhere in there, either. So it's not trying to send the data. Am I calling the CONNECTEDLINE function correctly or what? By: Paul Belanger (pabelanger) 2010-08-06 17:13:41 I _think_ I see if issue. However, not sure if this is the right approach. By: John Todd (jtodd) 2010-08-06 19:20:14 Patch applies cleanly, and Asterisk no longer crashes upon reaching the CONNECTEDLINE function in the dialplan. However, the CONNECTEDLINE function has no effect either on my Cisco 7960 (P0S3-08-6-00) or on my Grandstream GXV3000. I've again done a complete capture of the SIP transaction and indeed, the string I set is nowhere to be found in that dialog. I've tried various field names (name, name-pres, all). Is it just me or is there no documentation, explanation, or examples of how this is supposed to work anywhere to be found? There was even a talk on this at AstriCon last year, but @#%@#%!!! there is no video for reasons that won't re-occur this year. By: John Todd (jtodd) 2010-08-08 12:38:19 Upon receipt of Mark Michelson's AstriCon presentation, I added "sendrpid=yes" and "trustrpid=yes" to all my SIP peers and to the general configuration areas of sip.conf. No change in behavior - CONNECTEDLINE has no effect. Tried with Blink, Cisco 7960, and Grandstream again. Note: the patch supplied makes it so Asterisk does not crash on OpenBSD. Hooray! But CONNECTEDLINE still needs either: a) better (any) documentation, or b) fixing. By: Richard Mudgett (rmudgett) 2010-08-19 15:22:17 That patch effectively disables party id processing for the CONNECTEDLINE and REDIRECTING to/from parties. It is not a good patch because it makes CONNECTEDLINE a no operation. What is weird is the value of update is 0x3 in the backtrace. Most calls to ast_channel_update_connected_line() are going to set update to NULL since they are not trying to specify what part of a party id to update. In fact CONNECTEDLINE calls it with update set to NULL. By: Richard Mudgett (rmudgett) 2010-08-23 18:47:14 Another reason you don't have Foobar going out is there is no number. You only only supplied a name in your sample dialplan. chan_sip will not send out connected line information if there is no number. By: Digium Subversion (svnbot) 2010-09-02 11:34:33 Repository: asterisk Revision: 284698 U branches/1.8/doc/tex/asterisk.tex U branches/1.8/doc/tex/channelvariables.tex A branches/1.8/doc/tex/partymanip.tex ------------------------------------------------------------------------ r284698 | rmudgett | 2010-09-02 11:34:33 -0500 (Thu, 02 Sep 2010) | 5 lines Added documentation for CONNECTEDLINE and REDIRECTING functions. (closes issue ASTERISK-16519) Reported by: jtodd ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=284698 By: Digium Subversion (svnbot) 2010-09-02 11:35:39 Repository: asterisk Revision: 284699 _U trunk/ U trunk/doc/tex/asterisk.tex U trunk/doc/tex/channelvariables.tex A trunk/doc/tex/partymanip.tex ------------------------------------------------------------------------ r284699 | rmudgett | 2010-09-02 11:35:39 -0500 (Thu, 02 Sep 2010) | 12 lines Merged revisions 284698 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r284698 | rmudgett | 2010-09-02 11:34:32 -0500 (Thu, 02 Sep 2010) | 5 lines Added documentation for CONNECTEDLINE and REDIRECTING functions. (closes issue ASTERISK-16519) Reported by: jtodd ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=284699 By: Digium Subversion (svnbot) 2010-09-02 11:40:11 Repository: asterisk Revision: 284699 _U trunk/ U trunk/doc/tex/asterisk.tex U trunk/doc/tex/channelvariables.tex A trunk/doc/tex/partymanip.tex ------------------------------------------------------------------------ r284699 | rmudgett | 2010-09-02 11:35:39 -0500 (Thu, 02 Sep 2010) | 14 lines Merged revisions 284698 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r284698 | rmudgett | 2010-09-02 11:34:32 -0500 (Thu, 02 Sep 2010) | 5 lines Added documentation for CONNECTEDLINE and REDIRECTING functions. (closes issue ASTERISK-16519) Reported by: jtodd Review: https://reviewboard.asterisk.org/r/875/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=284699 By: Digium Subversion (svnbot) 2010-09-02 11:42:34 Repository: asterisk Revision: 284698 U branches/1.8/doc/tex/asterisk.tex U branches/1.8/doc/tex/channelvariables.tex A branches/1.8/doc/tex/partymanip.tex ------------------------------------------------------------------------ r284698 | rmudgett | 2010-09-02 11:34:32 -0500 (Thu, 02 Sep 2010) | 7 lines Added documentation for CONNECTEDLINE and REDIRECTING functions. (closes issue ASTERISK-16519) Reported by: jtodd Review: https://reviewboard.asterisk.org/r/875/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=284698 |