Jump to content

Forward Calls directly to Asterisk server


randoff

Recommended Posts

Hello I have Pbxnsip and i also have a Asterisk server.

I have been trying for past couple days to find the right way to do this so any help would be very appreciated!

 

I want to forward calls that come into Pbxnsip to my Asterisk server.

 

I haven't found a good step by step guide on how to do this.

 

What is the best way to do this? A Gateway trunk? If so what do i need to configure for that.

Or a Gateway a Trunk to call a Sip URI? Also if this is the way to go what is the setting do I need to set? What is the "string" used to call a Sip URI?

I tried doing this http://kiwi.pbxnsip.com/index.php/ENUM but could not get it to dial out.

 

Thanks

Link to comment
Share on other sites

I take it you are using Pbxnsip for external trunks, right? In this case an idea would be to create an extension in Pbxnsip (http://wiki.snomone.com/index.php?title=Extension_Accounts) and then create a SIP channel in Asterisk which registers as the extension you created. (http://www.voip-info.org/tiki-index.php?page=Asterisk%20SIP%20Channels)

Then you can route all calls from the Pbxnsip trunks to the asterisk extension

Link to comment
Share on other sites

Ok I got it working.... here is what I did so others that might have this problem can do it.

 

(1) Created an extension on Asterisk example 400 then set the secret for for it and added it.

 

(2) Added a Sip Gateway in Pbxnsip with the these settings:

 

Domain: 111.111.111.111 (your ip)

Username: 400 (your ext)

Password: secret(what you set as your secret for that ext)

Outbound Proxy: 111.111.111.111:5060(your server and port)

Remote Party/Privacy Indication: No Indication (not sure if this is important)

Is Secure: yes

 

(3) Then I set up and extension in Pbxnsip and forwarded that to ext number 7777 (that simulates a call coming in Asterisk)

I set the default incoming trunk in Pbxnsip to forward the ext I made in Pbxnsip that forwards to ext 7777 and bingo! Its working!

 

Hope this helps someone :)

Link to comment
Share on other sites

  • 4 months later...

Greetings

 

1. Does Snom One support CallerID filtering so incoming calls can be distributed accordingly?

2. Can Snom One Free be installed and run on a http domain? How please?

3. I want to add prefix to incoming calls before routing on to a termination sbc server, how please? (sbc.xxxxxxx.com or xx.xxx.xxx.xx)

4. Is iax trunk/script like this implementable from within Snom One Free?:

sip.conf

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[James]

type=friend

host=xx.xxx.xxx.xx

port=5060

nat=yes

qualify=yes

disallow=all

allow=g729

allow=ulaw

allow=g723

context=James

canreinvite=yes

 

[James-dialout]

type=friend

host=xx.xxx.xxx.xxx

port=5060

nat=yes

qualify=yes

disallow=all

allow=g729

;allow=ulaw

;allow=g723

context=James

canreinvite=yes

 

;;;;;;;;;;;;;;;;;;;

 

 

 

extensions.conf

;;;;;;;;;;;;;;;;;;;;;

[James]

exten => _xxxxxxxx,1,Answer()

exten => _xxxxxxxx,n,NoOp(CLI:${CALLERID(num)})

exten => _xxxxxxxx,n,DISA(no-password,disa_test)

[disa_test]

exten => _X.,1,Dial(SIP/0011103${EXTEN}@James-dialout)

 

 

 

My ideal flow is : incoming calls > DID > sip uri > CLI filtering > DISA, IVR or direct connection to sbc termination server > Dial Tone > outbound calling

 

Your elaboration of all possiblities is much appreciated.

 

Best

James

Link to comment
Share on other sites

1. Does Snom One support CallerID filtering so incoming calls can be distributed accordingly?

 

 

In the trunk routing section (see http://wiki.snomone.com/index.php?title=Inbounds_Calls#How_the_System_Routes_a_Call_to_the_Proper_Extension), you can use the "f" flag to send the call to an extension that depends on the "From" field.

 

2. Can Snom One Free be installed and run on a http domain? How please?

 

 

You can change the domain alias to look like a HTTP (or SIP) domain. Make sure you keep the "localhost" name in the list of alias names, this makes youe life easier in environments where you have only one domain (like in the snom ONE free).

 

3. I want to add prefix to incoming calls before routing on to a termination sbc server, how please? (sbc.xxxxxxx.com or xx.xxx.xxx.xx)

 

I think in version 4 we have a setting for the routing prefix (like a tech prefix) that you can use, check out your trunk settings. (in the next version this will be a lot more flexible, there you can put anything you like).

 

4. Is iax trunk/script like this implementable from within Snom One Free?:

 

A little bit hard to say as I dont undestand the Asterisk scripting language; however take a look at the "send call to extension" section of the Wiki, you can also get a lot of things done there. Also keep in mind that you can assign alias names not only to domains, but also to accounts inside the domain, expecially for 10-digit numbers which gives you additional routing flexibility.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...