0
votes

I have a continental calling card and I'm not sure how to make it possible to dial out with my asterisk server.

It is a VOIP prepaid card. I can call out on a softphone using their server address and my username and password.

I can't figure out my sip.conf or my dial plan.

Here is what I have.

sip.conf:

[continentalcard]
host=continental.com
defaultuser=username  ;; user on continental's server
secret=password
register => username:[email protected]
context=global

[frank]
type=friend
defaultuser=frank ;; user on my local asterisk server
secret=password
host=dynamic
context=internal

extensions.conf:

[global]
CARD=SIP/continentalcard

[internal]
exten => 100,1,Dial(SIP/frank)
same => n,Hangup()
include => continentalcard

[continentalcard] ;; outgoing
exten => _1NXXNXXXXXX,1,Dial(${CARD}/${EXTEN})

I get the following message on the CLI as I try to dial out 1-222-333-4444 (not the real number):

== Using SIP RTP CoS mark 5 -- Executing [12223334444@internal:1] Dial("SIP/frank-00000151", "SIP/continentalcard:12223334444") in new stack == Using SIP RTP CoS mark 5 [Oct 3 04:02:57] ERROR[22923]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("continentalcard", "12223334444", ...): Servname not supported for ai_socktype [Oct 3 04:02:57] WARNING[22923]: chan_sip.c:5866 create_addr: No such host: continentalcard:12223334444 [Oct 3 04:02:57] WARNING[22923]: app_dial.c:2345 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent) == Everyone is busy/congested at this time (1:0/0/1) -- Auto fallthrough, channel 'SIP/frank-00000151' status is 'CHANUNAVAIL'

1
You have incorrect section in sip.conf.arheops

1 Answers

0
votes

Update: Filled sip.conf with the global context. Also just noticed your missing a / in extensions.conf. Please look below

You have your sip.conf formatted incorrectly.

[global]
register => username:[email protected]
context=continentalcard

[continentalcard]
host=continental.com
defaultuser=username
secret=password
context=continentalcard

Registration should be placed under the [global] context in sip.conf.

Context should be continentalcard not global. When the softphone dials 1NXXNXXXXXX it should start using the continentalcard context from extensions and perform the Dial(${CARD}/${EXTEN})