slomkowski / mumsi

SIP to Mumble gateway/bridge using PJSUA stack.
Apache License 2.0
41 stars 33 forks source link

more than one instance of mumsi #15

Closed pzi42 closed 8 years ago

pzi42 commented 8 years ago

I'm having a new problem. I want to run mor than one instance of mumsi on a single machine. Starting the second instance with identical sip host and port throws an: [ERROR] Pjsua: 09:32:08.627 pjsua_core.c bind() error: Address already in use [status=120098] 2016-09-09 09:32:08,627 [ERROR] Pjsua: 09:32:08.627 endpoint.cpp pjsua_transport_create(type, &tcfg, &tid) error: Address already in use (status=120098) [../src/pjsua2/endpoint.cpp:1526] terminate called after throwing an instance of 'pj::Error'

so I think this is of using the destination port also as local port. is there a posibility to avoid the error?

slomkowski commented 8 years ago

Sorry for late reply. I checked the Pjsua documentation and parameter port in config actually defines the local port. If you set it to 0, it will bind to any available port, which should be suitable for you. To specify remote port SIP port other than 5060, define it in host entry:

host = example.com:5061

Later I might change it to be more clear.

pzi42 commented 8 years ago

Thank you for your answer. Changing config according to your suggestions seems to work.