[SR-Users] How to extract SIP-I ISUP parameters

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 29 17:21:53 CEST 2018


As I got it, there is an ISUP parser inside ss7ops module.

It may require a bit of C coding to build a function for helping with
what you need -- the two functions that are useful for doing it are:

  *
https://www.kamailio.org/docs/modules/stable/modules/textops.html#textops.f.get_body_part
  *
https://www.kamailio.org/docs/modules/stable/modules/ss7ops.html#ss7ops.f.isup_to_json

The first one shows how to extract the part of the body from the sip
message with the ISUP, the second one shows to convert the ISUP data to
json. From there you can use jansson module to extract fields.

If you are not familiar with C coding, open a feature request on
kamailio issue tracker on github.com, maybe someone can get to it soon,
otherwise I will look at it when I get a chance.

The other option right now is to use some Python or Lua script to do the
parsing of ISUP there, maybe there are libraries for it in those
languages. You get get the body of the SIP message inside these messages
using $rb variable or the textops function via KSR KEMI module:

  -
http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/kemimods/#ksrpvget
  -
http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#ksrtextopsget_body_part

Cheers,
Daniel

On 29.03.18 12:50, Eugene Prokopiev wrote:
> I can attach screenshot of ISUP part of pcap.
>
> Is it possible to extract all ISUP parameters or at least 'Redirecting
> number' or 'Called IN number'? Can extract ISUP part as is in binary
> form and read by some external script? Are you know about any library
> to parse ISUP binary data?
>
> 2018-03-29 11:30 GMT+03:00 Daniel-Constantin Mierla <miconda at gmail.com>:
>> Hello,
>>
>> can you provide a pcap (or ngrep output) with such invite in order to
>> see what can be done with existing modules? Maybe it needs just some
>> script operations.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 28.03.18 17:26, Eugene Prokopiev wrote:
>>> Hi,
>>>
>>> I need to extract ISUP parameter 'Redirecting number' from SIP-I
>>> INVITE request and add it as SIP header with 'X-' prefix to process in
>>> FreeSWITCH. I tried to read
>>> https://kamailio.org/docs/modules/5.1.x/modules/sipt.html (but it is
>>> about updating headers) and
>>> https://kamailio.org/docs/modules/5.1.x/modules/ss7ops.html (but I
>>> have only ISUP encapsulated in SIP), so not found any solution. Help
>>> me to find it please.
>>>
>> --
>> Daniel-Constantin Mierla
>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>> Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
>> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
>>
>
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com




More information about the sr-users mailing list