Skip to content

butrus/asterisk-patches-gpl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

This is a repository of my Asterisk (www.asterisk.org) patches. The patches are
licenced under the GPLv2 General Public Licence. As I'm not willing to sign
any copyright agreement with Digium it is unlikely that these patches will
go into Asterisk's upstream.

You may however (I do explicitly allow this) study the patches and then
write your own solving the same problem or implementing similar functionality
and then submit those to Digium on your own.


Currently, following patches are available:

1) for asterisk-11.13.1~dfsg (Debian Wheezy Backports as of Nov 9, 2017)
========================================================================

 a) asterisk-voicemail-any-variables+bugifxes.patch
 --------------------------------------------------

This patch allows the Voicemail application to use any variable available
to the appropriate asterisk channel (and not just a couple of predefined
variables like VM_CIDNAME, VM_CIDNUM etc.) to be used for text substitutions
of field defined in voicemail.conf (the is mostly of interrest for the IMAP
backend or for paging). For more about the problem, see:
http://lists.digium.com/pipermail/asterisk-users/2007-August/194717.html

Moreover, now you can even use substitutions to 'serveremail' which is
a field in the voicemail.conf defining the sender email adress. This makes
it possible to let the voicemail email message to look like beeing sent
directly from the caller.

E.g. if you set in your diaplan:

exten => *555,1,Answer()
exten => *555,n,Set(TICKET_NR=1234567)
exten => *555,n,Set(VM_CID_EMAIL=john.doe@example.com)
exten => *555,n,Voicemail(1,s)
exten => *555,n,Hangup()

and in the voicemail.conf:

fromstring=${VM_CIDNAME}
serveremail=${VM_CID_EMAIL}
emailsubject=[Ticket ${TICKET_NR}]: New message from ${VM_CIDNAME} (${VM_CIDNUM})

then the email will look like beeing sent from john.doe@example.com and the appropriate
ticket number will appear in the subject.



 b) asterisk-voicemail-any-variables+bugifxes+content-type+reply-to.patch
 ------------------------------------------------------------------------

This is a cumulative patch based on the above one. This patch adds two features:

 1) the possibility to set the content-type of the message (e.g. to text/html)
from the voicemail.conf configuration file (the "emailcontenttype" option).

 2) the possibility to set the reply-to field of the message
(via the "emailreplyto" option in voicemail.conf).

Both options support full substitution, so all of the following are valid options:

emailcontenttype=text/html
emailcontenttype=text/${X_CONTENT}
emailreplyto=${CALLER_NAME} <${CALLER_EMAIL}>
emailreplyto=${CALLER_NAME} <${VM_CIDNUM}@kdakosoft.ua>



 c) asterisk-app-sipnotify.patch
 -------------------------------

This is a patch to chan_sip.c which implements the SIPNotify dialplan application
(not to be confused with the existing SIPNotify AMI method).

The SIPNotify dialplan app has following syntax:

 SIPNotify(type[,peer])

Where 'type' is the type of the SIP NOTIFY message as defined in the sip_notify.conf file
and the optional 'peer' is the peer for the message to be sent to. If no 'peer' is specified
the message will be sent to the current peer.

For example:

exten => *888,1,Answer()
        same =>n,Verbose(0, Send XML-Push message to the calling Yealink phone...)
        same =>n,SIPNotify(yealink-push-xml)	; must be defined in sip_notify.conf
        same =>n,Hangup()

will cause Asterisk to send an "XML-Push" message to the calling Yealink phone after *888
has been dialed. If you want to send such a message to another peer, just call:

exten => *999,1,Answer()
        same =>n,SIPNotify(yealink-push-xml,SIP/123)	; "SIP/" is NOT mandatory
        same =>n,Hangup()

SIPNotify also supports variable substitution, so you can e.g. have in sip_notify.conf:

[yealink-execute]
Event=>yealink-xml
Content-type=>application/xml
Content=><YealinkIPPhoneExecute Beep="yes">
Content=><Title wrap="yes">Execute</Title>
Content=><ExecuteItem>${EXECUTE_URL}</ExecuteItem>
Content=></YealinkIPPhoneExecute>

and then set the appropriate variable(s) in the dialplan:

exten => *555,1,Answer()
	same =>n,Set(EXECUTE_URL=http://someserver/push.xml)
        same =>n,SIPNotify(yealink-execute)
        same =>n,Hangup()


About

Some patches (mostly bugfixes and small enhancements) for the Asterisk PBX released under the GPLv2 licence

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published