If you're using Asterisk, create 2 contexts in your sip.conf (one for inbound, one for outbound) as follows:
Termination / Outbound
[idv-outbound]
type = peer
insecure = very
host = outbound1.wholesale.siptermination.net
dtmfmode = rfc2833
canreinvite = no
sendrpid = yes
Origination / Inbound
[idv-inbound]
type = peer
insecure = very
host = sip.idv.net
dtmfmode = rfc2833
canreinvite = no
context=idv-inbound
and add any codec restrictions that you need (we recommend sticking with g.711u (ulaw) for maximum quality. g.729a/b is also supported).
Outbound call routing
You can point your outbound calls to this new context in your extensions.conf such as in this example:
[idv-outdial]
exten =>_1NXX-NXX-XXXX,1,Set(CALLERID(number)=3023512250)
exten =>_1NXX-NXX-XXXX,2,Dial(SIP/idv-outbound/${EXTEN})
Outbound calls should be sent to our SIP gateway in one of the 2 following formats:
sip:1NPANXXXXXX@outbound1.wholesale.siptermination.net for domestic (NANPA) dialed numbers
sip:011CCXXXXXXX@outbound1.wholesale.siptermination.net for International
Inbound call routing
For inbound call routing, follow this example in your extensions.conf to route calls to different contexts:
[idv-inbound]
exten =>6106929205,1,Goto(somecontext,s,1)
exten =>8887371001,1,Goto(someothercontext,s,1)
