Brian J. Murrell
2019-Jun-06 13:33 UTC
[asterisk-users] RHS of the To: address in MESSAGE transactions
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_account at 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: This is a digitally signed message part URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190606/453d2f7d/attachment.sig>
Brian J. Murrell
2019-Jun-11 15:46 UTC
[asterisk-users] RHS of the To: address in MESSAGE transactions
On Thu, 2019-06-06 at 09:33 -0400, Brian J. Murrell wrote:> 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;transp > ort=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_account at 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?Nobody has any options either way on this one? Cheers, b. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: This is a digitally signed message part URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190611/de7c27ca/attachment.sig>
Brian J. Murrell
2019-Jul-16 20:20 UTC
[asterisk-users] Preventing rewrite of To: address in MESSAGE transactions
Is there any option to prevent Asterisk from rewriting the To: address of a SIP MESSAGE that it's received and will forward to another SIP client? That is, when Asterisk receives a MESSAGE with the To; header saying: To: <sip:1235551212 at 10.75.22.8:5060;line=cqabgil> and wants to forward that to foo at 10.75.22.100, I'd like the To: header to remain: To: <sip:1235551212 at 10.75.22.8:5060;line=cqabgil> when it sends it. Any possibility to do this? Cheers, b. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: This is a digitally signed message part URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190716/ad5a8e44/attachment.sig>