[asterisk-dev] 3PCC patch for AMI "SIPnotify"
Yasuhiko Kamata
yasuhiko.kamata at nxtg.co.jp
Thu Nov 30 18:46:18 CST 2017
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=112233445566778899aabbccddeeff at 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=112233445566778899aabbccddeeff at 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.kamata at nxtg.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asterisk.ami_sipnotify_indialog.patch
Type: application/octet-stream
Size: 4181 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20171201/55224ef1/attachment.obj>
More information about the asterisk-dev
mailing list