Newbie trouble: no outgoing calls possible

Hello out there,

after several days of google-ing and looking for answers I have no more ideas so I decided to post my questions here…

I am not able to place any outbound calls.

I always get these error messages in the CLI:

[quote][Apr 23 19:07:17] ERROR[14928] netsock2.c: getaddrinfo(“0173xxxxxxx”, “(null)”, …): Name or service not known
[Apr 23 19:07:17] WARNING[14928] chan_sip.c: No such host: 0173xxxxxxx
[Apr 23 19:07:17] WARNING[14928] acl.c: Cannot connect
[Apr 23 19:07:17] WARNING[14928] chan_sip.c: sip_xmit of 0xb7df668 (len 975) to (null) returned -1: Invalid argument
[Apr 23 19:07:17] WARNING[14569] chan_sip.c: sip_xmit of 0xb7df668 (len 975) to (null) returned -1: Invalid argument
[Apr 23 19:07:18] WARNING[14569] chan_sip.c: sip_xmit of 0xb7df668 (len 975) to (null) returned -1: Invalid argument
[Apr 23 19:07:20] WARNING[14569] chan_sip.c: sip_xmit of 0xb7df668 (len 975) to (null) returned -1: Invalid argument
[Apr 23 19:07:24] WARNING[14569] chan_sip.c: sip_xmit of 0xb7df668 (len 975) to (null) returned -1: Invalid argument
[Apr 23 19:07:32] WARNING[14569] chan_sip.c: sip_xmit of 0xb7df668 (len 975) to (null) returned -1: Invalid argument
[Apr 23 19:07:48] WARNING[14569] chan_sip.c: sip_xmit of 0xb7df668 (len 975) to (null) returned -1: Invalid argument[/quote]

I use the following setup:
[ul]OpenSUSE 11.4 with Asterisk 1.8.3
Cisco 7965G, Cisco SPA525G2, Linksys SPA942
VoIP providers: dus.net and sipgate[/ul]

sip.conf

[quote][general]
context = default
allowoverlap = no
udpbindaddr = 0.0.0.0
tcpenable = no
tcpbindaddr = 0.0.0.0
srvlookup = yes
subscribecontext = default
allowexternaldomains = yes
allowguest = yes
allowsubscribe = yes
allowtransfer = yes
alwaysauthreject = no
autodomain = no
callevents = no
checkmwi = 10
compactheaders = no
defaultexpiry = 120
dumphistory = no
externrefresh = 10
g726nonstandard = no
jbenable = no
jbforce = no
jblog = no
maxcallbitrate = 384
maxexpiry = 3600
minexpiry = 60
mohinterpret = default
notifyringing = yes
pedantic = no
progressinband = never
promiscredir = no
realm = asterisk
recordhistory = no
registerattempts = 0
registertimeout = 20
relaxdtmf = no
sendrpid = no
sipdebug = yes
t1min = 100
t38pt_udptl = yes
tos_audio = none
tos_sip = none
tos_video = none
trustrpid = no
useragent = Asterisk PBX
usereqphone = no
videosupport = yes
externip = 217.86.154.120
language = de
qualify = no
register = 0003878xxxxx:xxxx@voip.dus.net/0003878xxxxx
register = 32xxxxx:xxxxxx@sipgate.de/32xxxxx
domain = 172.20.2.251
localnet = 172.20.2.0/255.255.255.0
disallow = all
allow = ulaw,alaw,gsm,g729,h263,h263p,g726,g723
bindport = 5060
context = dusnet_gressenich_in

[sipgate_gressenich]
type = friend
insecure = invite
nat = yes
username = 32xxxxx
fromuser = 32xxxxx
fromdomain = sipgate.de
secret = xxxxxx
host = sipgate.de
qualify = yes
canreinvite = no
dtmfmode = rfc2833
context = sipgate_gressenich_in

[dusnet_gressenich]
type = peer
username = 0003878xxxxx
host = voip.dus.net
fromdomain = dus.net
fromuser = 0003878xxxxx
secret = xxxx
insecure = very
qualify = 1000
nat = no
disallow=all
allow=ulaw
allow=alaw
allow=g726
allow=g729
;context=dusnet_gressenich_in

[dusnet_in_talos]
type=peer
fromdomain=talos.dus.net
host=talos.dus.net
insecure=port,invite
context=dusnet_gressenich_in

[dusnet_in_zelos]
type=peer
fromdomain=zelos.dus.net
host=talos.dus.net
insecure=port,invite
context=dusnet_gressenich_in

[dusnet_in_helios]
type=peer
fromdomain=helios.dus.net
host=talos.dus.net
insecure=port,invite
context=dusnet_gressenich_in[/quote]

extensions.conf

[quote]
[general]
static = yes
writeprotect = no
bbbclearglobalvars = no
clearglobalvars = yes

[ringgroups]
[directory]
[DLPN_Gressenich]
include = default
include = parkedcalls
include = conferences
include = ringgroups
include = voicemenus
include = queues
include = voicemailgroups
include = directory
include = pagegroups
include = page_an_extension
include = internal
include = sipgate_gressenich_out
include = dusnet_gressenich_out

[sipgate_gressenich_out]
exten => _X.,1,Set(CALLERID(num)=3xxxxxx)
exten => _X.,2,Dial(SIP/${EXTEN},30,trg)
exten => _X.,3,Hangup

[sipgate_gressenich_in]
exten = 3xxxxxx,1,Answer
exten = 3xxxxxx,2,Dial(SIP/32)
exten = 3xxxxxx,3,VoiceMail(32,u)
exten = 3xxxxx,4,Hangup

[dusnet_gressenich_in]
exten = 000387xxxxxx,1,Answer
exten = 000387xxxxxx,2,Dial(SIP/31,20)
exten = 000387xxxxxx,3,VoiceMail(31,u)
exten = 000387xxxxxx,4,Hangup

[dusnet_gressenich_out]
exten => _X.,1,Set(CALLERID(num)=000387xxxxxx)
exten => _X.,2,Dial(SIP/${EXTEN},30,trg)
exten => _X.,3,Hangup

[internal]
[globals]
FEATURES =
DIALOPTIONS =
RINGTIME = 20
FOLLOWMEOPTIONS =
PAGING_HEADER = Intercom
[default]
exten = _#1X,1,Set(MBOX=${EXTEN:1}@default)
exten = _#1X,n,VoiceMail(${MBOX})
exten = a,1,VoicemailMain(${MBOX})
exten = 999,1,VoiceMailMain(${CALLERID(num)}@default)

[conferences]
[queues]
[voicemenus]
[voicemailgroups]
[page_an_extension]
[pagegroups]
[asterisk_guitools]
exten = executecommand,1,System(${command})
exten = executecommand,n,Hangup()
exten = record_vmenu,1,Answer
exten = record_vmenu,n,Playback(vm-intro)
exten = record_vmenu,n,Record(${var1},0,500,k)
exten = record_vmenu,n,Playback(vm-saved)
exten = record_vmenu,n,Playback(vm-goodbye)
exten = record_vmenu,n,Hangup
exten = play_file,1,Answer
exten = play_file,n,Playback(${var1})
exten = play_file,n,Hangup

[macro-trunkdial-failover-0.3]
exten = s,1,GotoIf($[${LEN(${FMCIDNUM})} > 6]?1-fmsetcid,1)
exten = s,n,GotoIf($[${LEN(${GLOBAL_OUTBOUNDCIDNAME})} > 1]?1-setgbobname,1)
exten = s,n,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)})
exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)})
exten = s,n,GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1)
exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})})
exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)})
exten = s,n,Goto(1-dial,1)
exten = 1-setgbobname,1,Set(CALLERID(name)=${GLOBAL_OUTBOUNDCIDNAME})
exten = 1-setgbobname,n,Goto(s,3)
exten = 1-fmsetcid,1,Set(CALLERID(num)=${FMCIDNUM})
exten = 1-fmsetcid,n,Set(CALLERID(name)=${FMCIDNAME})
exten = 1-fmsetcid,n,Goto(s,4)
exten = 1-dial,1,Dial(${ARG1})
exten = 1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1)
exten = 1-CHANUNAVAIL,1,Dial(${ARG2})
exten = 1-CHANUNAVAIL,n,Hangup()
exten = 1-CONGESTION,1,Dial(${ARG2})
exten = 1-CONGESTION,n,Hangup()
exten = 1-out,1,Hangup()
[queue-member-manager]
exten = handle_member,1,Verbose(2, Looping through queues to log in or out queue members)
exten = handle_member,n,Set(thisActiveMember=${CHANNEL(channeltype)}/${CHANNEL(peername)})
exten = handle_member,n,Set(queue_field=2)
exten = handle_member,n,Set(thisQueueXtn=${CUT(QUEUES,,,${queue_field})})
exten = handle_member,n,While($[${EXISTS(${thisQueueXtn})}])
exten = handle_member,n,Macro(member-loginlogout)
exten = handle_member,n,Set(queue_field=$[${queue_field} + 1])
exten = handle_member,n,Set(thisQueueXtn=${CUT(QUEUES,,,${queue_field})})
exten = handle_member,n,EndWhile()
[macro-member-loginlogout]
exten = s,1,Verbose(2, Logging queue member in or out of the request queue)
exten = s,n,Set(thisQueue=${thisQueueXtn})
exten = s,n,Set(queueMembers=${QUEUE_MEMBER_LIST(${thisQueue})})
exten = s,n,Set(field=1)
exten = s,n,Set(logged_in=0)
exten = s,n,Set(thisQueueMember=${CUT(queueMembers,,,${field})})
exten = s,n,While($[${EXISTS(${thisQueueMember})}])
exten = s,n,GotoIf($[“${thisQueueMember}” != “${thisActiveMember}”]?check_next)
exten = s,n,Set(logged_in=1)
exten = s,n,ExitWhile()
exten = s,n(check_next),Set(field=$[${field} + 1])
exten = s,n,Set(thisQueueMember=${CUT(queueMembers,,,${field})})
exten = s,n,EndWhile()
exten = s,n,MacroIf($[${logged_in} = 0]?q_login:q_logout)
[macro-q_login]
exten = s,1,Verbose(2, Logging ${thisActiveMember} into the ${thisQueue} queue)
exten = s,n,AddQueueMember(${thisQueue},${thisActiveMember})
exten = s,n,Playback(silence/1)
exten = s,n,ExecIf($[“${AQMSTATUS}” = “ADDED”]?Playback(agent-loginok):Playback(an-error-has-occurred))
[macro-q_logout]
exten = s,1,Verbose(2, Logged ${thisActiveMember} out of ${thisQueue} queue)
exten = s,n,RemoveQueueMember(${thisQueue},${thisActiveMember})
exten = s,n,Playback(silence/1)
exten = s,n,ExecIf($[“${RQMSTATUS}” = “REMOVED”]?Playback(agent-loggedoff):Playback(an-error-has-occurred))
[macro-stdexten]
exten = s,1,Set(_DYNAMIC_FEATURES=${FEATURES})
exten = s,2,Set(ORIG_ARG1=${ARG1})
exten = s,3,GotoIf($["${FOLLOWME
${ARG1}}" = “1”]?6:4)
exten = s,4,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
exten = s,5,Goto(s-${DIALSTATUS},1)
exten = s,6,Macro(stdexten-followme,${ARG1},${ARG2})
exten = s-NOANSWER,1,Voicemail(${ORIG_ARG1},u)
exten = s-NOANSWER,2,Goto(default,s,1)
exten = s-BUSY,1,Voicemail(${ORIG_ARG1},b)
exten = s-BUSY,2,Goto(default,s,1)
exten = _s-.,1,Goto(s-NOANSWER,1)
exten = a,1,VoicemailMain(${ORIG_ARG1})
[macro-stdexten-followme]
exten = s,1,Answer
exten = s,2,Set(ORIG_ARG1=${ARG1})
exten = s,3,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
exten = s,4,Set(__FMCIDNUM=${CALLERID(num)})
exten = s,5,Set(__FMCIDNAME=${CALLERID(name)})
exten = s,6,Followme(${ORIG_ARG1},${FOLLOWMEOPTIONS})
exten = s,7,Voicemail(${ORIG_ARG1},u)
exten = s-NOANSWER,1,Voicemail(${ORIG_ARG1},u)
exten = s-BUSY,1,Voicemail(${ORIG_ARG1},b)
exten = s-BUSY,2,Goto(default,s,1)
exten = _s-.,1,Goto(s-NOANSWER,1)
exten = a,1,VoicemailMain(${ORIG_ARG1})
[macro-pagingintercom]
exten = s,1,SIPAddHeader(Alert-Info: ${PAGING_HEADER})
exten = s,2,Page(${ARG1},${ARG2})
exten = s,3,Hangup
[macro-local-callingrule-cid-0.1]
exten = s,1,Set(CALLERID(all)=${IF($[${LEN(${ARG4})} > 2]?${ARG4}:)})
exten = s,n,Goto(${ARG1},${ARG2},${ARG3})[/quote]

users.conf

I am thankful for any hints! I am pretty sure I messed it up…

Best regards,

Joerg

In your extensions.conf, should the outgoing call not use something like

instead of

?

Hey batrams,

thanks for the answer.

Unfortunately it doesn’t help…

The CLI output is

[quote][Apr 23 21:39:20] WARNING[14569]: chan_sip.c:3115 __sip_xmit: sip_xmit of 0xb7d4ba8 (len 973) to (null) returned -1: Invalid argument
Retransmitting #4 (no NAT) to (null):
INVITE sip:0173xxxxxxx SIP/2.0
Via: SIP/2.0/UDP 217.86.154.xxx:5060;branch=z9hG4bK6b63164c
Max-Forwards: 70
From: “J. xxx” sip:32xxxx@217.86.154.xxx;tag=as23ca0a78
To: sip:01733538874
Contact: sip:32xxxx@217.86.154.xxx:5060
Call-ID: 3d0dffd030a36f95739e79885642a272@217.86.154.xxx:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Sat, 23 Apr 2011 19:39:17 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
upported: replaces, timer
Content-Type: application/sdp
Content-Length: 420

v=0
o=root 140270145 140270145 IN IP4 217.86.154.xxx
s=Asterisk PBX 1.8.3.2
c=IN IP4 217.86.154.xxx
b=CT:384
t=0 0
m=audio 10920 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
m=video 13850 RTP/AVP 34 98
a=rtpmap:34 H263/90000
a=rtpmap:98 h263-1998/90000
a=sendrecv


[Apr 23 21:39:24] WARNING[14569]: chan_sip.c:3115 __sip_xmit: sip_xmit of 0xb7d4ba8 (len 973) to (null) returned -1: Invalid argument
Reliably Transmitting (no NAT) to 83.125.8.83:5060:
OPTIONS sip:voip.dus.net SIP/2.0
Via: SIP/2.0/UDP 217.86.154.xxx:5060;branch=z9hG4bK28b3d985
Max-Forwards: 70
From: “asterisk” sip:asterisk@217.86.154.xxx;tag=as34049abd
To: sip:voip.dus.net
Contact: sip:asterisk@217.86.154.xxx:5060
Call-ID: 344e9789685f6d02574c612f6bef3192@217.86.154.xxx:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Date: Sat, 23 Apr 2011 19:39:29 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


<— SIP read from UDP:83.125.8.83:5060 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 217.86.154.xxx:5060;branch=z9hG4bK28b3d985;received=217.86.154.xxx
From: “asterisk” sip:asterisk@217.86.154.xxx;tag=as34049abd
To: sip:voip.dus.net;tag=as1a83fb6a
Call-ID: 344e9789685f6d02574c612f6bef3192@217.86.154.xxx:5060
CSeq: 102 OPTIONS
User-Agent: SIP_GW_1.4.31.PL1 proxy.dus.net
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Accept: application/sdp
Content-Length: 0
[/quote]

I forgot to mention that I’d like to have the dusnet line outgoing on line 1 and sipgate on line 2 of the 7965 (extensions 31 and 32)

Thanks a lot,

Joerg

It should work. Your CLI output is incomplete, so we can’t see whether it really is executing the corrected dialplan.

PS Don’t run before you can walk. Until you understand Asterisk address structures for simple case, don’t try and do anything tricky.

Hello David,

thanks for the reply and sorry for the late answer…

Thanks fpr the hint. I am starting to crawl first…

Starting from scratch I achieved the following up to now:

  • making internal calls
  • receiving external calls from sipgate and routing them to an internal number

What I am not able to do is

  • receiving external calls from dusnet (only 3 from 10 calls are routed to the asterisk server)

What I understood is that the root of the problems is the voip cluster dusnet is operating. I used the recipe on the asterisk site http://www.sipwire.de/index.php?id=214, but it does not work properly…

I kindly appreciate ANY help!
The other problems can be solved after I learned to crawl…
Best regards,

Joerg

The dusnet host name resolves to four different IP addresses. I am pretty sure that Asterisk will use only the first to match it as a peer. I think you will need to include it four times, under each of its specific IP addresses.

Thanks for the hint with the four servers!

Regarding to the dus.net page there are only three servers (talos, zelos and helios.dus.net). There is the fourth one (taris.dus.net) missing!!

Now it works!!

Now back from crawling to walking and to outgoing calls…

Will report back whether it works or not.

Best regards,

Joerg