No matching peer found while registration - FreePbx Asterisk

Hi

We are using PJSUA with FreePbx to register new sip extensions within our office , however we are having difficulties in registering new extensions .

below is the command we use with PJSUA :
./pjsua-i686-pc-linux-gnu --id=sip:[email protected]:5060 --registrar=sip:000.00.0.00:5060 --realm=* --username=99991 --password=99991 --log-file=log --log-level=6

When we run the above command we get the below Response :
13:35:59.895 pjsua_acc.c …SIP registration failed, status=403 (Forbidden (Bad auth))

ON the FreePBX (asterisk) , I see the below error under full log :
[2012-08-28 13:31:39] NOTICE[4484] chan_sip.c: Registration from ‘sip:[email protected]’ failed for ‘192.16.0.61’ - No matching peer found

can you please explain what does it mean by No matching peer found .

Regards
Jay

It means simply that you have not yet made an extension 99991 with a password 99991 on the asterisk/FreePBX box ( a very bad password for security reasons I might add )

Hi Dicko

We are trying to create a new extension from pjsua command line, hence that extension is not there on asterisk, when we create account/extension with pjsua we give all the details like the SIP url, URL of the Registrar, Auth Realm, Auth Username, Auth Password…

We were able to create a brand new extension which was not there on the asterisk/freepbx box using PJSUA earlier .

Can you please suggest any Command line way/method to create extensions other than doing it from FreePBx console .

Please help .

Regards
Jai Chary.

There is no simple way to “inject” a new extension into FreePBX, you will need to add the AMPUSER details into the asterisk database first then you will need to add tuples to the sip table in mysql, and add relevent entries into the user and device tables also to suit. Then you will need to reload the whole shebang. It is further complicated by what version of FreePBX you are trying to data to.

I query your previous ability to so do from “PJSUA earlier” please say more . . .

Dicko

Below is the interactive steps from pjsua which worked couple of days ago when we added a new extension :
+a indicates adding a new account :

+a
Your SIP URL: (empty to cancel): sip:[email protected]:5060
URL of the registrar: (empty to cancel): sip:192.16.0.63:5060
Auth Realm: (empty to cancel): *
Auth Username: (empty to cancel): 3333
Auth Password: (empty to cancel): 8abc83zxws
18:51:30.204 pjsua_acc.c Adding account: id=sip:[email protected]:5060
18:51:30.204 pjsua_acc.c .Account sip:[email protected]:5060 added with id 2
18:51:30.204 pjsua_acc.c .Acc 2: setting registration…
18:51:30.205 pjsua_core.c …TX 546 bytes Request msg REGISTER/cseq=40829 (tdta0x9eeaca0) to UDP 192.16.0.63:5060:
REGISTER sip:192.16.0.63:5060 SIP/2.0
Via: SIP/2.0/UDP 192.16.0.61:5060;rport;branch=z9hG4bKPj0dd375a7-d9e0-4954-b7cd-5ae6d1eb2025
Max-Forwards: 70
From: sip:[email protected];tag=c2ca1504-3719-4af3-b8e4-a58d900fee24
To: sip:[email protected]
Call-ID: 80609035-4a69-404d-b795-71993e541b16
CSeq: 40829 REGISTER
User-Agent: PJSUA v2.0.1 Linux-2.6.18.194/i686/glibc-2.5
Contact: sip:[email protected]:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0


THe Reason we want a command line way/method to create extensions is because we have another application which would make initate a service call and allocate extension to the user when they sign up .
so we would like to know it is possible instead of GUI .

Please Help.

Jay

Well your asterisk box seems to be accepting unknown registrations, but it has nothing to do with FreePBX. Sorry, apart from dropping FreePBX and going “realtime” with an asterisk that supports it, I can’t think of an answer to your problem. There are some decent sip proxies out there that handle that sort of thing securly (unlike your server apparently) and from scripts. , look at Kamailio for starters.