While making call from zoiper to any number

Executing [48695025705@from-internal:1] Dial(“SIP/1690100-00000153”, “SIP/48695025705@external-pbx,60,Tt”) in new stack
[Jun 25 07:07:42] ERROR[20312][C-000042da]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo(“-”, “(null)”, …): Name or service not known
[Jun 25 07:07:42] WARNING[20312][C-000042da]: acl.c:890 resolve_first: Unable to lookup ‘-’

getting this when calling from softpone to any number may I know the exact root cause of this
when I am calling from any number to sip number its working fine but not able to call from sip numer to another number

You’ve configured “-” where you should have configured a name or address. As you haven’t provided your configuration.

“SIP number” isn’t an official term, but I would say that both the caller and callee in this example might meet my understanding of how that term might be used.

Also note that chan_sip is no longer part of the official project; if you want to continue using it, you will need to get versions maintained by people outside of the official project.



here is my configuration and I am able to get call on the zoiper but not able to call from zoiper to any number and the error is :- Executing [48695025705@from-internal:1] Dial(“SIP/1690100-00000153”, “SIP/48695025705@external-pbx,60,Tt”) in new stack
[Jun 25 07:07:42] ERROR[20312][C-000042da]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo(“-”, “(null)”, …): Name or service not known
[Jun 25 07:07:42] WARNING[20312][C-000042da]: acl.c:890 resolve_first: Unable to lookup ‘-’

could you please tell me what is missing in my configuration what is missing in ti

Please provide configuration and logs as plain text.

I suspect the machine’s host name isn’t properly set, and Asterisk is failing to find its own preferred address.

If you have to set inecure=port because of NAT, you should be trying to fix the NAT problem, rather than working round it.

I think that setting global variables with dynamically created names will result in memory leaking; I don’t think there is any reliable way for Asterisk to determine that the name will never be used again, with a finite running time for the algorithm.

You seem to be treating the name of the agent’s channel as being their name, when, whilst it may include their name, it changes on every call.

here is the sip.conf :-

[general]
acl=172.31.35.0/20 ; Fix subnet
contactpermit=112.196.48.146/32 ; Zoiper’s IP
bindport=6090
bindaddr=0.0.0.0
externip=52.66.68.62
localnet=172.31.35.9/20
nat=force_rport,comedia

; Remove or modify this line if not needed
register => 1690100:K4rfk793U8@217.149.244.35:6090

[external-pbx]
type=peer
host=217.149.244.35
port=6090
username=1690100
secret=K4rfk793U8
fromuser=1690100
context=from-trunk
insecure=invite,port
dtmfmode=rfc2833
directmedia=no
disallow=all
allow=ulaw
qualify=yes
qualifyfreq=60

[1690100]
type=friend
host=dynamic
; REMOVED: username=1690101 ; This was causing authentication mismatch
secret=K4rfk793U8
context=from-internal
nat=force_rport,comedia
disallow=all
allow=ulaw,alaw
canreinvite=no
qualifyfreq=60
qualify=yes

and here is the extensions.conf file

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

[globals]
CONSOLE=Console/dsp
IAXINFO=guest
TRUNK=SIP/external-pbx

[default]
exten => s,1,Hangup()

[from-trunk]
exten => s,1,Goto(+48222300490,1)

exten => +48222300490,1,NoOp(Incoming call for +48222300490)
same => n,Answer()
same => n,Set(MY_UID=${UNIQUEID})
same => n,Set(GLOBAL(CALLER_${MY_UID})=${CALLERID(num)})
same => n,Verbose(1,DEBUG: Stored CALLER_${MY_UID} = ${CALLERID(num)})
same => n,Set(__CALLER_UID=${MY_UID}) ; Pass UID to agent’s channel
same => n,Queue(agents-queue)

[agent-pickup]
exten => s,1,NoOp(Agent pickup handler started)
same => n,Set(MY_UID=${CALLER_UID})
same => n,Set(CALLER_NUM=${GLOBAL(CALLER_${MY_UID})})
same => n,Set(AGENT_ID=${CHANNEL(name)})
same => n,Verbose(1,RAW VALUES - Caller: ${CALLER_NUM} Agent:${AGENT_ID} UniqueID:${MY_UID})

; Optional logging
same => n,System(echo “DEBUG: Caller=${CALLER_NUM} Agent=${AGENT_ID}” >> /tmp/queue_debug.log)

; Optional API call
same => n,ExecIf($[“${CALLER_NUM}” != “”]?System(curl --max-time 5 -X POST “https://prod-autos.lider-ltd.pl/insert_ivr_user” -d “phone=${CALLER_NUM}&agent=${AGENT_ID}” >> /tmp/api_calls.log 2>&1))

same => n,Return()

[from-internal]
; Local numbers (7-9 digits, adds 48 prefix)
exten => _[2-9]XXXXXX,1,NoOp(Processing local number: ${EXTEN})
same => n,Set(OUTNUM=48${EXTEN}) ; Add country code
same => n,Dial(SIP/${OUTNUM}@external-pbx,60,Tt)
same => n,Hangup()

; Numbers already with 48 prefix
exten => _48XXXXXXXXX,1,NoOp(Processing national number: ${EXTEN})
same => n,Dial(SIP/${EXTEN}@external-pbx,60,Tt)
same => n,Hangup()

; International format (00 prefix)
exten => _00X.,1,NoOp(Processing international number: ${EXTEN})
same => n,Dial(SIP/${EXTEN}@external-pbx,60,Tt)
same => n,Hangup()

; E.164 format (+ prefix)
exten => _+X.,1,NoOp(Processing E.164 number: ${EXTEN})
same => n,Set(OUTNUM=${EXTEN:1}) ; Remove +
same => n,Dial(SIP/${OUTNUM}@external-pbx,60,Tt)
same => n,Hangup()

; Internal extension for testing
exten => 100,1,NoOp(Test extension)
same => n,Answer()
same => n,Playback(hello-world)
same => n,Hangup()

; Echo test
exten => 600,1,NoOp(Echo test)
same => n,Answer()
same => n,Echo()
same => n,Hangup()