Mike,

I've used this as a basis to do what your looking to do.

TACI - Trivial Asterisk Call-generation Interface <http://www.azxws.com/asterisk/>

Works pretty good. Had a few hickups getting it going, but only took 20 minutes to sort out.
Hickups were:
   - permissions in the manager_custom.conf
- changed some capitalization on the commands coming back from the Asterisk Manager Interface ( can't recall specifics )
   - added select boxes for context

Mike

Mike C. Fletcher wrote:
I'm looking at implementing a feature that will allow a user to click on
a telephone number displayed on a web page and have a call set up such
that we call the user first, and when/if they pick up, we connect them
to the number on which they have clicked.  At the moment I'm writing the
code on an asterisk server (behind a NAT) registered with a SER server.

I've set up the sip.conf with the following:

[testout]
type=peer
secret=ThePasswordForTheAccount
username=20037
fromuser=20037
fromdomain=aci.on.ca
host=aci.on.ca
callerid=Asterisk <[EMAIL PROTECTED]>
nat=yes
insecure=invite

and am producing call files in spool/asterisk/outgoing, that look like this:

Channel: SIP/[EMAIL PROTECTED]
MaxRetries: 0
RetryTime: 60
WaitTime: 30

Context: outgoing
Extension: s
Priority: 1

This causes asterisk to send out SIP INVITE messages, but they aren't
being acknowledged by the MTA registered as 20007 on the SER server.
So, I'm wondering if I've really got the right format for the file
(particularly the channel specification, (for which I didn't really find
a good SIP example for the outgoing operation)).  We won't be using SIP
channels for this in the final deployment, but I would like to know how
to make these channels work for outgoing calls.

It's generating invites like this:

INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 72.137.18.234:5060;branch=z9hG4bK5df94db8;rport
From: "asterisk" <sip:[EMAIL PROTECTED]>;tag=as392fd208
To: <sip:[EMAIL PROTECTED]>
Contact: <sip:[EMAIL PROTECTED]>
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Tue, 17 Jan 2006 22:38:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 265

v=0
o=root 20269 20269 IN IP4 72.137.18.234
s=session
c=IN IP4 72.137.18.234
t=0 0
m=audio 18736 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
(NAT) to 205.207.148.251:5060


Anyway, if anyone's done a SIP-channel outgoing call and can spot the
obvious error it would be appreciated.

Have fun,
Mike


--
Mike Ashton

Quality Track Intl

Ph:     647-722-2092 x 251
Cell:   416-527-4995
Fax:    416-352-6043

QTI CONFIDENTIAL AND PROPRIETARY INFORMATION

The contents of this material are confidential and proprietary to Quality Track 
 International, Inc.
and may not be reproduced, disclosed, distributed or used without the express 
permission of an authorized representative of QTI.
Use for any purpose or in any manner other than that expressly authorized is 
prohibited.
If you have received this communication in error, please immediately delete it 
and all copies, and promptly notify the sender.



begin:vcard
fn:Mike Ashton
n:Ashton;Mike
org:Quality Track Intl
adr:;;63 Kenpark Ave;Brmpton;ON;L6Z 3L4;Canada
email;internet:[EMAIL PROTECTED]
title:CTO
tel;work:905-840-4995
tel;cell:416-527-4995
x-mozilla-html:FALSE
url:http://www.QualityTrack.com
version:2.1
end:vcard

Reply via email to