Comments (2)
Hi @bontric
the SIP OPTIONS method is supported by libre.
for example it has been implemented in the Baresip SIP useragent:
https://github.com/alfredh/baresip/blob/master/src/ua.c#L551
and:
int ua_options_send(struct ua *ua, const char *uri,
options_resp_h *resph, void *arg)
{
struct mbuf *dialbuf;
int err = 0;
if (!ua || !str_isset(uri))
return EINVAL;
dialbuf = mbuf_alloc(64);
if (!dialbuf)
return ENOMEM;
err = uri_complete(ua, dialbuf, uri);
if (err)
goto out;
dialbuf->buf[dialbuf->end] = '\0';
err = sip_req_send(ua, "OPTIONS", (char *)dialbuf->buf, resph, arg,
"Accept: application/sdp\r\n"
"Content-Length: 0\r\n"
"\r\n");
if (err) {
warning("ua: send options: (%m)\n", err);
}
out:
mem_deref(dialbuf);
return err;
}
most SIP methods are supported by libre. if your application wants to handle
and incoming OPTIONS for example, you must call the sip_listen
function:
err = sip_listen(&uag.lsnr, uag.sip, true, request_handler, NULL);
if (err)
goto out;
and then check the method in request_handler.
hope this helps :)
Alfred
from re.
most SIP methods are supported by libre. if your application wants to handle
and incoming OPTIONS for example, you must call the sip_listen function:
Ahh, I literally just checked the baresip code and found this solution! Thank you for the reply though, now I also know that this is the proper way to do it. Thanks a lot!
from re.
Related Issues (20)
- Some example about JSON may mislead in retest HOT 1
- DNS client only queries first server (in most cases) HOT 5
- add RFC 6062 HOT 2
- accept 401 to re-REGISTER without WWW-Authenticate stale=true HOT 7
- Use database insted of File
- DNS resolution does not respect local configuration (/etc/hosts, avahi *.local, nsswitch.conf, etc) HOT 1
- Is there any demo for ICE ? HOT 1
- Can't Build on Docker from source HOT 2
- Can I use libre and librem in windows applications? How to compile as dll? HOT 7
- Via header address is set before TCP connection is established
- How to use rtmp_send_video to publish H264 frame?
- Issue with RTP Video over Network
- Upstream .so name versioning?
- Compilation with musl-libc fails
- libre can work based on the thirdpary Lwip?
- SIGABRT after tcp_close_handler derefs conn one too many times (race condition on socket close) HOT 2
- auth won't work for binary passwords containing zero byte characters
- config with sip device
- Shani gujjar
- WEB
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from re.