# INFO message not delivered to peer

**URL:** <https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683>\
**Category:** Asterisk SIP\
**Created:** [August 16, 2017, 12:26pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683 "2017-08-16T12:26:31Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![rg\_labs](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@rg\_labs](https://community.asterisk.org/u/rg_labs)\
**Post date:** [August 16, 2017, 12:26pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/1 "2017-08-16T12:26:31Z")

</div>

Hello,

I am trying to send an INFO message between two peers during a call. The goal is to send a text string from peerA to peerB. Asterisk’s log shows that the INFO message (with the correct text string in the Body field) is well received by Asterisk from peerA and that Asterisk is replying to peerA with an OK message.

However, Asterisk doesn’t seem to be forwarding the INFO message to peer B. Neither it appears in the logs, nor is it received by the intended callback in peerB code. Is there a setting for that anywhere please? Thank you.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [August 16, 2017, 12:34pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/2 "2017-08-16T12:34:52Z")

</div>

Asterisk isn’t a SIP proxy and doesn’t forward SIP messages between endpoints. Each side is independent. In the case of INFO messages we only support two: DTMF and video update. All others would result in nothing going on. There’s no setting or configuration to change this, any changes would have to be done in code.

---

<div class="post-metadata">

**Author:** ![rg\_labs](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@rg\_labs](https://community.asterisk.org/u/rg_labs)\
**Post date:** [August 16, 2017, 12:38pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/3 "2017-08-16T12:38:37Z")

</div>

Can I send anything (e.g. a text string) along a DTMF INFO message between A and B via Asterisk? If Asterisk supports DTMF messages, I assume it implies it is able to forward it from A to B. Otherwise, what method would you recommend to exchange data between peers during a call?

Thanks

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [August 16, 2017, 12:41pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/4 "2017-08-16T12:41:06Z")

</div>

Asterisk supports INFO DTMF as specified in the RFC. Each digit is internally turned into a DTMF frame which is then turned back into an INFO message. The SIP MESSAGE[1] type can be used in-dialog to send messages.

[1] [https://tools.ietf.org/html/rfc3428](https://tools.ietf.org/html/rfc3428)

---

<div class="post-metadata">

**Author:** ![rg\_labs](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@rg\_labs](https://community.asterisk.org/u/rg_labs)\
**Post date:** [August 16, 2017, 12:50pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/5 "2017-08-16T12:50:43Z")

</div>

Instant messaging seems to be perfect for my goal. Is it enabled by default on the server or should I enable it explicitly please? Thanks.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [August 16, 2017, 12:52pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/6 "2017-08-16T12:52:31Z")

</div>

Within a call it is exchanged without any configuration required. Only text/plain is supported for a content type, though.

---

<div class="post-metadata">

**Author:** ![rg\_labs](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@rg\_labs](https://community.asterisk.org/u/rg_labs)\
**Post date:** [August 18, 2017, 6:07am UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/7 "2017-08-18T06:07:34Z")

</div>

For some reason, my SIP clients are not able to communicate via IM when using Asterisk. The outgoing message is received by Asterisk but Asterisk is not forwarding the message to the other party. Works perfectly via Linphone server. Any thoughts?

---

<div class="post-metadata">

**Author:** ![navaismo](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/navaismo/32/2481_2.png) [@navaismo](https://community.asterisk.org/u/navaismo)\
**Post date:** [August 18, 2017, 7:25am UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/8 "2017-08-18T07:25:10Z")

</div>

Show the cli output when asterisk receive the meesage and also create a status exten in your context to see what’s happening to the SIP MESSAGE

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [August 18, 2017, 9:36am UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/9 "2017-08-18T09:36:34Z")

</div>

Out of dialogue messages require explicit dialplan code to route and handle them.

---

<div class="post-metadata">

**Author:** ![rg\_labs](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@rg\_labs](https://community.asterisk.org/u/rg_labs)\
**Post date:** [August 18, 2017, 12:27pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/10 "2017-08-18T12:27:45Z")

</div>

This is the log. It seems that after receiving the MESSAGE, Asterisk is executing the dialplan code of extension peer2 (i.e. peer to whom message is sent).

```auto
<------------>
[2017-08-18 14:06:32] VERBOSE[58560] chan_sip.c: Scheduling destruction of SIP dialog '838bc3e4-1c9d-42b7-8f4a-311c6b876883' in 7104 ms (Method: MESSAGE)
[2017-08-18 14:06:32] VERBOSE[58560] chan_sip.c: Scheduling destruction of SIP dialog '838bc3e4-1c9d-42b7-8f4a-311c6b876883' in 7104 ms (Method: MESSAGE)
[2017-08-18 14:06:32] VERBOSE[58560] chan_sip.c:
<--- SIP read from UDP:XX.XX.XX.YY:9782 --->
MESSAGE sip:peer2@XX.XX.XX.XX:5060;transport=UDP SIP/2.0
v: SIP/2.0/UDP XX.XX.XX.YY:9782;rport;branch=z9hG4bKPj4a3ef9ae-aaa8-4fd0-a57d-c19234abf9ad
Max-Forwards: 70
f: <sip:peer1@XX.XX.XX.XX>;tag=0a7c64a6-38aa-4b73-8028-1da4a93e7112
t: <sip:peer2@XX.XX.XX.XX>
i: 838bc3e4-1c9d-42b7-8f4a-311c6b876883
CSeq: 47822 MESSAGE
Accept: text/plain, application/im-iscomposing+xml
User-Agent: Test Android
Authorization: Digest username="peer1", realm="asterisk", nonce="3fa695e6", uri="sip:peer2@XX.XX.XX.XX:5060;transport=UDP", response="8e9a17928853b5bdf54b415588f626c3", algorithm=MD5
c: text/plain
l: 11

Hello World
<------------->
[2017-08-18 14:06:32] VERBOSE[58560] chan_sip.c: --- (12 headers 1 lines) ---
[2017-08-18 14:06:32] VERBOSE[58560] chan_sip.c: Receiving message!
[2017-08-18 14:06:32] VERBOSE[58560] chan_sip.c: Found peer 'peer1' for 'peer1' from XX.XX.XX.YY:9782
[2017-08-18 14:06:32] VERBOSE[58560] chan_sip.c: Looking for peer2 in from-sip (domain XX.XX.XX.XX)
[2017-08-18 14:06:32] VERBOSE[58560] chan_sip.c:
<--- Transmitting (NAT) to XX.XX.XX.YY:9782 --->
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP XX.XX.XX.YY:9782;branch=z9hG4bKPj4a3ef9ae-aaa8-4fd0-a57d-c19234abf9ad;received=XX.XX.XX.YY;rport=9782
From: <sip:peer1@XX.XX.XX.XX>;tag=0a7c64a6-38aa-4b73-8028-1da4a93e7112
To: <sip:peer2@XX.XX.XX.XX>;tag=as41a24556
Call-ID: 838bc3e4-1c9d-42b7-8f4a-311c6b876883
CSeq: 47822 MESSAGE
Server: Asterisk PBX GIT-master-b3914dfM
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
[2017-08-18 14:06:32] VERBOSE[58560] chan_sip.c: Scheduling destruction of SIP dialog '838bc3e4-1c9d-42b7-8f4a-311c6b876883' in 7104 ms (Method: MESSAGE)
[2017-08-18 14:06:32] VERBOSE[58539][C-0000005e] pbx_realtime.c: Executing [peer2@from-sip:1] Gosub("Message/ast_msg_queue", "subrtn,1(peer2)")

```

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [August 18, 2017, 12:30pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/11 "2017-08-18T12:30:03Z")

</div>

That is an out of dialog (or out of call) message, in that case you need to configure messages to go to a separate context (there’s a configuration option in sip.conf for it) and then write dialplan logic to forward it using MessageSend.

---

<div class="post-metadata">

**Author:** ![rg\_labs](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@rg\_labs](https://community.asterisk.org/u/rg_labs)\
**Post date:** [August 18, 2017, 1:15pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/12 "2017-08-18T13:15:45Z")

</div>

I would rather write client code which sends inside dialog instant messages instead. Thanks.

---

<div class="post-metadata">

**Author:** ![navaismo](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/navaismo/32/2481_2.png) [@navaismo](https://community.asterisk.org/u/navaismo)\
**Post date:** [August 18, 2017, 3:03pm UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/13 "2017-08-18T15:03:01Z")

</div>

> [@rg\_labs](#):
>
> I would rather write client code which sends inside dialog instant messages instead. Thanks.

uh? So basically you prefer to re-invent the wheel than use features that already exists?? That’s weird. Look at google for basic examples on how to handle sip messages with asterisk is easy.

---

<div class="post-metadata">

**Author:** ![rg\_labs](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@rg\_labs](https://community.asterisk.org/u/rg_labs)\
**Post date:** [August 19, 2017, 11:34am UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/14 "2017-08-19T11:34:53Z")

</div>

The “client code” was simply a single call to the sendInstantMessage method of the Call (in progress) Java object. There’s a callback to catch it on the other end. (I only need inside dialogue messaging for now.) Piece of cake and no wheel reinvented. Cheers.

---

<div class="post-metadata">

**Author:** ![MarcusLim88](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@MarcusLim88](https://community.asterisk.org/u/MarcusLim88)\
**Post date:** [November 2, 2021, 3:29am UTC](https://community.asterisk.org/t/info-message-not-delivered-to-peer/71683/15 "2021-11-02T03:29:18Z")

</div>

Hi Guys

I’ve have read your article, and I would like to understand in respect to the SIP INFO:

a) using java fastagi or ami how would I retrieve a sip info header sent to an asterisk instance. if so how can could I do this via agi/ami.

b) if not how can I get the access to the info information?
