I have setup a SIP trunk, it works dialing out but not working for inbound calls. I get the number not in service announcement.
If i change the “Allow Anonymous Inbound SIP Calls” to yes it works fine.
I have read i need to add context=from-pstn to a configuration in my SIP settings. On my SIP Trunk settings, under outgoing settings under PEER Details i have added that but it doesn’t seem to help.
Can anyone point me into the right direction please?
If the call is hitting your server and you have to turn on anonymous your trunk is probably not setup correctly. Post the contents of your trunk And some console output of a call.
You need to use an ssh client like putty to log into you system. Run asterisk -r to start the asterisk console. Make a call and post the output.
There are many posts on this type of debugging on the forum you might try a search to find some examples of using the tools asterisk and freepbx provide to assist in troubleshooting.
you say it works ok when the ‘accept anon calls’ is on. Have you spoken with your sip provider to establish if this is the norm? It could be that the provider routes calls from more than one i.p. address.
Verbosity is at least 3
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [02035406958@from-sip-external:1] NoOp(“SIP/91.146.112.10-00000 004”, “Received incoming SIP connection from unknown peer to 02035406958”) in ne w stack
– Executing [02035406958@from-sip-external:2] Set(“SIP/91.146.112.10-000000 04”, “DID=02035406958”) in new stack
– Executing [02035406958@from-sip-external:3] Goto(“SIP/91.146.112.10-00000 004”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“SIP/91.146.112.10-00000004”, “0 ?checklang:noanonymous”) in new stack
– Goto (from-sip-external,s,5)
– Executing [s@from-sip-external:5] Set(“SIP/91.146.112.10-00000004”, “TIME OUT(absolute)=15”) in new stack
Channel will hangup at 2013-02-25 08:40:33.432 GMT.
– Executing [s@from-sip-external:6] Answer(“SIP/91.146.112.10-00000004”, “” ) in new stack
– Executing [s@from-sip-external:7] Wait(“SIP/91.146.112.10-00000004”, “2”) in new stack
– Executing [s@from-sip-external:8] Playback(“SIP/91.146.112.10-00000004”, “ss-noservice”) in new stack
– <SIP/91.146.112.10-00000004> Playing ‘ss-noservice.alaw’ (language ‘en’)
== Spawn extension (from-sip-external, s, 8) exited non-zero on ‘SIP/91.146.11 2.10-00000004’
– Executing [h@from-sip-external:1] Hangup(“SIP/91.146.112.10-00000004”, “” ) in new stack
== Spawn extension (from-sip-external, h, 1) exited non-zero on ‘SIP/91.146.11 2.10-00000004’
As I mentioned earlier in the post it looks like your trunk is not configured correctly. This line of the logs is the key. I must get to work this morning so I can help right now.
Executing [02035406958@from-sip-external:1] NoOp(“SIP/91.146.112.10-00000 004”, “Received incoming SIP connection from unknown peer to 02035406958”) in ne w stack
Can you show your trunk details
(peer/user/registration - all that apply) - note: remove/change passwords
It seems that Asterisk is unable to figure that this is a service you’ve subscribed to so is delivering to context from-sip-external which will not pass the call unless you switch “Allow Anonymous Inbound SIP Calls” on. This is not how you should run of course.
Your trunk setup might give clues as to why this is happening.