[Asterisk-Users] softphone has problem to call out via X100P card

Kris Stark Kris.Stark at goDataflow.com
Thu Feb 24 21:20:46 MST 2005


Ho Chan wrote:
> Hi all,
> 
> I have the Asterisk set up and 2 softphone (Xlite) set up on two other 
> PC. With the following configuration, I can use one softphone (2000) to 
> call the other one (2001) and/or the voicemail at 2999.
> 
> Here is my problem:
> 
> 1.       When I dial 9+nxxx-xxxx with one of the softphone to the PSTN 
> via X100P card, I got busy tone. (i.e. I want to use the phone line 
> which is connected to the X100P to call out)

You need to allow the softphones to go to the context that allows 
dialling out.  See below - inline comments...

> 2.       When I use my cell phone to call the phone line which is 
> connected to X100P, it just rings for 4 times then hang up on me. (i.e. 
> Asterisk never answer the phone)

You need to define a context for the zap inbound channel to go to - see 
below...

> Zapata.conf
> 
> language=en
[snip]
> channel=1
context=from-sip

The above is not quite recommended, but would work with the config that 
you have...  Ideally, you'd have an incoming context in your 
extensions.conf, and the context in zaptel would then point into that 
context.

> ------------------------------------------------------------------------------------------------- 
> 
> Sip.conf
> 
> [general]
> port = 5060
> bindaddr = 0.0.0.0
> allow=all
> 
> context = outgoing
> 
> [2000]
> type=friend
> [snip]
> context=from-sip
> mailbox=100

This sends all your calls from the softphone into the "from-sip" context 
in extensions.conf.

> Extension.conf
> 
> [general]
> static=yes
> writeprotect=yes
> 
> [outgoing]
> ignorepat => 9
> exten => _9NX.,1,Dial(ZAP/1/${EXTEN:1},60,t)
> exten => _9NX.,2,Congestion

None of your calls ever get into this context...  You would want to have 
a "include => outgoing" in your from-sip context to be able to dial out. 
  However, with the way your extensions.conf is set up right now that 
would be a security risk since to be able to call in you would have to 
have your inbound calls from the PSTN going into this same context...

> [from-sip]
> exten => 2000,1,NoOp("call for "${EXTEN})
> exten => 2000,2,Dial(SIP/2000,20,tr)
> exten => 2000,3,Voicemail(u2000)
> exten => 2000,102,Voicemail(b2000)
> exten => 2000,103,Hangup
[snip]
> exten => 2999,1,VoicemailMain(${CALLERIDNUM})
> 
> ; Call straight to extension 2001
> 
> exten => s,1,Answer
> exten => s,2,Dial(SIP/2001,20,tr)
> exten => s,3,Voicemail(u2001)
> exten => s,4,Voicemail(b2001)

Basically, try something like:

[inbound]
; Since you want all your calls from the PSTN to go to ext 2001
exten => s,1,Answer
exten => s,2,Dial(SIP/2001,20)
exten => s,3,Voicemail(u2001)
exten => s,103,Voicemail(b2001)

[outbound]
ignorepat => 9
exten => _9NX.,1,Dial(ZAP/1/${EXTEN:1},60,t)
exten => _9NX.,2,Congestion

[from-sip]
include => outbound

exten => 2000,1,NoOp("call for "${EXTEN})
exten => 2000,2,Dial(SIP/2000,20,tr)
exten => 2000,3,Voicemail(u2000)
exten => 2000,102,Voicemail(b2000)
exten => 2000,103,Hangup

exten => 2001,1,NoOp("call for "${EXTEN})
exten => 2001,2,Dial(SIP/2000,20,tr)
exten => 2001,3,Voicemail(u2001)
exten => 2001,102,Voicemail(b2001)
exten => 2001,103,Hangup

exten => 2999,1,VoicemailMain(${CALLERIDNUM})


Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Kris.Stark.vcf
Type: text/x-vcard
Size: 306 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050224/6300b4ea/Kris.Stark.vcf


More information about the asterisk-users mailing list