Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sip invite #316

Open
BreakingY opened this issue Dec 8, 2023 · 4 comments
Open

sip invite #316

BreakingY opened this issue Dec 8, 2023 · 4 comments

Comments

@BreakingY
Copy link

`
struct sip_uac_transaction_t* sip_uac_invite(struct sip_agent_t* sip, const char* name, const char* to, sip_uac_oninvite oninvite, void* param)
{
struct sip_message_t* req;
struct sip_uac_transaction_t* t;

req = sip_message_create(SIP_MESSAGE_REQUEST);
if (0 != sip_message_init(req, SIP_METHOD_INVITE, to, name, to))
{
sip_message_destroy(req);
return NULL;
}

t = sip_uac_transaction_create(sip, req);
t->oninvite = oninvite;
t->param = param;
return t;
}
`
sip_message_init的时候为什么url是to,不应该是往代理服务器发送吗,url指定为to不是直接就是p2p了吗,我是sip小白,望大佬赐教

@ireader
Copy link
Owner

ireader commented Dec 9, 2023

一般代理服务器是透明的, 实际发送地址是通过send中指定的.

@BreakingY
Copy link
Author

我看sip-uac-test2里面没有向代理服务器发送,sip-uac-test2中发送的实际地址就是to,这里仅是为了测试才直接向to发送的吗,实际应该在send里面向代理服务发送是吧

@ireader
Copy link
Owner

ireader commented Dec 11, 2023

是的, 如果有代理的话发送地址改成代理

@BreakingY
Copy link
Author

嗯嗯,明白了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants