Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Mon Sep 26, 2022 6:48 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: ip authentication user
PostPosted: Thu May 15, 2008 8:29 am 
Offline

Joined: Wed Sep 12, 2007 5:56 pm
Posts: 6
Hi,

i'm not sure if this is the right category or it should be on miscellaneous anyway i need to know how can i create sip account with ip authentication only? im using a2billing as a billing system only for my wholesale voip provider because they can't provide me instant billing access and reseller login pages. so i also need to make the sip accounts reinvitable so the voice packets will be from my provider connected directly to my client.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 15, 2008 12:59 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Yes, you can authenticate users by IP address. Search the forum and I'm sure you'll find a solution.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 20, 2008 9:38 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
s0lid,

Did you found any solution. I am searching myself, but I haven't been lucky


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 20, 2008 10:54 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Here is what you have to do. First of all, DO NOT create a sip friend manually. It is buggy.

For IP authentication, follow these steps and you will be fine:

Step 1: Edit the SIP friend that you want to use IP authentication with

Step 2: Set the `Type` field to `peer` without the quotes. This is very important as to my knowledge, setting it to friend or user will never work.

Step 3: Set the username field to nothing. Delete its content.

Step 4: Set the secret field to nothing. Delete its content

Step 5: Set the host field to the domain name or the IP address of the client

Step 6: Give a minimal peer setting context to the clients. And start testing. Here is an example assuming that the customer account number is 1234567.

[1234567]
type=peer
accountcode=1234567
host=your.server.ip.address

I believe that you can also simply use 'type' and 'host' on the client side and the other value will default to the sip friend settings. The client can specify a list of codec or other preference and in some cases, asterisk will prioritize the clients settings (e.g. sendrpid, trustrpid, allow, disallow, ...)

Let us know if it works.

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 5:31 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
asiby

For some reason is not working for me.

SIP friend settings:


[6503788319]
type=peer
username=
accountcode=6503788319
regexten=6503788319
callerid=973988794778207
amaflags=billing
secret=
nat=yes
dtmfmode=RFC2833
qualify=yes
canreinvite=yes
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=g729
host=192.168.0.105
insecure=port,invite
context=a2billing
regseconds=0
cancallforward=yes


When I try to call from the SIP phone I get a recording saying "The number you have dial is not in service, Please check the number and dial again" If I register the IP phone by user and password then calls go thru with no problems.

This is asterisk log output:


-- Executing [[email protected]:1] NoOp("SIP/192.168.0.20-09e9e5d8", "Received incoming SIP connection from unknown peer to 7862536589") in new stack
-- Executing [[email protected]:2] Set("SIP/192.168.0.20-09e9e5d8", "DID=7862536589") in new stack
-- Executing [[email protected]:3] Goto("SIP/192.168.0.20-09e9e5d8", "s|1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [[email protected]:1] GotoIf("SIP/192.168.0.20-09e9e5d8", "0?from-trunk|7862536589|1") in new stack
-- Executing [[email protected]:2] Set("SIP/192.168.0.20-09e9e5d8", "TIMEOUT(absolute)=15") in new stack
-- Channel will hangup at 2008-05-23 17:30:58 UTC.
-- Executing [[email protected]:3] Answer("SIP/192.168.0.20-09e9e5d8", "") in new stack
-- Executing [[email protected]:4] Wait("SIP/192.168.0.20-09e9e5d8", "2") in new stack
-- Executing [[email protected]:5] Playback("SIP/192.168.0.20-09e9e5d8", "ss-noservice") in new stack
-- <SIP/192.168.0.20-09e9e5d8> Playing 'ss-noservice' (language 'en')
-- Executing [[email protected]:6] PlayTones("SIP/192.168.0.20-09e9e5d8", "congestion") in new stack
-- Executing [[email protected]:7] Congestion("SIP/192.168.0.20-09e9e5d8", "5") in new stack
== Spawn extension (from-sip-external, s, 7) exited non-zero on 'SIP/192.168.0.20-09e9e5d8'
-- Executing [[email protected]:1] NoOp("SIP/192.168.0.20-09e9e5d8", "Hangup") in new stack
-- Executing [[email protected]:2] Set("SIP/192.168.0.20-09e9e5d8", "DID=s") in new stack
-- Executing [[email protected]:3] Goto("SIP/192.168.0.20-09e9e5d8", "s|1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [[email protected]:1] GotoIf("SIP/192.168.0.20-09e9e5d8", "0?from-trunk|s|1") in new stack
-- Executing [[email protected]:2] Set("SIP/192.168.0.20-09e9e5d8", "TIMEOUT(absolute)=15") in new stack
-- Channel will hangup at 2008-05-23 17:31:07 UTC.
-- Executing [[email protected]:3] Answer("SIP/192.168.0.20-09e9e5d8", "") in new stack
== Spawn extension (from-sip-external, s, 3) exited non-zero on 'SIP/192.168.0.20-09e9e5d8'


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 5:45 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I am not sure why you have a username and a secret field. These field should not be simply empty in the peer setting. It should not be present at all.

The following variables should be deleted from the peer entry.

username=
secret=

Try manually modifying the additional_a2billing_sip.conf and reloading the server and test again. Of course, this is only a temporary solution cause if you generate the sip friends, the error will come back.

You can also double check to see if there isn't a white space left in these fields.

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 5:55 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
Thanks asiby; I tried deleting those variables, but getting same results


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 6:27 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I am looking at your CLI log, and it does not seem to be relevant to this situation.

Can you also show the context that you are using as trunk setting on the client side?


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 6:28 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
This is a long shot, but it's not the 'qualify = yes' interfering is it?


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 6:40 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
I tried qulify=no and also deleting this row, but no change.
Quote:

Quote:
Can you also show the context that you are using as trunk setting on the client side?


asiby, what context are you refering to? I am making test calls from an IP phone and from a softphone; The only trunk setup is a ZAP trunk


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 6:54 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
There is your problem. A SIP phone is not a peer from asterisk point of view. It is natively a client. Thus, is will always be seen and a User or a friend (friend = user +peer). So even as a friend, it will really only use the user part of the friend.

You can only do IP authentication with a real peer. That can be another asterisk box, callweaver, openser, ... but not an end user SIP phone.

I should rather say that "I do not know how to do that, and I have never been able to do it"

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 7:14 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
This is a very good point; I will built another asterisk server and try again, or ask somebody to test with me.

Thank you very much for your help


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 7:36 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
You are very welcome.

Good luck.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 24, 2008 4:39 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
I got it working with IP phones.

I create a SIP Trunk on trixbox and put the settings of the SIP friend on the trunk (Probably this was required, but oh well I am learning). Now ip authentication work. The curious thing is that the settings at additional_a2billing.conf gets ignore; I can even delete the sip friend from here and it will work.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 10, 2008 12:29 am 
Offline
User avatar

Joined: Tue Dec 04, 2007 12:05 am
Posts: 295
HI

I try this is post here but i get

Aug 10 02:26:58 WARNING[2967]: chan_sip.c:1229 retrans_pkt: Maximum retries exceeded on
transmission [email protected] for seqno 101 (Critical Response)

any idea???


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group