[SR-Users] Re: How to get media IP

2024-01-26 Thread Daniel-Constantin Mierla via sr-users

On 24.01.24 10:33, mm e via sr-users wrote:
> When receiving a call I get the following messageļ¼š
>
> INVITE sip:123456789@192.168.1.118:29363 SIP/2.0
> Via: SIP/2.0/UDP 
> 192.168.1.118:65178;branch=z9hG4bK-d87543-4a4a6b6c49541b2c-1--d87543-;rport
> Max-Forwards: 70
> Contact: 
> To: "123456789"
> From: "96341";tag=af3c7c31
> Call-ID: OTFhN2M2YmRmNmU2N2I1ZmQxNmM4ODg4YzRiZmQyNTc.
> CSeq: 1 INVITE
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
> INFO
> Content-Type: application/sdp
> User-Agent: eyeBeam release 1011d stamp 40820
> Content-Length: 339
>
> v=0
> o=- 3 2 IN IP4 192.168.1.118
> s=CounterPath eyeBeam 1.5
> c=IN IP4 192.168.1.118
> t=0 0
> m=audio 32170 RTP/AVP 0 8 18 101
> a=alt:1 1 : +YhwgPgy ayLEx4wo 192.168.1.118 32170
> a=fmtp:18 annexb=no
> a=fmtp:101 0-15
> a=rtpmap:18 G729/8000
> a=rtpmap:101 telephone-event/8000
> a=sendrecv
>
> How to print the media IP in SDP separately in the log? I didn't find the 
> Pseudo-Variables..can you help me

For the records, I have just added $sdp(c:ip) to return media IP.

For current versions, as it was pointed in another response, you have to
leverage functions from sdpops, textops or textopsx and transformations
to extract the corresponding token from the sdp.

Cheers, Daniel

-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: How to get media IP

2024-01-24 Thread Alex Balashov via sr-users
Hi,

A complication of your request is that SDP can contain an arbitrary number of 
media sections for different streams. That's not needless pedantry, but rather 
to say that this makes it hard to create a straightforward, scalar 
pseudovariable around a concept like "the media IP". Besides that, Kamailio 
message pseudovariables are relatively high-level and mostly confined to SIP 
attributes. 

Nevertheless, your best bet, in terms of effort-to-reward ratio, is probably:

https://kamailio.org/docs/modules/5.7.x/modules/sdpops.html#sdpops.f.sdp_get_line_startswith

-- Alex

> On 24 Jan 2024, at 04:33, mm e via sr-users  
> wrote:
> 
> When receiving a call I get the following messageļ¼š
> 
> INVITE sip:123456789@192.168.1.118:29363 SIP/2.0
> Via: SIP/2.0/UDP 
> 192.168.1.118:65178;branch=z9hG4bK-d87543-4a4a6b6c49541b2c-1--d87543-;rport
> Max-Forwards: 70
> Contact: 
> To: "123456789"
> From: "96341";tag=af3c7c31
> Call-ID: OTFhN2M2YmRmNmU2N2I1ZmQxNmM4ODg4YzRiZmQyNTc.
> CSeq: 1 INVITE
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
> INFO
> Content-Type: application/sdp
> User-Agent: eyeBeam release 1011d stamp 40820
> Content-Length: 339
> 
> v=0
> o=- 3 2 IN IP4 192.168.1.118
> s=CounterPath eyeBeam 1.5
> c=IN IP4 192.168.1.118
> t=0 0
> m=audio 32170 RTP/AVP 0 8 18 101
> a=alt:1 1 : +YhwgPgy ayLEx4wo 192.168.1.118 32170
> a=fmtp:18 annexb=no
> a=fmtp:101 0-15
> a=rtpmap:18 G729/8000
> a=rtpmap:101 telephone-event/8000
> a=sendrecv
> 
> How to print the media IP in SDP separately in the log? I didn't find the 
> Pseudo-Variables..can you help me
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:

-- 
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800

__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe: