I'm trying to use linphone-android with asterisk but there is an aspect
of the way asterisk and linphone-android interact with MESSAGE
transactions that is causing problems.

The linphone-android folks consider both the To: and From: address in
MESSAGE transactions when deciding which "chat" to put a received
MESSAGE into.  Every combination of To: and From: address are a
separate "chat" in their messaging paradigm.

So when asterisk sends a MESSAGE transaction such as:

MESSAGE 
sip:my_sip_account@[2001:123:ab:123:51e2:cc83:ae66:8c70]:38915;transport=udp;app-id=755770037818;pn-type=firebase;pn-timeout=0;pn-tok==[redacted];pn-silent=1
 SIP/2.0
Via: SIP/2.0/UDP 
[2001:123:ab:123::2]:5060;rport;branch=z9hG4bKPj138c026c-4437-4b59-982f-f991521d3cdc
From: "5565551212" 
<sip:[redacted]@pbx.example.com>;tag=5b5fe395-ff22-44fa-aa6b-7f770f8e0026
To: 
<sip:my_sip_account@[2001:123:ab:123:51e2:cc83:ae66:8c70];app-id=755770037818;pn-type=firebase;pn-timeout=0;pn-tok==[redacted];pn-silent=1>
Contact: <sip:my_sip_account@[2001:123:ab:123::2]:5060>
Call-ID: 5e4fc686-72ce-4c20-bd2f-7f82e232a9db
CSeq: 29808 MESSAGE
Max-Forwards: 70
User-Agent: Asterisk PBX 13.26.0
Content-Type: text/plain
Content-Length:     4

hey!

it files it into the chat for the combination of:

From: "5565551212" 
<sip:[redacted]@pbx.example.com>;tag=5b5fe395-ff22-44fa-aa6b-7f770f8e0026
To: 
<sip:my_sip_account@[2001:123:ab:123:51e2:cc83:ae66:8c70];app-id=755770037818;pn-type=firebase;pn-timeout=0;pn-tok==[redacted];pn-silent=1>

and because the To: includes the IP address of the client, every time
the client moves networks (or even regenerates a new "Privacy
Extensions" IPv6 address) a new chat is created for the same sender.

Their position is that the RHS of the To: should be the name of the
Asterisk machine such as:

To: 
<sip:my_sip_acco...@pbx.example.com;app-id=755770037818;pn-type=firebase;pn-timeout=0;pn-tok==[redacted];pn-silent=1>

While that seems odd to me, from a common-sense perspective, I don't
have a deep enough background in the SIP protocol to decide if it's
wrong or not, and if it's not, how to make Asterisk do it, as in
something similar to the pjsip from_domain endpoint parameter that can
be used to set the domain of the From: header for MESSAGEs to that
endpoint.

Any opinions, ideas or otherwise?  Is the position of what should be in
the RHS of the To: address even valid or MUST it always be the address
of the next hop on path to delivering the MESSAGE?

Cheers,
b.

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to