ireader / media-server

RTSP/RTP/RTMP/FLV/HLS/MPEG-TS/MPEG-PS/MPEG-DASH/MP4/fMP4/MKV/WebM
MIT License
3.12k stars 1.09k forks source link

sip invite #316

Open BreakingY opened 11 months ago

BreakingY commented 11 months ago

` 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 commented 11 months ago

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

BreakingY commented 11 months ago

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

ireader commented 11 months ago

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

BreakingY commented 11 months ago

嗯嗯,明白了