How to use a different port number for voip traffic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do you mean doing the following:

...
pjsua_transport_config_default(&app_config->udp_cfg);
app_config->udp_cfg.port = 12345;
...
status = pjsua_transport_create(type, &app_config.udp_cfg, &transport_id);

The thing is with this code the local port is set to the desired one.
But the destination port, the one on the server, is always 5060. I
want to tell the voip traffic be routed through local port 12345 to
remote port 12345


On Mon, Jan 16, 2012 at 11:54 AM, Johan Lantz <johan.lantz at genaker.net>
> wrote:
> >
> > Look at
> > pjsua_transport_create(PJSIP_TRANSPORT_TCP, &tcp_cfg, &transport_id_tcp);
> > pjsua_transport_create(PJSIP_TRANSPORT_UDP, &udp_cfg, &transport_id_udp);
> >
> > Just assign the port number you wish to use when initializing the
> transports during startup of your application and they should use this
> port. It might be a good idea to create the TCP transport first since it
> should return an error if this port is already occupied and you might want
> to try with another.
> >
> > /Johan
> >
> > On Mon, Jan 16, 2012 at 12:02 PM, <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: [PJSUA] How to retrieve the Owner info from SDP
> >>      (Nanang Izzuddin)
> >>   2. Configure pjsua-lib via TR-104 parameters (match list)
> >>      (Yunus Ozcelik)
> >>   3. Re: Doubt about PRACK (rahul yadav)
> >>   4. Dead links - (sjs205.linux at googlemail.com)
> >>   5. Re: Dead links - (sjs205.linux at googlemail.com)
> >>   6. Re: IPP in different PCs (Fernando Mart?n)
> >>   7. Re: Doubt about PRACK (Alain Totouom)
> >>   8. Re: Doubt about PRACK (Hari Narayanan)
> >>   9. How to use a different port number for voip traffic (Fadi Chehimi)
> >>
> >>
> >> ----------------------------------------------------------------------
> >>
> >> Message: 1
> >> Date: Mon, 16 Jan 2012 12:42:22 +0700
> >> From: Nanang Izzuddin <nanang@xxxxxxxxx>
> >> To: pjsip list <pjsip at lists.pjsip.org>
> >> Subject: Re: [PJSUA] How to retrieve the Owner info from SDP
> >> Message-ID:
> >>        <
> CACPdkExsEwEshtupL_thXbw8ABvh1Wz+QARCfQ34hhOdqYRe+Q at mail.gmail.com>
> >> Content-Type: text/plain; charset=ISO-8859-1
> >>
> >> Hi EiSl,
> >>
> >> Perhaps you can start with PJSUA callback on_call_state(), the message
> >> body can be fetched from the event structure param, usually you can
> >> safely cast the message body (pjsip_msg->body->data) into
> >> pjmedia_sdp_session pointer and the "o=" line is represented by the
> >> origin field in the pjmedia_sdp_session.
> >>
> >> BR,
> >> nanang
> >>
> >>
> >> On Fri, Jan 13, 2012 at 3:54 PM, EiSl 1972 <eisl1972 at gmail.com> wrote:
> >> > Hello all,
> >> >
> >> > For some application behavior, we need to know the 'Owner/session'
> >> > information (o=...) from the remote SDP.
> >> > We're using PJSIP via the PJSUA library.
> >> >
> >> > Do you have any suggestions what is the best way to retrieve this
> >> > information?
> >> > It is no problem at all if we need to adapt PJSUA for this a bit.
> >> > It is also no problem to have this information extracted after the
> >> > SIP-dialogs are already in ready state (connected).
> >> >
> >> > With regards,
> >> > EiSl
> >> >
> >> > _______________________________________________
> >> > 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
> >> >
> >>
> >>
> >>
> >> ------------------------------
> >>
> >> Message: 2
> >> Date: Mon, 16 Jan 2012 08:58:23 +0100
> >> From: Yunus Ozcelik <y.ozcelik@xxxxxxxxxx>
> >> To: pjsip at lists.pjsip.org
> >> Subject: Configure pjsua-lib via TR-104 parameters (match
> >>        list)
> >> Message-ID: <BAB3EDA8-5631-47E6-8F43-F0ED1BA25325 at genexis.nl>
> >> Content-Type: text/plain; charset=us-ascii
> >>
> >> Hi,
> >>
> >> I would like to configure the application that uses PJSUA-LIB API, via
> TR-104. I could not find any documentation regrading a list of matching
> parameters like:
> >> pjsua_acc_config.id ==
> VoiceService.{i}.VoiceProfile.{i}.Line.{i}.SIP.URI
> >>
> >> Is such matching list available(including media and pjsua_config) or
> anything can help?
> >>
> >> Thanks.
> >>
> >>
> >> Regards,
> >>
> >> Yunus Ozcelik
> >> y.ozcelik at genexis.nl
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> ------------------------------
> >>
> >> Message: 3
> >> Date: Mon, 16 Jan 2012 13:30:17 +0530
> >> From: rahul yadav <connect2ry@xxxxxxxxx>
> >> To: pjsip list <pjsip at lists.pjsip.org>
> >> Subject: Re: Doubt about PRACK
> >> Message-ID:
> >>        <
> CAL-tcRrT8DDVEXbAUTAkjBvfw9349Gq9ygf1peDvg45KsS-LAg at mail.gmail.com>
> >> Content-Type: text/plain; charset="iso-8859-1"
> >>
> >> If i see it in this way: "ACK is used to stop re-transmission of 200 ok.
> >> Similarly PRACK is used to stop re-transmission of provisional
> responses".
> >> So both should be treated equally ?
> >>
> >> Sorry for my ignorance, i am still not clear why PRACK needs 200 ok ?
> >>
> >>
> >>
> >> >
> >> >
> >> -------------- next part --------------
> >> An HTML attachment was scrubbed...
> >> URL: <
> http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120116/e1003a7e/attachment-0001.html
> >
> >>
> >> ------------------------------
> >>
> >> Message: 4
> >> Date: Mon, 16 Jan 2012 10:26:17 +0000
> >> From: "sjs205.linux@xxxxxxxxxxxxxx" <sjs205.linux at gmail.com>
> >> To: pjsip at lists.pjsip.org
> >> Subject: Dead links -
> >> Message-ID: <4F13FB49.60508 at googlemail.com>
> >> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
> >>
> >> Hello all,
> >>
> >> I've found some dead links on the
> >> http://www.pjsip.org/docs/latest/pjsip/docs/html/index.htm page as
> follows:
> >>
> >> Using PJSIP and PJMEDIA Directly:
> >> * PJSIP Developer's Guide <http://www.pjsip.org/docs.htm> PDF document
> >> is the ultimate guide to understand PJSIP design concept.  [is this
> >> stall available?links to http://www.pjsip.org/docs.htm]
> >> * there are some samples in *pjsip-apps/src/samples*
> >> <
> http://www.pjsip.org/cgi-bin/viewcvs.cgi/pjproject/trunk/pjsip-apps/src/samples/
> >
> >> directory. [404 not found]
> >>
> >> Cheers
> >>
> >> sjs205
> >> -------------- next part --------------
> >> An HTML attachment was scrubbed...
> >> URL: <
> http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120116/b8eedcff/attachment-0001.html
> >
> >>
> >> ------------------------------
> >>
> >> Message: 5
> >> Date: Mon, 16 Jan 2012 10:29:04 +0000
> >> From: "sjs205.linux@xxxxxxxxxxxxxx" <sjs205.linux at gmail.com>
> >> To: pjsip at lists.pjsip.org
> >> Subject: Re: Dead links -
> >> Message-ID: <4F13FBF0.1090805 at googlemail.com>
> >> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
> >>
> >> Apologies, I found the first one... I could swear I couldn't find it the
> >> other day. 2nd on still 404 :D
> >>
> >> On 01/16/2012 10:26 AM, sjs205.linux at googlemail.com wrote:
> >> > Hello all,
> >> >
> >> > I've found some dead links on the
> >> > http://www.pjsip.org/docs/latest/pjsip/docs/html/index.htm page as
> >> > follows:
> >> >
> >> > Using PJSIP and PJMEDIA Directly:
> >> > * PJSIP Developer's Guide <http://www.pjsip.org/docs.htm> PDF
> document
> >> > is the ultimate guide to understand PJSIP design concept.  [is this
> >> > stall available?links to http://www.pjsip.org/docs.htm]
> >> > * there are some samples in *pjsip-apps/src/samples*
> >> > <
> http://www.pjsip.org/cgi-bin/viewcvs.cgi/pjproject/trunk/pjsip-apps/src/samples/
> >
> >> > directory. [404 not found]
> >> >
> >> > Cheers
> >> >
> >> > sjs205
> >>
> >> -------------- next part --------------
> >> An HTML attachment was scrubbed...
> >> URL: <
> http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120116/b71d68a3/attachment-0001.html
> >
> >>
> >> ------------------------------
> >>
> >> Message: 6
> >> Date: Mon, 16 Jan 2012 11:51:08 +0100
> >> From: Fernando Mart?n <f.martin.85@xxxxxxxxx>
> >> To: pjsip at lists.pjsip.org
> >> Subject: Re: IPP in different PCs
> >> Message-ID:
> >>        <CAN__-rGUL_txg-ZztU0pxd6dy8BeyLeX7mZUM09P=DBf+3p=
> cQ at mail.gmail.com>
> >> Content-Type: text/plain; charset="iso-8859-1"
> >>
> >> Anyone with some info in this topic?
> >> I would like to know if IPP license is single-PC only. Or can it be
> used in
> >> different PCs?
> >>
> >> Thanks in advance!
> >>
> >> Regards,
> >>
> >> 2012/1/13 Fernando Mart?n <f.martin.85 at gmail.com>
> >>
> >> > Hi everyone,
> >> > I would like to know if some of you used IPP with PJSIP and if with
> the
> >> > $199 that Intel claims it costs...
> >> >
> >> >
> http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-purchase/
> >> >
> >> >
> >> > ...we are able to use the libraries in different PCs or the license
> is for
> >> > single PC only.
> >> >
> >> > Thank you in advance!
> >> >
> >> > --
> >> > Fernando
> >> >
> >>
> >>
> >>
> >> --
> >> _______________________
> >>
> >> Fernando Mart?n
> >> _______________________
> >> -------------- next part --------------
> >> An HTML attachment was scrubbed...
> >> URL: <
> http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120116/2fa7caee/attachment-0001.html
> >
> >>
> >> ------------------------------
> >>
> >> Message: 7
> >> Date: Mon, 16 Jan 2012 11:55:29 +0100
> >> From: Alain Totouom <alain.totouom@xxxxxx>
> >> To: pjsip list <pjsip at lists.pjsip.org>
> >> Subject: Re: Doubt about PRACK
> >> Message-ID: <4F140221.5090505 at gmx.de>
> >> Content-Type: text/plain; charset=UTF-8
> >>
> >> Hi Rahul,
> >>
> >> On 16-Jan-12 09:00, rahul yadav wrote:
> >> > If i see it in this way: "ACK is used to stop re-transmission of 200
> ok.
> >> > Similarly PRACK is used to stop re-transmission of provisional
> responses".
> >> > So both should be treated equally ?
> >> >
> >>
> >> No.
> >> The finality may be the same but different rules are used.
> >>
> >> ACK is part of the INVITE-Transaction.
> >> PRACK is "a" normal SIP message like BYE, therefor
> >> Non-Invite-Transaction rules are used...
> >>
> >> > Sorry for my ignorance, i am still not clear why PRACK needs 200 ok ?
> >> >
> >>
> >> As stated previously PRACK is a new transaction which comes to
> >> completion i.e. when its final response (200) is received...
> >>
> >> Cheers,
> >> Alain
> >>
> >> --
> >>                            ""
> >>                          (o)(o)
> >>                _____o00o__(__)__o00o_____
> >> 3072D/146D10DE 2011-09-29    Alain Totouom  <totouom at gmx.de>
> >> PGP Fingerprint 39A4F092 FFA7C746 CC305CB0 69091911 146D10DE
> >>
> >>
> >>
> >> ------------------------------
> >>
> >> Message: 8
> >> Date: Mon, 16 Jan 2012 16:30:06 +0530
> >> From: Hari Narayanan <ts.hari@xxxxxxxxx>
> >> To: pjsip list <pjsip at lists.pjsip.org>
> >> Subject: Re: Doubt about PRACK
> >> Message-ID:
> >>        <
> CANjYqGwap3s6p2d_kfD8pq-DfnwdSgdkXXQ6kaF84ZcyycUK5w at mail.gmail.com>
> >> Content-Type: text/plain; charset="iso-8859-1"
> >>
> >> PRACK can contain OFFER & ANSWER, whereas ACK cannot. Thus, they cannot
> be
> >> treated equally.
> >>
> >> Hari
> >>
> >> On Mon, Jan 16, 2012 at 4:25 PM, Alain Totouom <alain.totouom at gmx.de>
> wrote:
> >>
> >> > Hi Rahul,
> >> >
> >> > On 16-Jan-12 09:00, rahul yadav wrote:
> >> > > If i see it in this way: "ACK is used to stop re-transmission of
> 200 ok.
> >> > > Similarly PRACK is used to stop re-transmission of provisional
> >> > responses".
> >> > > So both should be treated equally ?
> >> > >
> >> >
> >> > No.
> >> > The finality may be the same but different rules are used.
> >> >
> >> > ACK is part of the INVITE-Transaction.
> >> > PRACK is "a" normal SIP message like BYE, therefor
> >> > Non-Invite-Transaction rules are used...
> >> >
> >> > > Sorry for my ignorance, i am still not clear why PRACK needs 200 ok
> ?
> >> > >
> >> >
> >> > As stated previously PRACK is a new transaction which comes to
> >> > completion i.e. when its final response (200) is received...
> >> >
> >> > Cheers,
> >> > Alain
> >> >
> >> > --
> >> >                            ""
> >> >                          (o)(o)
> >> >                _____o00o__(__)__o00o_____
> >> > 3072D/146D10DE 2011-09-29    Alain Totouom  <totouom at gmx.de>
> >> > PGP Fingerprint 39A4F092 FFA7C746 CC305CB0 69091911 146D10DE
> >> >
> >> > _______________________________________________
> >> > 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/20120116/b62cb07f/attachment-0001.html
> >
> >>
> >> ------------------------------
> >>
> >> Message: 9
> >> Date: Mon, 16 Jan 2012 11:01:54 +0000
> >> From: Fadi Chehimi <fchehimi@xxxxxxxxxxxxxx>
> >> To: pjsip list <pjsip at lists.pjsip.org>
> >> Subject: How to use a different port number for voip traffic
> >> Message-ID:
> >>        <CACSwkY9QoSw9TvJkegB4_kcAWzEzaWmg=
> NtsXAmPJu26mG46Zw at mail.gmail.com>
> >> Content-Type: text/plain; charset=ISO-8859-1
> >>
> >>
> >> Hi
> >>
> >> I have sent this email before but received no reply so I am resending
> >> it hoping that it will catch someone's attention and reply with some
> >> help :)
> >>
> >> I am trying to rout my voip traffic through a non standard port
> >> number, say 12345, which is already open on my server. I tired the
> >> following syntax when making a voip call using pjsua_call_make_call()
> >> but the call is routed through the default 5060 port:
> >>
> >> "sip:1234567 <at> localphone.com:12345"
> >>
> >> Any ideas how I can achieve this, if it is possible in PJSip?
> >>
> >> Cheers
> >> Fadi
> >>
> >>
> >>
> >> ------------------------------
> >>
> >> _______________________________________________
> >> pjsip mailing list
> >> pjsip at lists.pjsip.org
> >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> >>
> >>
> >> End of pjsip Digest, Vol 53, Issue 23
> >> *************************************
> >
> >
> >
> >
> > --
> >
> > Johan Lantz
> > Head of IMS Products
> > GENAKER - Esi Mobile Solutions SL
> > www.genaker.net
> > Phone +34 622 271 645
> > Fax: +34 933 316 99
> >
> >
> >
> > _______________________________________________
> > 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
> >
>



-- 
-------------------------------------
Fadi Chehimi, PhD
Mobile Software Engineer
Tel: +44 1143 190 529
Localphone Ltd
4 Paradise Street, Sheffield, S1 2DF, UK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120117/2de790fe/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux