Problem with virtualbox+ubuntu+asterisk

Hi guys,
this one is my first post here and I want thank you for your support. I’ve a problem with the configuration of asterisk on ubuntu 8.04lts server. I’ve followed different howto and I’ve tried to configure asterisk in this way:

sip.conf

;—
register => 0863xxxxxx:xxxxxxx@voip.eutelia.it/0863xxxxx
;—
externip = x.x.x.x
localnet=192.168.0.0/255.255.255.0
nat=yes
;----
[202]
type=friend
context=internal
username=202
secret=202
host=dynamic
;----
[eutelia]
type=friend
context=fromprovider
username=0863xxxxx
fromuser=0863xxxxx
secret=xxxxx
host=voip.eutelia.it
fromdomain=voip.eutelia.it
qualify=yes
;insecure=port,invite
insecure=very
nat=yes
;----

while extentions.conf is:

;—
[internal]
exten => 202,1,Dial(SIP/202,20)
exten => 202,2,Hangup()
exten => _7.,1,Dial(SIP/${EXTEN:1}@eutelia)
[fromprovider]
exten => _0863xxxx,1,Dial(SIP/202,10)
;—

I don’t undestand why if I try to make an outgoing call the system works very well, while I can’t receive any calls from external numbers. Someone knows where I made a mistake. Ah I was forgetting the system is installed over virtualbox. Please help me. Thanks

Because the first thing you have to put is Answer(). Try with this:

[fromprovider]
exten => _0863xxxx,1,Answer()
same => n,Dial(SIP/202,10)

It should works, if not…enter the Asterisk CLI using the command asterisk -rvvvv and see what it shows when there is an incoming call from your provider.

Hope this helps!

Starting with Answer is a common mistake. It ensures the caller gets charged even if the call eventually fails! Unless there is s specific need to answer prematurely, let Dial signal Answer when the called party answers.

In extensions patterns, you must use an upperrcase X. You don’t need to use patters if the x’s are actually proper digits.

At the moment it is not clear whether you are failing to register, you are registering, but the source IP is not the one to which you registered, the contact user part is wrong, or the contact user part is being ignored by the ITSP. You need to provide enough SIP logging to decide between these cases.

2 Likes

This thread is 7 years old, Hopefully he found his solution since he posted!