Incoming calls problem \ ovh provider


(Ucef06) #1

hello ,

i have one sip trunk and many DIDs numebrs in OVH , i afected every DID number to an extension by creating a trunk sip and inbound route for each number and in ovh interface i redirected all traffic to trunk. i have no problem with outbound calls but inbound calls sometimes works and sometimes not and sometimes an incoming call ring in different extensions in the same time .

what did i did wrong . thanks in advance;


(Dave Burgess) #2

https://wiki.freepbx.org/display/SUP/Providing+Great+Debug would be a great place to start. Right now, you’ve told us “my stuff is broke…

The answers to your questions are in the /var/log/asterisk/full file, so I’d start there.


(Jared Busch) #3

You made a trunk per DID.

All you need is one trunk and then an inbound route for each DID that you want routed specifically.


(Ucef06) #4

yes.i created a trunk for each DID with a sip configuration like this :

outgoing:
username=003*******
type=friend
secret=password
port=5060
insecure=port,invite
host=siptrunk.ovh.net
disallow=all
context=from-trunk
allow=ulaw&G.722&alaw&ulaw&G.729

incoming:

003********:password@siptrunk.ovh.net/003*****05 (change number in every trunk)


(David55) #5

Asterisk will only use the first matching definition. Hopefully it will use a type=peer match, and type=peer is likely to be more secure, but there is nothing in your trunk definitions about the user part of the request URI, so Asterisk only has the IP address to go on and will use the “first” section that matches on that. First refers to the position in the internal data structures and may not reflect the order in the file.

That basically means you have to discriminate based on the Asterisk extension that appears in the incoming request.

In a traditional, analogue, or ISDN, system, you would have a single trunk that was shared across all your incoming numbers. (Although I doubt that direct in dialling is still offered on analogue connections.)

Note that username= was deprecated in favour of defaultuser=, a long time ago, probably because it was misleading people to think it had a role for incoming calls.


(Ucef06) #7

so what should i do ?


#8

Please explain why you can’t use a single trunk with all your DIDs. That is the simplest and most robust, if your provider supports it.


(Ucef06) #9

because it didn"t work in first try with one single trunk . i will retry it right know .


(Ucef06) #10

after disabling all the trunks and keep one trunk running . incoming calls workd but they rings in all extensions in first try and after rebooting asterisk no incoming call works now


#11

In Reports -> Asterisk Info -> Registries, does the trunk show as Registered?

If not, report status and any errors in the log regarding registration.

If yes, what (if anything) appears in the Asterisk log on an attempted incoming call? What does caller hear?


(Jared Busch) #12

Don’t use a sip trunk. Gods the horrible old documentation on the internet ……

Use pjsip and use the toheader context.


(Ucef06) #13

yes , the trunk is registred . now it works when i add a DID number in the end of the Recording string but when calling all the other DIDs the all ring in the extension linked to the DID number add to the recording string


(Ucef06) #14

ok i will try using pjsip right now … thanks


#15

As @sorvani said, change the context for the trunk to from-pstn-toheader

Set up an Inbound Route with DID and CID left blank (ANY/ANY). Call in and see what appears in the CDR DID field. Set up your Inbound Routes with DID in the same format.


(Ucef06) #16

Hello , i changed my conf to pjsip trunk as @sorvani and @Stewart1 saggested … in coming calls works but and if i calls the dids they rings in the disered extensions but this just works just for a while after that when you call the DIDs it rings but not in the extensions but when i reboot it work … outbond calls dont work … what can i do … thanks in advance .


(Jared Busch) #17

If it works after a restart then quits after a while there is something in your config. Most likely lower the registration time of the the trunk In the advanced pjsip settings tab.


(Ucef06) #18

hello sovrani … i lowred every setting but always the same problem it works for a while


#19

Try setting Expiration to 120.


(Ucef06) #20

its wooooorks …thank you all so much …the PJSIP Trunk suggested by @sorvani and the setting experation from @Stewart1 saved the day … thank you guys