Iqbal
2004-Oct-19 16:17 UTC
[Asterisk-Users] new here : logic of ser and asterisk all confused---longish
Hi I have managed to get SER up and running fine, and got my UA (Xlite and IPphone) talking to each other, all authenticating nicely from the DB....and then I started to look at asterisk, I figured I may as well split the proxy (ser) and do the call features like voicemail and all using asterisk. This is where my logic went a bit pear shaped. I installed asterisk, its on the same box as ser, but on a different port SER port = 5060 Asterisk port =5090 before I tested ser and asterisk together I tested asterisk on its own, dialed 1000 got the voicemail, so I figured all is good, only after that did I change the ports to 5090, and fored up SER again. Now from my understanding SER is a proxy, hence will allow calls just to pass through, and the media stream doesnt neccessarily have to go through it.. What I wanted to do, was to initiate a call using Xlite get SER to register/authenticate it via my DB, and then pass the call out to destination via asterisk,the call destination could be another SIP UA (Xlite), or pstn , the latter is not implemented as yet (on a side note can I instead of installing cards, just pass this pstn traffic to a global terminator, if so how, beit H323 or SIP, especially interested if anyone has done this with quintum A800) However what i have managed to somehow cobble together is this, and it seems to work.... Xlite ---> Asterisk(5090)--->sip.conf ----> extensions --->SER ----> forward statement in SER ----> Xlite what I need is Xlite ----> SER ----use forward statement in ser.cfg ----> Asterisk ---->sip.conf---->extensions.conf ---> PSTN or another xlite Now is the second one possible or does it have to go back via SER, also what about the billing, is their any problems if ser is not passing the stream (confused at this point :-)) ser.cfg ----- if (uri =~ "sip:2[0-9]*@sip.ipclouds.co.uk"){ log(1, "Forwarding to Asterisk\n"); rewritehostport("193.218.160.25:5090"); break; } which I think means any number starting with a 2 send to asterisk server..now when I dial this , in the SER logs it shows the message Forwarding to Asterisk, and then waits, but in asterisk sip debug there is nothing, not a sausage sip.conf ----- [general] context=OUTGOING autocreatepeer=yes this to me suggests to lookup contect OUTGOING in extensions file so.... extensions.conf ------- [globals] (snipped out the common ones) SERADDRESS=sip.ipclouds.co.uk:5060 [OUTGOING] ; Line below added for ser --- iqbal exten => 1000,1,Dial(SIP/${EXTEN}@${SERADDRESS},20,r) seeing all this it would seems that asterisk and ser go into a loop, cause extensions simply sends it back to SER, which is what seems to happen, and the ser.cfg sends it back to extensions. ------- Ser tries to send to asterisk from my logs, but alas asterisk does not want to take the call and make an outbound. hope it wasnt too looong tks iqbal
Asterisk .
2004-Oct-20 08:21 UTC
[Asterisk-Users] new here : logic of ser and asterisk all confused---longish
Hello, comments inline... --- Iqbal <iqbal@gigo.co.uk> wrote:> if (uri =~ "sip:2[0-9]*@sip.ipclouds.co.uk"){ > > log(1, "Forwarding to Asterisk\n"); > rewritehostport("193.218.160.25:5090"); > > break; > } > > which I think means any number starting with a 2 send to asterisk > server..now when I dial this , in the SER logs it shows the message > Forwarding to Asterisk, and then waits, but in asterisk sip debug there > is nothing, not a sausageI am afraid you are not sending the calls to Asterisk, but just rewriting the host and port. After rewriting, forward/relay the calls to Asterisk.> SERADDRESS=sip.ipclouds.co.uk:5060 > > [OUTGOING] > ; Line below added for ser --- iqbal > exten => 1000,1,Dial(SIP/${EXTEN}@${SERADDRESS},20,r) > > seeing all this it would seems that asterisk and ser go into a loop, > cause extensions simply sends it back to SER, which is what seems to > happen, and the ser.cfg sends it back to extensions.Dont Asterisk complain about a '482 Loop Detected' error? The Dial statement will create a new INVITE and will be relayed to SER, which will send it back to Asterisk, thus resulting in a loop. Asterisk will drop this call. For dialing extensions use either Asterisk or SER. IMO, use ser for all extension dialing, and have appropriate forwarding and failure routing in the ser.cfg to send calls to Asterisk for the PBX features and voicemail. Regards, Girish _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com