Check the documentation: http://svn.digium.com/svn/asterisk/trunk/configs/sip.conf.sample tcpenable=no ; Enable server for incoming TCP connections (default is no) tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060) --- Dennis Guse On Thu, Jul 3, 2014 at 6:08 PM, Yosi Taguri <yosi at taguri.com> wrote: > Aterisk is hardcoded into 5060. You may forward other ports to it but > basically it will create a contact header with 5060. We had to change > asterisk code base in order to really work with another port. This sucks! > ? > Sent from Mailbox <https://www.dropbox.com/mailbox> > > > On Thu, Jul 3, 2014 at 7:05 PM, pjsip-request at lists.pjsip.org < > pjsip-request at lists.pjsip.org> wrote: > >> Send pjsip mailing list submissions to >> pjsip at lists.pjsip.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> or, via email, send a message with subject or body 'help' to >> pjsip-request at lists.pjsip.org >> >> You can reach the person managing the list at >> pjsip-owner at lists.pjsip.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of pjsip digest..." >> >> >> Today's Topics: >> >> 1. Re: Changing PJSIP to work over TCP on port different than >> 5060 (Filip Planinsky) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Wed, 2 Jul 2014 20:49:38 +0200 >> From: Filip Planinsky <filip@xxxxxxxxxxxx> >> To: pjsip at lists.pjsip.org >> Subject: Re: Changing PJSIP to work over TCP on port different >> than 5060 >> Message-ID: <B6AC1124-9129-4C6F-9DF7-38B2B66E166E at fonetize.com> >> Content-Type: text/plain; charset="us-ascii" >> >> Hi There, >> >> I will try to bump up this question one more try. >> Generally, if you use TCP transport on port 5060 - there is no problem. >> However, if you try to change the port, the you get into troubles. >> Details are below in my previous emails. >> >> If someone could help - will be much appreciated. >> >> Thanks, >> Filip >> >> On Jun 9, 2014, at 7:22 PM, Filip Planinsky <filip at fonetize.com> wrote: >> >> > Hi Guys, >> > >> > any hints on how to change the remote SIP port for PJSIP? >> > My Asterisk is listening on TCP port 6533 and it seems that PJSIP is >> having trouble to work with it in some cases. >> > I can't use UDP - because of the iOS App, which requires TCP in order >> to run in background. >> > >> > Details are below. >> > If you could help - it will be greatly appreciated! >> > >> > Thanks, >> > Filip >> > >> > >> > On Jun 7, 2014, at 12:12 AM, Filip Planinsky <filip at fonetize.com> >> wrote: >> > >> >> Hello, >> >> >> >> >> >> I am trying to change the default SIP port 5060 to some other port. >> >> I am using TCP, because I use PJSIP on an iOS App, which must run in >> background mode. And TCP is required by iOS for this to happen. >> >> >> >> >> >> I tried this and it seemed to be working ok. >> >> I have added to pjsua_config struct: >> >> >> >> cfg.outbound_proxy[0] = >> pj_str("sip:XXX.XXX.XXX.XXX:6533;transport=tcp"); >> >> >> >> before execution the pjsua_init(&cfg, &log_cfg, NULL) function >> >> >> >> By setting the outbound proxy to pjsua_config struct I achieved 2 >> things: >> >> 1. adding transport=tcp to all request >> >> 2. changing the remote port from 5060 to 6533 >> >> >> >> I also added the port to the registrar URI in >> pjsua_acc_config.reg_uri="sip:XXX.XXX.XXX.XXX:6533" >> >> >> >> This way the App is able to: >> >> 1. Send REGISTER >> >> 2. Receive OPTIONS from Asterisk >> >> 3. Receive INVITE from Asterisk and establish a call, which has audio >> in both directions >> >> 4. Obviously, respond to Asterisk with SIP/200 OK and ACK, when >> needed. >> >> >> >> >> >> However, I did find that the App is not capable to send BYE requests. >> >> I use the App only to answer calls - by design it doesn't have the >> ability to make calls - so I do not know if it is capable to send INVITE >> requests to the Asterisk. >> >> >> >> 23:18:16.307 pjsua_call.c !Call 0 hanging up: code=0.. >> >> 23:18:16.308 tcpc0x15ba6c14 ....TCP client transport created >> >> 23:18:16.309 tcpc0x15ba6c14 ....TCP transport 192.168.1.11:61873 is >> connecting to XXX.XXX.XXX.XXX:5060... >> >> 23:18:16.309 pjsua_core.c ....TX 476 bytes Request msg BYE/cseq=6547 >> (tdta0x15abf400) to TCP XXX.XXX.XXX.XXX:5060 >> >> 23:18:16.364 tsx0x15ba6064 Failed to send Request msg BYE/cseq=6547 >> (tdta0x15abf400)! err=120061 (Connection refused) >> >> >> >> It tries to send the BYE request to poet 5060, which is not possible >> as the Asterisk doesn't listen to this port. >> >> I think the problem is that it says "TCP client transport created" and >> therefore uses the default port. >> >> >> >> >> >> What is the proper way to change the TCP port from 5060 to any other >> port? >> >> >> >> >> >> Thanks, >> >> Filip >> >> >> >> >> >> >> >> >> >> >> > >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140702/e0dce27f/attachment-0001.html> >> >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> pjsip mailing list >> pjsip at lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> >> ------------------------------ >> >> End of pjsip Digest, Vol 83, Issue 2 >> ************************************ >> > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140703/ea85ba32/attachment.html>