Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

Configuring Asterisk to phone you

The following instructions to call a telephone extension were copied into a file within the /var/spool/asterisk/outgoing file directory.
Channel: SIP/line1
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: my-phones
Extension: 10

The extension 10 initiates the call to phone line1 within the context of my-phones.

make a phone call

py_s60 1.1.3 provide a module to make call
import telephone
telephone.dial('017337330') # so easy

You can hang up by... guess it...
telephone.hang_up()

You can combine this with the contacts module to search and dial
import contacts, telephone
name = 'korakot'
cont = contacts.open().find(name)[0]
number = cont.find('mobile_number')[0].value
telephone.dial(number)
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS