On 01/24/2012 12:43 AM, sylver_b wrote:
> Jan 01:29:33.498/GLOBAL/ser: RECEIVED message from 91.x.x.x:33583:|INVITE 
> sip:39329172xxxx@sip.x SIP/2.0|Supported:|Allow: INVITE, ACK, OPTIONS, 
> CANCEL, BYE|Contact: sip:131400xxxx@91.x.x.x:33583|Via: SIP/2.0/UDP 
> 91.x.x.x:33583;branch=z9hG4bKe65d47e555749b753faaf095c3256ec569bde77d37de66f62ff18bc40d492496|Call-id:
>  ac755ea7e10821aa8174b2e5cd51d9e6|Cseq: 1 INVITE|From: 
> sip:131400xxxx@sip.x;tag=5a541f1b2fd279cd0b8af3be3f67c7cf|Max-forwards: 
> 70|To: sip:39329172xxxx@sip.x|Content-type: application/sdp|Content-length: 
> 127|v=0|o=anonymous 1327282173 1327282173 IN IP4 91.x.x.x|s=session|c=IN IP4 
> 91.x.x.x|t=0 0|m=audio 5856 RTP/AVP 0

Well, I suppose the regular expression for matching these particular 
messages could be

\|INVITE .*Call-id: ([^|]+).*From: ([^|]+).*To: ([^|]+)

which sets $1 to Call-id, $2 to From field, and $3 to To field.

In the case Call-id always contains hexadecimal numbers, and both From 
and To should be set to decimal numbers after "sip:", you can also use a 
more restrictive expression:

\|INVITE .*Call-id: ([[:xdigit:]]+).*From: sip:(\d+).*To: sip:(\d+)

If you haven't written Perl-style regular expressions before, I'd 
recommend to have a look at this page:
http://perldoc.perl.org/perlre.html
It describes all matching options you have at your disposal (many of 
them are not available in more spartan regular expression dialects).

Hope this helps,
risto



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to