E. Versaevel
2004-Nov-12 02:37 UTC
[Asterisk-Users] SIP clients <--> SE R <--> Asterisk <--> carrier/gateway
Hello, I'm currently trying to setup a SIP environment for VoIP calling for my final school project, so I'm just working with VoIP/SIP for 2 weeks. I'm using SER as a SIP proxy server, but the carrier/gateway I am using for calling to/from PSTN is requiring me to register at their server and authorize outgoing calls, which is something SER won't do. So I got the idea to use asterisk between the PSTN carrier and SER for the authorization, since Asterisk can register and auth itself. SIP --------- SIP --------- SIP --------- PSTN -----| |-----------| |-----------| |------ --------- --------- --------- SER Asterisk Carrier <-- auth stuff --> <-- sip relay --> So all asterisk needs to do is register itself at the carrier (I've got that to work with sip.conf) and relay the incoming calls to ser for further routing, I got that to work a bit. I've setup 2 sip extensions in extensions.conf in the default context (asterisk itself is listening at 5065) [globals] SERADDRESS=myserbox:5060 CARRIER=carrier:5060 [default] exten => sip_incomming_from_carrier, 1, Dial(SIP/{EXTEN}@${SERADDRESS},20,r) exten => sip_incomming_from_ser, 1, Dial(SIP/${EXTEN}@${CARRIER},20,r) When I get an incoming call from the carrier it gets routed to the SER server (wrong SIP uri however, it now gets sip_incomming_from_carrier@myserbox, but that's due to the {EXTEN}, that should be called_numer@myserbox), but replies from my SER box are not getting back to the carrier, so if a user is not found (SIP/2.0 404) I see that message on the Asterisk console (Got SIP response 404 "Not Found" back from myserbox), but it isn't relayed to the carrier. I'm also talking with the carrier about skipping the authorization (or moving it to a lower layer IE vpn oid), but I like to have a solution ready if the carrier doesn't want that. Kind regards, E. Versaevel