Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7775543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:39:29+00:00 2026-06-01T17:39:29+00:00

My voip phone adapter generates a log entry when a call comes in. I

  • 0

My voip phone adapter generates a log entry when a call comes in. I managed to forward it to the syslog of my local ubuntu machine, to a file called /var/log/linksys.log.

Now I’d like to use it as instant caller ID display. The important line includes the string “INVITE sip”, so I tried:

tail /var/log/linksys.log -f | grep "INVITE sip"

but this brings the WHOLE line. I’m only interested in the part with the caller name and phone, between the strings “From:” and the first @ sign after it.

My goal would be to be able to follow the file with tail -f or similar (tried multitail too) but only have it show the name and phone nr when a new relevant line gets added to the log. (The log receives other lines too)

Here is a sample line:

Apr  8 01:06:10 INVITE sip: 999999@192.168.0.102:5060 SIP/2.0#015#012Via: SIP/2.0/UDP 111.111.11.111:5060;branch=z9hG4bK5f142476;rport#015#012From: "SMITHSON D" <sip:8885551234@111.111.11.111>;tag=as410515ed#015#012To: <sip:999999@192.168.0.102:5060>#015#012Contact: <sip:8885551234@111.111.11.111>#015#012Call-ID: 50354db42555555555aab68633cbb2e4@111.111.11.111#015#012CSeq: 102 INVITE#015#012User-Agent: VoIPMS/SERAST#015#012Max-Forwards: 70#015#012Remote-Party-ID: "SMITHSON D" <sip:8885551234@111.111.11.111>;privacy=off;screen=no#015#012Date: Sun, 08 Apr 2012 05:06:10 GMT#015#012Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO#015#012Supported: replaces#015#012Content-Type: application/sdp#015#012Content-Length: 291#015#012#015#012v=0#015#012o=root 18702 18702 IN IP4 111.111.11.111#015#012s=session#015#012c=IN IP4 111.111.11.111#015#012t=0 0#015#012m=audio 33100 RTP/AVP 0 18 101#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 annexb=no#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:101 0-16#015#012a=silenceSupp:off - - - -#015#012a=ptime:20#015#012a=sendrecv#015

Much thanks for any assistance…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:39:30+00:00Added an answer on June 1, 2026 at 5:39 pm

    Try using awk.

    Here is my gawk one-liner(uses gawk third argument extension to match):

    gawk -v FS=';' '{match($3, /From: (.*)@/, m); print m[1]}'
    

    The same script with prettier printing:

    gawk -v FS=';' -v OFS='/' '{match($3, /From: "(.*)" <(.*)@/, m); print m[1], m[2]}'
    

    Just pipe output of grep into this gawk script:

    gawk -v FS=';' -v OFS='/' '{match($3, /From: "(.*)" <(.*)@/, m); print m[1], m[2]}' | gawk -v FS=';' -v OFS='/' '{match($3, /From: "(.*)" <(.*)@/, m); print m[1], m[2]}'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a project where we make a VOIP phone call to
I am looking for a VoIP service my application can use to call landlines
Imagine you have a friend on the phone (not VoIP) who asks: What's so
I am working on a voip system supposed to work like this: i call
I need to write VoIP/SIP Soft Phone in C# using WPF interface with Audio
We have a VOIP server that stores wav files for call recordings. My intention
I need to extract Voip log from a D-Link router, so I've setup a
I have PC and VOIP phone. When someone calls to my account and I
I am trying to write a VoIP client for Windows Phone, and I can't
I have to make an application that make pc-phone and pc - pc call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.