문제

I'm using pjsua python module, and I don't know how to create a custom message like below:

mY'0E@@b,%+&KEEPALIVE sip:user@192.168.0.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.10;rport;branch=z9hG4bKPjgdQdo8azxxwRZ9aCVJy5Wdr27fTgDBUy
Max-Forwards: 70
From: <sip:user@192.168.0.10>;tag=w0na7ZUHDVaB8QG38EGdH5f23W3fzKL6
To: <sip:server@192.168.0.10>
Contact: <sip:server@192.168.0.10>
Call-ID: -TtcAtmNnJM5uteQDgMmddoWx7IM1fDP
CSeq: 1 KEEPALIVE
Applier-ID: 24598
Expires: 2147483647
User-Agent: PU/1.0.0
Content-Length:  0

Obs: The server and client are in the same PC.

Exists any way to do this? Thanks.

도움이 되었습니까?

해결책

I haven't tried this, but you may be able to do this by using the py_pjsua module:

http://trac.pjsip.org/repos/wiki/Py_PJSUA

pjsua_call_send_request: Send arbitrary request with the call. This is useful for example to send INFO request. Note that application should not use this function to send requests which would change the invite session's state, such as re-INVITE, UPDATE, PRACK, and BYE.

A message on the PJSIP mailing list addresses a similar case, and indicates that the on_call_tsx_state() callback can be used to watch for the response.

This seems to match your requirement, as I assume that the KEEPALIVE does not change the session state. See documentation here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top