[quote=âbaconbuttieâ]how not ? if incoming Zap calls go to the IVR, and youâve copied the âcontext=â line from zapata.conf to the [general] section of sip.conf, then you should be good to go.
if youâre still struggling, post the sections from zapata.conf, sip.conf and extensions.conf, and a verbose Asterisk log fragment for a failed incoming call.[/quote]
Hi baconbuttie,
The following is my question:
In zapata.conf I could set the channel ID, the context name for which the incoming call could be handled. Then in the extension.conf, I define the context what action to do. Then I attached the PSTN line (say: 12345678) to the FXO channel defined in zapata.conf. When people call in 12345678, they will be handled by the IVRS defined in the context in the extension.conf.
However, for the SIP cases, If I want to call from SIP extension 200 to SIP extension 201 and people in SIP200 to hear the options of IVRS. How to configure it? Assume I have the following in the extension.conf:
[outboundmsg1]
exten => s,1,DigitTimeout,5 ; Set Digit Timeout to 5 seconds
exten => s,2,ResponseTimeout,10 ; Set Response Timeout to 10 seconds
exten => s,3,Answer
exten => s,4,Wait(1)
exten => s,5,Background(outboundmsgs/msg1) ; "play outbound msg"
exten => s,6,Background(outboundmsgs/susan) ; "play outbound msg"
exten => s,7,Background(outboundmsgs/happybirthday) ; "play outbound msg"
exten => s,8,Background(outboundmsgs/how_to_ack) ; "Press 1 to replay or 2 to acknowledge receiving this message"
exten => 1,1,Goto(s,5) ; replay message
exten => 2,1,Goto(msgack,s,1) ; acknowledge message
exten => t,1,Playback(outboundmsgs/vm-goodbye)
exten => t,2,Hangup
; at this point we could do something like reschedule the call to try again later
; or send an email saying the msg was not received,
; or âŚ
[msgack]
exten => s,1,Playback(outboundmsgs/thankyou)
exten => s,2,Playback(outboundmsgs/vm-goodbye)
exten => s,3,Hangup
; at this point we might want to log the message acknowledgement somewhere
; and perhaps trigger some additional processing
and in the sip.conf:
[general]
port = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
disallow=all
allow=ulaw
allow=alaw
; If you need to answer unauthenticated calls, you should change this
; next line to âfrom-trunkâ, rather than âfrom-sip-externalâ.
; Youâll know this is happening if when you call in you get a message
; saying âThe number you have dialed is not in service. Please check the
; number and try again.â
;context = from-sip-external ; Send unknown SIP callers to this context
context = outboundmsg1
callerid = Unknown
tos=0x68
; #, in this configuration file, is NOT A COMMENT. This is exactly
; how it should be.
#include sip_nat.conf
#include sip_custom.conf
#include sip_additional.conf
I have tried to add something in the ext 200 and ext 201 defined in the sip_additional.conf as well:
[200]
username=200
type=friend
record_out=Adhoc
record_in=Adhoc
qualify=no
port=5060
nat=never
mailbox=200@device
host=dynamic
dtmfmode=rfc2833
context=outboundmsg1
canreinvite=no
callerid=Peter <200>
[201]
username=201
type=friend
record_out=Adhoc
record_in=Adhoc
qualify=no
port=5060
nat=never
mailbox=201@device
host=dynamic
dtmfmode=rfc2833
context=outboundmsg1
canreinvite=no
callerid=walter <201>
However, I could not achieve my desired result. Please help!
Thanks a lot.
fly_sun