[help] How to using different tcp port to register server.

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

 



On Sat, Nov 28, 2009 at 5:22 AM, DaCheng <ato_wu at yahoo.com.tw> wrote:

> Hi all:
> I am using version 1.4 to implement my application.
> I set two accounts and use "tcp" connection to register a sip server.
> The pjsip always to use one tcp port to connect to sip server for any
> account.
> My question is:
> If I set account 1(#7219) is equal to account 2(#7219), and register to sip
> server.
> The other phone make a call to (#7219), my pc will recevie two INVITE
> request.
> Because the pjsua_acc_find_for_incoming() use "To" header to judge this
> request is for which account.
> Those two INVITE request almost the same, the pjsip always return account 1
> in pjsua_acc_find_for_incoming() funtion.
> So I want those two accounts that have its tcp connection port and uses its
> tcp port to register sip server.
> Then I can using the incoming port to judge the INVITE request is for which
> account roughly.
>
>
Why are you registering two identical accounts in the first place?

Or if you really must use two identical accounts, you could probably add a
custom Contact URI parameter in pjsua_acc_config.contact_uri_params (for
example, ";x-my-acc-id=1") to distinguish the two accounts. This way,
*hopefully* the server will add this parameter to the Request URI of
incoming INVITE, so that you can decide which account to use.

Cheers
 Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091209/3b2ec96e/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