0

I need to pass content of SIP message body into C application. For example, I will have some SIP server (Kamailio or Asterisk or something like this). When I receive some sip message (e.g turn on PC) it will be passed to C application which will set GPIO value to 1 so the PC will turn on. The problem is to get the message from sip server into C application. I don't know if exists some module to Asterisk or to Kamailio which can do this.

Anyone any ideas? Thanks a lot!

1 Answers1

0

Sip message is just text.

So you cna parse it using your c application or use kamailio internal logic and write module(yes, kamailio writed in C/C++) for it. Check kamailio source for more info.

Asterisk not deal with sip messages, but you can patch chan_sip to do soemthing or change dialplan to execute external app/internal app(yes, also writed in c/c++)

Both asterisk and kamailio have EXEC call in dialplan to execute external application.

arheops
  • 15,544
  • 1
  • 21
  • 27