react-native-pjsip
react-native-pjsip copied to clipboard
Make sip call without registration
Hey @datso is it possible in pjsip to make a sip call without registering a sip account? I'd be happy to submit a PR if needed, but maybe you can point me to the right place for reference or documentation.
Hey, try regOnAdd=false option in account configuration
thanks @datso Do you also know if there's a way to change the 'From' header on an individual call? Right now it uses the data from the account config (username, etc.)?
Yea, use {headers: {"From": "Blablabla"}} in options of makeCall method.
@datso that adds a duplicate header, but it doesnt override the first one. This is what I see on the Invite (notice the double From headers):
Message Header
Via: SIP/2.0/UDP 73.0.79.232:64447;rport;branch=z9hG4bKPj31d3ae9b-7d32-4282-853a-96fa70d514ba
Max-Forwards: 70
From: "n2p Tester" <sip:[email protected]>;tag=741fd6e1-707c-4a1c-92f0-675bb4f8321e
From: 15555215554 // <----------- This *should* be the only From header
To: sip:[email protected]
Contact: "Tester" <sip:[email protected]:56902;ob>
Call-ID: 199ca83e-c805-4563-af53-0b6aa852f781
CSeq: 22616 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: React Native PjSip (2.7.1)
Content-Type: application/sdp
Content-Length: 298
Yeap, in that case some changes is required to make it work.
Please check CallSettingsDTO.java, you could add there an option regarding From header. Another option is to check how to make header names unique in pjsip, may be there is some flag for that.
@datso, when making a call is it possible to respond to a PJSIP_SC_PROXY_AUTHENTICATION_REQUIRED / 407, by using a Proxy-Authenticate with a nonce and realm?