Hello asterisk-dev list,

We have created a patch for use in 3PCC applications.
With this patch, asterisk can let the certain SIP phone answer or hold
through AMI action.

[summary]
A patch for sending in-dialog SIP NOTIFY message
with "SIPnotify" AMI action for latest (14.x and 15.x) asterisk.

[detail]
asterisk has an AMI action called "SIPnotify" in order to send any SIP
NOTIFY message. We want to let the SIP phone answer or hold by using
this action, but some SIP phones, especially AudioCodes 4xx phone,
do not accept it.

According to our investigation, some SIP phones do not accept SIP
NOTIFY message if it's not an in-dialog (must have the same "From:",
"Call-ID", and tags as "INVITE"), so we created this patch.

[note]
Some additional (not default) settings may be required on the phone side.
For AudioCodes' 4xx phone, these settings should be added:

voip/talk_event/enabled=1
voip/auto_answer/enabled=1
voip/auto_answer_use_180/enabled=1

[how to use]
After applying this patch (and rebuild after that),
"SIPnotify" can be sent just like this:

---
Action: SIPnotify
ActionID: 3
Channel: SIP/1001
Variable: Event=talk
Variable: Call-ID=112233445566778899aabbccdde...@example.org:5060
---

Here, channel and SIP call-ID should be changed accordingly.
SIP call-ID can be acquired by "SIPCALLID" in response of
"Status" AMI action:

---
Action: Status
ActionID: 2
Channel: SIP/1001-00000001
AllVariables: true

Event: Status
Privilege: Call
Channel: SIP/1001-00000001
ChannelState: 5
ChannelStateDesc: Ringing
...
Variable: DIALEDPEERNUMBER=1001
Variable: SIPCALLID=112233445566778899aabbccdde...@example.org:5060
---

After sending a "SIPnotify" action with "Variable: Call-ID=...",
SIP NOTIFY message will be sent to the target SIP phone with in-dialog
(i.e. the same "From:", "Call-ID", and tags as "INVITE").

If change "Event=talk" to "Event=hold", SIPnotify can be used to let
the phone hold (use "Event=talk" to unhold).

Thanks,

-- 
Yasuhiko Kamata <yasuhiko.kam...@nxtg.co.jp>

Attachment: asterisk.ami_sipnotify_indialog.patch
Description: Binary data

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

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

Reply via email to