Asterisk >--call--> SipX

Need help badly~

I can’t pass a call from Asterisk PBX to SipX.

I think I have all of the right configurations but not sure because I never used Asterisk before. What should I configure to call from an asterisk phone to a SipX phone.

I keep getting the [== Everyone is busy/congested at this time (1:0/0/1)] error.

Can someone please tell me the secret.

Thanks for help! :?:

I think i saw you on IRC… if you didn’t get it fixed post your current configs and I’ll help you out if i can

Yup that was me.

We lost all power here in Seattle and still down. Any how here is the info:

—extensions.conf----

exten => 2218,1,Dial(SIP/2218@sea-na-pbx3251.na.eedinc.net:5060/2218,30,t)
exten => 2218,1,Dial(SIP/2218@sea-na-pbx3251.na.eedinc.net:5060,30,t)
exten => 2218,1,Dial(SIP/2218@sea-na-pbx3251.na.eedinc.net,30,t)

These are the variations I have tried and I always get this error:

– Executing [2218@default:1] Dial(“SIP/7777-0959b4c8”, “SIP/2218@sea-na-pbx3251.na.eedinc.net:5060/2218|30|t”) in new stack
[Dec 15 16:00:08] WARNING[5006]: chan_sip.c:2681 create_addr: No such host: sea-na-pbx3251.na.eedinc.net
[Dec 15 16:00:08] WARNING[5006]: app_dial.c:1081 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [2218@default:2] Congestion(“SIP/7777-0959b4c8”, “”) in new stack
== Spawn extension (default, 2218, 2) exited non-zero on ‘SIP/7777-0959b4c8’

[Dec 15 16:00:08] WARNING[5006]: chan_sip.c:2681 create_addr: No such host: sea-na-pbx3251.na.eedinc.net

That is your problem. Asterisk is unable to resolve that address, thus it can’t connect to it. Bet you can’t ping it either?

This is almost certainly a DNS problem. Either make sure your DNS works or try putting the address in as an IP…

perhaps the power is down and thus the server your’re trying to work with is also down?

And for the record, the 3rd one is the correct way to do it :smile:

good luck!

Here is my dig from the box.
/********************************************************
[root@sea-na-pbx2317 ~]# dig sea-na-pbx3251.na.eedinc.net

; <<>> DiG 9.2.4 <<>> sea-na-pbx3251.na.eedinc.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55083
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sea-na-pbx3251.na.eedinc.net. IN A

;; ANSWER SECTION:
sea-na-pbx3251.na.eedinc.net. 3600 IN A 172.16.15.25

;; Query time: 3 msec
;; SERVER: 192.168.1.26#53(192.168.1.26)
;; WHEN: Fri Dec 15 16:29:02 2006
;; MSG SIZE rcvd: 62

/**************************************************************

Here is what it looks like when I use the ip instead.

/************************************************************
exten => 2218,1,Dial(SIP/2218@172.16.15.25,30,t)

ERROR msg:

-- Executing [2218@default:1] Dial("SIP/7777-0959b4c8", "SIP/2218@172.16.15.25|30|t") in new stack
-- Called 2218@172.16.15.25
-- SIP/172.16.15.25-09e7fab8 is circuit-busy

== Everyone is busy/congested at this time (1:0/1/0)
– Executing [2218@default:2] Congestion(“SIP/7777-0959b4c8”, “”) in new stack
== Spawn extension (default, 2218, 2) exited non-zero on ‘SIP/7777-0959b4c8’

/************************************************************

Get this, I can call my audio codes sip gateways just fine.

Bender,

Mike here. Got lucky never lost power here.

I have calls working from my asterisk server to sipx.

This is what I am doing:

extensions.conf:

exten => _3XX,2,Dial(SIP/sipx/${EXTEN})
This send all 3xx dialed number to 3xx at sipx configured in sip.conf

sip.conf

[sipx]
type=friend
context=from-sipx
host=sipx.company.net
insecure=invite
disallow=all
allow=ulaw

The above should allow you send and receive calls between asterisk and sipx.

Hi Mike,

where is the context=from-sipx defined and what does it say? Is it in your extensions.conf dial plan?

Bender,

The context from-sipx is in extensions.conf and defines the context for incoming calls from the sipxchange server.

This is what I have for that
[from-sipx]
;
;Inconing SIP call from sipx.company.net
;
exten => s,1,Goto(demo,s,1)

This line I posted earlier from my extensions.conf " exten => _3XX,2,Dial(SIP/sipx/${EXTEN})" is in my trunkld context because I want only certain parties with long distance privileges to be able to dial that server.

Well here is what I did;

sip.conf

[sipx]
type=friend
context=from-sipx
host=sea-na-pbx3251.na.eedinc.net
insecure=invite
disallow=all
allow=ulaw

extensions.conf

[from-sipx]

exten => 2218,1,Dial(SIP/sipx/${EXTEN})
exten => 2218,2,Congestion()
exten => 2218,102,Congestion()

When I reload both files this is the error I get.

sea-na-pbx2317CLI> sip reload
Reloading SIP
CLI>
== Parsing ‘/etc/asterisk/sip.conf’: Found
== Parsing ‘/etc/asterisk/users.conf’: Found
[Dec 15 18:01:10] WARNING[4436]: acl.c:243 ast_get_ip_or_srv: Unable to lookup ‘sea-na-pbx3251.na.eedinc.net
== Parsing ‘/etc/asterisk/sip_notify.conf’: Found

From the root prompt if I dig that FQDN it resolves as shown above.

Bender,

Do you have srvlookup=yes set in your sip.conf? If not set it. Also, try adding the hostname and IP address for sea-na-pbx3251.na.eedinc.net to the /etc/hosts file on the asterisk server.

Also I noticed the ip address the DNS server where the dig was performed was in the 192.168.1.0 subnet but the sea-na-pbx3251.na.eedinc.net server is in the 172.16.15.0 subnet. Which subnet is the asterisk server a member of and if it is the 192.168.1.0 subnet does a route exist to 172.16.15.0?

[quote=“SuperB”]Bender,

Do you have srvlookup=yes set in your sip.conf? If not set it. Also, try adding the hostname and IP address for sea-na-pbx3251.na.eedinc.net to the /etc/hosts file on the asterisk server.

Also I noticed the ip address the DNS server where the dig was performed was in the 192.168.1.0 subnet but the sea-na-pbx3251.na.eedinc.net server is in the 172.16.15.0 subnet. Which subnet is the asterisk server a member of and if it is the 192.168.1.0 subnet does a route exist to 172.16.15.0?[/quote]

The 192.168.1.0 subnet is where DNS resides.

SipX 172.16.15.25

Ast# 172.16.15.27

and the /etc/hosts file already reflects what it should as you say. Let me go on to state that /etc/sysconfig/network also reflects the right host and Domain (FQDN)

I have tried both srvlookup=yes and no.

I think I will try again with a more cleen configuratin that only includes one sip channel for SipX one entry for dial plan to call SipX and one sip channel for a friend to origionate and recieve phone calls to sipx and see what i get. I’ll repost my results when i get it done.

[quote=“SuperB”]Bender,

Do you have srvlookup=yes set in your sip.conf? If not set it. Also, try adding the hostname and IP address for sea-na-pbx3251.na.eedinc.net to the /etc/hosts file on the asterisk server.

Also I noticed the ip address the DNS server where the dig was performed was in the 192.168.1.0 subnet but the sea-na-pbx3251.na.eedinc.net server is in the 172.16.15.0 subnet. Which subnet is the asterisk server a member of and if it is the 192.168.1.0 subnet does a route exist to 172.16.15.0?[/quote]

I miss read your recomendation to make an entry in my /etc/hosts file to include hostname and IP address for sea-na-pbx3251.na.eedinc.net. I wasn’t aware of the possibility, so I tried it for the heck of it. Well would you believe it worked. See final post for all working configs and /etc/hosts examples.

I hope this helps any future users…

Thanks a tone to you guys SuperB and IronHelix for your quick responsiveness in supporting me in getting this to work. I really can’t say thanks enough.

glad to help, thats what this forum is here for!

HOWTO make Asterisk <-- TALK TO --> SipX (how to make asterisk talk to sipx)

/etc/hosts

Do not remove the following line, or various programs

that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost
172.16.15.27 sea-na-pbx2317.na.eedinc.net na.eedinc.net /* this is the Asterisk Server
172.16.15.25 sea-na-pbx3251.na.eedinc.net na.eedinc.net /* this is the SipX server

===========================================
sip.conf

;[general] section contains the channel settings
;and default options for all users and peers defined here within sip.conf

[general]

allowguest=yes
context=default
port=5060 ; Asterisk uses port 5060 for SIP signalling
bindport=5060
bindaddr=0.0.0.0 ; Tells Asterisk to listen on all interfaces
srvlookup=yes ; Disable or Enable DNS SRV lookups
disallow=all
allow=ulaw
canredirect=no
careinvite=yes
dtmfmode=rfc2833
host=172.16.15.25
nat=no

[sipx3251]
;
; Channel used to call SipX Corp
;
type=friend
context=outgoing
host=sea-na-pbx3251.na.eedinc.net
insecure=invite
disallow=all
allow=ulaw

[7777]
type=friend ; Defined as both user and peer
secret=7777 ; password
username=7777
qualify=yes ; Qualify peer is no more than 2000 ms away
nat=no ; This phone is not natted
host=dynamic ; Phone uses DHCP
defaultip=192.168.6.103 ; Use the ip given in DHCP whene VPNed in.
canreinvite=yes ; Asterisk by default tries to redirect
context=default ; the internal context controls what we can do
dtmfmode=rfc2833 ; sipx likes that

extensions.conf

[general]
static=yes
writeprotect=yes

[internal]
include => outgoing
exten => 7777,1,Dial(Sip/7777,20)
exten => 7777,2,Dial(Sip/7777@sea-na-pbx2317.na.eedinc.net,20,t)
exten => 7777,3,Hangup()

[incoming]
exten => 7777,1,Dial(SIP/7777,20)
exten => 7777,2,Dial(SIP/7777@sea-na-pbx2317.na.eedinc.net,20,t)
exten => 7777,3,Hangup()

[outgoing]
;
; Call a SipX extension
;
exten => 2218,1,Dial(SIP/sipx3251/${EXTEN})
;
[default]
;
include => internal
include => outgoing


**** WARNING **** WARNING **** WARNING ****


The above mentioned configuration is very basic and just an example of how I was able to get my Asterisk box to talk to a SipX box. This is not a recomendation for how to define your channels and dial plan up for a finalized operating environment.