<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Looking for a phone # in logs using Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39733#M9092</link>
    <description>&lt;P&gt;Newbie here, please help.&lt;/P&gt;

&lt;P&gt;Trying to search/filter for all occurrences of phone #s in my logs. Regex would be [0-9] \ {10}. I don't have a key-value pair, my log looks similar to this:
"This is an incoming call from 4151111111 on trunk 10.10.01.01 and was processed ok."&lt;/P&gt;

&lt;P&gt;Later on, I will have to filter all occurences of calls from ANY #, ONLY on the specified trunk. &lt;/P&gt;

&lt;P&gt;Thanks! A.C.&lt;/P&gt;</description>
    <pubDate>Sat, 05 Feb 2011 08:01:10 GMT</pubDate>
    <dc:creator>cadeli</dc:creator>
    <dc:date>2011-02-05T08:01:10Z</dc:date>
    <item>
      <title>Looking for a phone # in logs using Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39733#M9092</link>
      <description>&lt;P&gt;Newbie here, please help.&lt;/P&gt;

&lt;P&gt;Trying to search/filter for all occurrences of phone #s in my logs. Regex would be [0-9] \ {10}. I don't have a key-value pair, my log looks similar to this:
"This is an incoming call from 4151111111 on trunk 10.10.01.01 and was processed ok."&lt;/P&gt;

&lt;P&gt;Later on, I will have to filter all occurences of calls from ANY #, ONLY on the specified trunk. &lt;/P&gt;

&lt;P&gt;Thanks! A.C.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2011 08:01:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39733#M9092</guid>
      <dc:creator>cadeli</dc:creator>
      <dc:date>2011-02-05T08:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a phone # in logs using Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39734#M9093</link>
      <description>&lt;P&gt;Try something like this for your search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;incoming call | where match(_raw,"\d{10}")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Feb 2011 10:46:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39734#M9093</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-02-05T10:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a phone # in logs using Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39735#M9094</link>
      <description>&lt;P&gt;I'd suggest to build a field out of it in any case...&lt;/P&gt;

&lt;P&gt;You can use the interactive field extractor to get that: &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;pop a search for "this is an incoming call"  &lt;/LI&gt;
&lt;LI&gt;right-click the little triangle on the left of a matching event&lt;/LI&gt;
&lt;LI&gt;select "extract fields" &lt;/LI&gt;
&lt;LI&gt;provide some examples of phone #s &lt;/LI&gt;
&lt;LI&gt;Test&lt;/LI&gt;
&lt;LI&gt;if satisfied save and provide a field name&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;The modified config files will reside in:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/etc/users/&amp;lt;username&amp;gt;/&amp;lt;appname&amp;gt;/local/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As a faster alternative, locate the proper props.conf file where your sourcetype stanza is specified and append this line to such a stanza: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-phone = (?i)incoming call from (?&amp;lt;phonenum&amp;gt;\d+) on trunk (?&amp;lt;trunk&amp;gt;\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then pop a search like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"this is an incoming call" | extract reload=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to reload the configuration and see if Splunk got the new fields. &lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2011 10:48:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39735#M9094</guid>
      <dc:creator>Paolo_Prigione</dc:creator>
      <dc:date>2011-02-05T10:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a phone # in logs using Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39736#M9095</link>
      <description>&lt;P&gt;Thank you, this is very helpful. I followed the steps. The extracted field looks like this:&lt;/P&gt;

&lt;P&gt;Message="Port : 0X55555553B : This is an incoming call from 4151111111;phone-context=&lt;A href="mailto:+1@10.10.01.01"&gt;+1@10.10.01.01&lt;/A&gt;, To 8888888888;phone-context=+1."&lt;/P&gt;

&lt;P&gt;It is a blob text, I have no key/value pairs in there to play with.  &lt;/P&gt;

&lt;P&gt;I am interested in "This is an incomings call" and the IP address but I have this blob text with specific FROM and TO phone numbers in between and I have to make the "Message" generic enough to catch all logs, for all phone #s.&lt;/P&gt;

&lt;P&gt;Argh. Working on it, your answer helped!&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2011 12:02:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39736#M9095</guid>
      <dc:creator>cadeli</dc:creator>
      <dc:date>2011-02-05T12:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a phone # in logs using Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39737#M9096</link>
      <description>&lt;P&gt;Thank you. When I use it as above, I catch too many logs, including the ones that have just "incoming" or "call" in them. If I use "incoming call" I don't get anything. Still digging &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2011 12:07:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39737#M9096</guid>
      <dc:creator>cadeli</dc:creator>
      <dc:date>2011-02-05T12:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a phone # in logs using Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39738#M9097</link>
      <description>&lt;P&gt;I should change the name of the Question/Thread because in fact I am looking for a way to catch ALL phone numbers.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2011 12:09:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39738#M9097</guid>
      <dc:creator>cadeli</dc:creator>
      <dc:date>2011-02-05T12:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a phone # in logs using Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39739#M9098</link>
      <description>&lt;P&gt;cadeli, please update your original question (use the "edit" link) to include additional examples of what your event looks like and what phone numbers you are looking to extract.  Be sure to include examples of different types of events that you would like to extract phone #s from (it sounds like you may have multiple formats, based on the fact that your question and your above comment show two different message formats.)&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2011 00:00:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Looking-for-a-phone-in-logs-using-Splunk/m-p/39739#M9098</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2011-02-08T00:00:22Z</dc:date>
    </item>
  </channel>
</rss>

